Propuesta presupuestos

This commit is contained in:
imnavajas
2023-07-07 12:36:33 +02:00
parent 461d3f1b8a
commit f67ba91b79
13 changed files with 1392 additions and 87 deletions

View File

@ -7,6 +7,20 @@
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $tarifaacabadoEntity->nombre) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Tarifaacabado.precioMin') ?>*
</label>
<input type="text" id="precio_min" name="precio_min" required class="form-control" value="<?=old('precio_min', $tarifaacabadoEntity->precio_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Tarifaacabado.importeFijo') ?>*
</label>
<input type="text" id="importe_fijo" name="importe_fijo" required class="form-control" value="<?=old('importe_fijo', $tarifaacabadoEntity->importe_fijo) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div><!-- //.row -->

View File

@ -1,5 +1,5 @@
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
<?= $this->include('themes/_commonPartialsBs/sweetalert') ?>
<?php //$this->include('themes/_commonPartialsBs/sweetalert') ?>
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
<?= $this->section('content'); ?>
<div class="row">
@ -17,6 +17,8 @@
<thead>
<tr>
<th><?= lang('Tarifaacabado.nombre') ?></th>
<th><?= lang('Tarifaacabado.precioMin') ?></th>
<th><?= lang('Tarifaacabado.importeFijo') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
@ -115,6 +117,8 @@
],
columns : [
{ 'data': 'nombre' },
{ 'data': 'precio_min' },
{ 'data': 'importe_fijo' },
{ 'data': actionBtns }
]
});
@ -152,43 +156,7 @@
}
});
$(document).on('click', '.btn-delete', function(e) {
Swal.fire({
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Tarifaacabado.tarifaacabado'))]) ?>',
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
confirmButtonText: '<?= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
cancelButtonText: '<?= lang('Basic.global.Cancel') ?>',
cancelButtonColor: '#d33'
})
.then((result) => {
const dataId = $(this).data('id');
const row = $(this).closest('tr');
if (result.value) {
$.ajax({
//url: `<?= route_to('tarifaAcabadoList') ?>/${dataId}`,
//method: 'DELETE',
url: `/tarifas/tarifaacabado/delete/${dataId}`,
method: 'GET',
}).done((data, textStatus, jqXHR) => {
Toast.fire({
icon: 'success',
title: data.msg ?? jqXHR.statusText,
});
theTable.clearPipeline();
theTable.row($(row)).invalidate().draw();
}).fail((jqXHR, textStatus, errorThrown) => {
Toast.fire({
icon: 'error',
title: jqXHR.responseJSON.messages.error,
});
})
}
});
});
<?= $this->endSection() ?>