mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadida funcion clientes desde ozar
This commit is contained in:
@ -16,6 +16,14 @@
|
||||
value="<?= old('alias', $clienteEntity->alias) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="cif" class="form-label">
|
||||
<?= lang('Clientes.cif') ?>*
|
||||
</label>
|
||||
<input type="text" id="cif" name="cif" required maxLength="50" class="form-control"
|
||||
value="<?= old('cif', $clienteEntity->cif) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="direccion" class="form-label">
|
||||
<?= lang('Clientes.direccion') ?>
|
||||
@ -36,17 +44,33 @@
|
||||
<label for="comunidadAutonomaId" class="form-label">
|
||||
<?= lang('Clientes.comunidadAutonomaId') ?>
|
||||
</label>
|
||||
<select id="comunidadAutonomaId" name="comunidad_autonoma_id">
|
||||
<option value="" selected="selected"><?= lang('Basic.global.pleaseSelectOne') ?></option>
|
||||
<select id="comunidadAutonomaId" name="comunidad_autonoma_id" class="select2 form-control"
|
||||
style="width: 100%;">
|
||||
|
||||
<?php if (isset($comunidadAutonomaList) && is_array($comunidadAutonomaList) && !empty($comunidadAutonomaList)) :
|
||||
foreach ($comunidadAutonomaList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>"<?= $k == $clienteEntity->comunidad_autonoma_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="provincia" class="form-label">
|
||||
<?= lang('Clientes.provincia') ?>
|
||||
<label for="provinciaId" class="form-label">
|
||||
<?= lang('Clientes.provinciaId') ?>*
|
||||
</label>
|
||||
<input type="text" id="provincia" name="provincia" maxLength="100" class="form-control"
|
||||
value="<?= old('provincia', $clienteEntity->provincia) ?>">
|
||||
<select id="provinciaId" name="provincia_id" required class="form-control select2" style="width: 100%;">
|
||||
|
||||
<?php if (isset($provinciaList) && is_array($provinciaList) && !empty($provinciaList)) :
|
||||
foreach ($provinciaList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>"<?= $k == $clienteEntity->provincia_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
@ -61,14 +85,15 @@
|
||||
<label for="paisId" class="form-label">
|
||||
<?= lang('Clientes.paisId') ?>
|
||||
</label>
|
||||
<select id="paisId" name="pais_id" class="form-control select2bs" style="width: 100%;">
|
||||
<option value=""><?= lang('Basic.global.pleaseSelectA', [lang('Clientes.paisId')]) ?></option>
|
||||
<select id="paisId" name="pais_id" class="form-control select2" style="width: 100%;">
|
||||
|
||||
<?php foreach ($paisList as $item) : ?>
|
||||
<option value="<?= $item->id ?>"<?= $item->id == $clienteEntity->pais_id ? ' selected' : '' ?>>
|
||||
<?= $item->nombre ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php if (isset($paisList) && is_array($paisList) && !empty($paisList)) :
|
||||
foreach ($paisList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>"<?= $k == $clienteEntity->pais_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
@ -89,33 +114,50 @@
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="salesmanId" class="form-label">
|
||||
<?= lang('Clientes.salesmanId') ?>*
|
||||
<label for="comercialId" class="form-label">
|
||||
<?= lang('Clientes.comercialId') ?>*
|
||||
</label>
|
||||
<input type="number" id="salesmanId" name="salesman_id" required placeholder="1" maxLength="10"
|
||||
class="form-control" value="<?= old('salesman_id', $clienteEntity->salesman_id) ?>">
|
||||
<select id="comercialId" name="comercial_id" required class="form-control select2" style="width: 100%;">
|
||||
|
||||
<?php if (isset($userList) && is_array($userList) && !empty($userList)) :
|
||||
foreach ($userList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>"<?= $k == $clienteEntity->comercial_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="soporteId" class="form-label">
|
||||
<?= lang('Clientes.soporteId') ?>
|
||||
<?= lang('Clientes.soporteId') ?>*
|
||||
</label>
|
||||
<input type="number" id="soporteId" name="soporte_id" maxLength="10" class="form-control"
|
||||
value="<?= old('soporte_id', $clienteEntity->soporte_id) ?>">
|
||||
<select id="soporteId" name="soporte_id" required class="form-control select2" style="width: 100%;">
|
||||
|
||||
<?php if (isset($userList2) && is_array($userList2) && !empty($userList2)) :
|
||||
foreach ($userList2 as $k => $v) : ?>
|
||||
<option value="<?= $k ?>"<?= $k == $clienteEntity->soporte_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="formaPagoId" class="form-label">
|
||||
<?= lang('Clientes.formaPagoId') ?>
|
||||
</label>
|
||||
<select id="formaPagoId" name="forma_pago_id" class="form-control select2" style="width: 100%;">
|
||||
|
||||
<select id="formaPagoId" name="forma_pago_id" class="form-control select2bs" style="width: 100%;">
|
||||
<option value=""><?= lang('Basic.global.pleaseSelectA', [lang('Clientes.formaPagoId')]) ?></option>
|
||||
<?php foreach ($formaPagoList as $item) : ?>
|
||||
<option value="<?= $item->id ?>"<?= $item->id == $clienteEntity->forma_pago_id ? ' selected' : '' ?>>
|
||||
<?= $item->nombre ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php if (isset($formaDePagoList) && is_array($formaDePagoList) && !empty($formaDePagoList)) :
|
||||
foreach ($formaDePagoList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>"<?= $k == $clienteEntity->forma_pago_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
@ -128,11 +170,11 @@
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="fechavencimiento" class="form-label">
|
||||
<?= lang('Clientes.fechavencimiento') ?>
|
||||
<label for="fechaVencimiento" class="form-label">
|
||||
<?= lang('Clientes.fechaVencimiento') ?>
|
||||
</label>
|
||||
<input type="text" id="fechavencimiento" name="fechaVencimiento" maxLength="100" class="form-control"
|
||||
value="<?= old('fechaVencimiento', $clienteEntity->fechaVencimiento) ?>">
|
||||
<input type="text" id="fechaVencimiento" name="fecha_vencimiento" maxLength="100" class="form-control"
|
||||
value="<?= old('fecha_vencimiento', $clienteEntity->fecha_vencimiento) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
@ -186,23 +228,23 @@
|
||||
value="<?= old('limite_credito_change_at', $clienteEntity->limite_credito_change_at) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="creditoSolunion" class="form-label">
|
||||
<?= lang('Clientes.creditoSolunion') ?>
|
||||
</label>
|
||||
<input type="text" id="creditoSolunion" name="credito_solunion" maxLength="100" class="form-control"
|
||||
value="<?= old('credito_solunion', $clienteEntity->credito_solunion) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="creditosolunion" class="form-label">
|
||||
<?= lang('Clientes.creditosolunion') ?>
|
||||
</label>
|
||||
<input type="text" id="creditosolunion" name="creditoSolunion" maxLength="100" class="form-control"
|
||||
value="<?= old('creditoSolunion', $clienteEntity->creditoSolunion) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="creditoasegurado" class="form-check-label">
|
||||
<input type="checkbox" id="creditoasegurado" name="creditoAsegurado" value="1"
|
||||
class="form-check-input"<?= $clienteEntity->creditoAsegurado == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Clientes.creditoasegurado') ?>
|
||||
<label for="creditoAsegurado" class="form-check-label">
|
||||
<input type="checkbox" id="creditoAsegurado" name="credito_asegurado" value="1"
|
||||
class="form-check-input"<?= $clienteEntity->credito_asegurado == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Clientes.creditoAsegurado') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
@ -216,11 +258,11 @@
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="cccCustomer" class="form-label">
|
||||
<?= lang('Clientes.cccCustomer') ?>
|
||||
<label for="cccCliente" class="form-label">
|
||||
<?= lang('Clientes.cccCliente') ?>
|
||||
</label>
|
||||
<input type="text" id="cccCustomer" name="ccc_customer" maxLength="100" class="form-control"
|
||||
value="<?= old('ccc_customer', $clienteEntity->ccc_customer) ?>">
|
||||
<input type="text" id="cccCliente" name="ccc_cliente" maxLength="100" class="form-control"
|
||||
value="<?= old('ccc_cliente', $clienteEntity->ccc_cliente) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
@ -352,6 +394,14 @@
|
||||
class="form-control"><?= old('comentarios', $clienteEntity->comentarios) ?></textarea>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="isDeleted" class="form-label">
|
||||
<?= lang('Clientes.isDeleted') ?>*
|
||||
</label>
|
||||
<input type="number" id="isDeleted" name="is_deleted" required placeholder="0" maxLength="4"
|
||||
class="form-control" value="<?= old('is_deleted', $clienteEntity->is_deleted) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="userCreatedId" class="form-label">
|
||||
<?= lang('Clientes.userCreatedId') ?>*
|
||||
@ -0,0 +1,212 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form id="clienteForm" method="post" class="card-body" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/clientes/cliente/_clienteFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="pt-4">
|
||||
<input
|
||||
type="submit"
|
||||
class="btn btn-primary float-start me-sm-3 me-1"
|
||||
name="save"
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
>
|
||||
<?= anchor(route_to("clienteList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
</div><!-- /.card-footer -->
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
$('#soporteId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfUsers") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id_user',
|
||||
text: 'first_name',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#formaPagoId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfFormasDePagos") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#paisId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfPaises") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#provinciaId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfProvincias") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#comunidadAutonomaId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfComunidadesAutonomas") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#comercialId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfUsers") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id_user',
|
||||
text: 'first_name',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,26 +1,26 @@
|
||||
<?=$this->include('themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?=$this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('Clientes.clienteList') ?></h3>
|
||||
<?=anchor(route_to('newCliente'), lang('Basic.global.addNew').' '.lang('Clientes.cliente'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfClientes" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Clientes.nombre') ?></th>
|
||||
<th><?= lang('Clientes.alias') ?></th>
|
||||
<th><?= lang('Clientes.cif') ?></th>
|
||||
<th><?= lang('Clientes.email') ?></th>
|
||||
<th><?= lang('Clientes.salesmanId') ?></th>
|
||||
<th><?= lang('FormasPago.formaPago') ?></th>
|
||||
<th><?= lang('Users.comercial') ?></th>
|
||||
<th><?= lang('FormasPagoes.formaDePago') ?></th>
|
||||
<th><?= lang('Clientes.vencimiento') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
@ -31,7 +31,6 @@
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
<?=anchor(route_to('newCliente'), lang('Basic.global.addNew').' '.lang('Clientes.cliente'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
@ -41,68 +40,72 @@
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfClientes').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `
|
||||
<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i>
|
||||
<i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}"></i>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
|
||||
const lastColNr = $('#tableOfClientes').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-sm btn-warning btn-edit me-1" data-id="${data.id}"><?= lang('Basic.global.edit') ?></button>
|
||||
<button class="btn btn-sm btn-danger btn-delete ms-1" data-id="${data.id}"><?= lang('Basic.global.Delete') ?></button>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfClientes').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfBrtip',
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[1, 'asc']],
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= site_url('cliente/datatable') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': 'alias' },
|
||||
{ 'data': 'email' },
|
||||
{ 'data': 'salesman_id' },
|
||||
{ 'data': 'forma_pago' },
|
||||
{ 'data': 'vencimiento' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `<?= route_to('clienteList') ?>/${$(this).attr('data-id')}/edit`;
|
||||
theTable = $('#tableOfClientes').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfBrtip',
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[0, 'asc']],
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfClientes') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': 'alias' },
|
||||
{ 'data': 'cif' },
|
||||
{ 'data': 'email' },
|
||||
{ 'data': 'comercial' },
|
||||
{ 'data': 'forma_pago_id' },
|
||||
{ 'data': 'vencimiento' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
//window.location.href = `<?= site_url('/cliente/edit') ?>/${$(this).attr('data-id')}/edit`;
|
||||
window.location.href = `/clientes/cliente/edit/${$(this).attr('data-id')}`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Clientes.cliente'))]) ?>',
|
||||
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
|
||||
@ -125,7 +128,7 @@ $(document).on('click', '.btn-delete', function(e) {
|
||||
icon: 'success',
|
||||
title: data.msg ?? jqXHR.statusText,
|
||||
});
|
||||
|
||||
|
||||
theTable.clearPipeline();
|
||||
theTable.row($(row)).invalidate().draw();
|
||||
}).fail((jqXHR, textStatus, errorThrown) => {
|
||||
@ -137,11 +140,14 @@ $(document).on('click', '.btn-delete', function(e) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
@ -153,5 +159,5 @@ $(document).on('click', '.btn-delete', function(e) {
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<?= $this->endSection() ?>
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
@ -4,21 +4,22 @@
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('ComunidadesAutonomas.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="100" class="form-control" value="<?=old('nombre', $comunidadesAutonomasEntity->nombre) ?>">
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="100" class="form-control" value="<?=old('nombre', $comunidadAutonomaEntity->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="paisId" class="form-label">
|
||||
<?=lang('ComunidadesAutonomas.pais') ?>*
|
||||
<?=lang('ComunidadesAutonomas.paisId') ?>*
|
||||
</label>
|
||||
<select id="paisId" name="pais_id" required class="form-control select2bs" style="width: 100%;" >
|
||||
<option value=""><?=lang('Basic.global.pleaseSelectA', [lang('ComunidadesAutonomas.pais')]) ?></option>
|
||||
<select id="paisId" name="pais_id" required class="form-control select2bs2" style="width: 100%;" >
|
||||
|
||||
<?php foreach ($paisList as $item) : ?>
|
||||
<option value="<?=$item->id ?>"<?=$item->id==$comunidadesAutonomasEntity->pais_id ? ' selected':'' ?>>
|
||||
<?=$item->nombre ?>
|
||||
<?php if ( isset($paisList) && is_array($paisList) && !empty($paisList) ) :
|
||||
foreach ($paisList as $k => $v) : ?>
|
||||
<option value="<?=$k ?>"<?=$k==$comunidadAutonomaEntity->pais_id ? ' selected':'' ?>>
|
||||
<?=$v ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
@ -26,3 +26,40 @@
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
|
||||
$('#paisId').select2({
|
||||
theme: 'bootstrap-5',
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfPaises") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'id',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<?=$this->include('Themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?=$this->include('Themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('Themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?=$this->extend('Themes/'.config('Basics')->theme['name'].'/AdminLayout/defaultLayout') ?>
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('FormasPagoes.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $formaPagoEntity->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -1,7 +1,6 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->include("Themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("Themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend("Themes/" . config("Basics")->theme["name"] . "/AdminLayout/defaultLayout") ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@ -9,15 +8,15 @@
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form id="clienteForm" method="post" action="<?= $formAction ?>">
|
||||
<form id="formaDePagoForm" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= view("Themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/clientes/_clienteFormItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/configuracion/formasPagoViews/_formaDePagoFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("clienteList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<?= anchor(route_to("formaDePagoList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<input type="submit" class="btn btn-primary float-end" name="save" value="<?= lang("Basic.global.Save") ?>">
|
||||
</div><!-- /.card-footer -->
|
||||
</form>
|
||||
@ -0,0 +1,185 @@
|
||||
<?=$this->include('Themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('Themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?=$this->extend('Themes/'.config('Basics')->theme['name'].'/AdminLayout/defaultLayout') ?>
|
||||
<?=$this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('FormasPagoes.formaDePagoList') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('Themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfFormasdepagos" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
<th><?=lang('FormasPagoes.id')?></th>
|
||||
<th><?= lang('FormasPagoes.nombre') ?></th>
|
||||
<th><?= lang('FormasPagoes.createdAt') ?></th>
|
||||
<th><?= lang('FormasPagoes.updatedAt') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
<?=anchor(route_to('newFormaDePago'), lang('Basic.global.addNew').' '.lang('FormasPagoes.formaDePago'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfFormasdepagos').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-sm btn-warning btn-edit me-1" data-id="${data.id}"><?= lang('Basic.global.edit') ?></button>
|
||||
<button class="btn btn-sm btn-danger btn-delete ms-1" data-id="${data.id}"><?= lang('Basic.global.Delete') ?></button>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfFormasdepagos').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfrtipB', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[1, 'asc']],
|
||||
language: {
|
||||
url: "/assets/dt/<?= config('Basics')->languages[$currentLocale] ?? config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfFormasDePagos') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [0,lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': actionBtns },
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': 'created_at' },
|
||||
{ 'data': 'updated_at' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
|
||||
const dateCols = [3, 4];
|
||||
const shortDateFormat = '<?= convertPhpDateToMomentFormat('mm/dd/YYYY')?>';
|
||||
const dateTimeFormat = '<?= convertPhpDateToMomentFormat('mm/dd/YYYY h:i a')?>';
|
||||
|
||||
for (let coln of dateCols) {
|
||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||
const datestr = cell.innerHTML;
|
||||
const dateStrLen = datestr.toString().trim().length;
|
||||
if (dateStrLen > 0) {
|
||||
let dateTimeParts= datestr.split(/[- :]/); // regular expression split that creates array with: year, month, day, hour, minutes, seconds values
|
||||
dateTimeParts[1]--; // monthIndex begins with 0 for January and ends with 11 for December so we need to decrement by one
|
||||
const d = new Date(...dateTimeParts); // new Date(datestr);
|
||||
const md = moment(d);
|
||||
const usingThisFormat = dateStrLen > 11 ? dateTimeFormat : shortDateFormat;
|
||||
const formattedDateStr = md.format(usingThisFormat);
|
||||
cell.innerHTML = formattedDateStr;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `<?= route_to('formaDePagoList') ?>/${$(this).attr('data-id')}/edit`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('FormasPagoes.forma de pago'))]) ?>',
|
||||
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('formaDePagoList') ?>/${dataId}`,
|
||||
method: 'DELETE',
|
||||
}).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() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.css">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
@ -4,28 +4,28 @@
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('Paises.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $pais->nombre) ?>">
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $paisEntity->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="code" class="form-label">
|
||||
<?=lang('Paises.code') ?>*
|
||||
</label>
|
||||
<input type="text" id="code" name="code" required maxLength="2" class="form-control" value="<?=old('code', $pais->code) ?>">
|
||||
<input type="text" id="code" name="code" required maxLength="2" class="form-control" value="<?=old('code', $paisEntity->code) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="code3" class="form-label">
|
||||
<?=lang('Paises.code3') ?>
|
||||
</label>
|
||||
<input type="text" id="code3" name="code3" maxLength="3" class="form-control" value="<?=old('code3', $pais->code3) ?>">
|
||||
<input type="text" id="code3" name="code3" maxLength="3" class="form-control" value="<?=old('code3', $paisEntity->code3) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="moneda" class="form-label">
|
||||
<?=lang('Paises.moneda') ?>*
|
||||
</label>
|
||||
<input type="text" id="moneda" name="moneda" required maxLength="3" class="form-control" value="<?=old('moneda', $pais->moneda) ?>">
|
||||
<input type="text" id="moneda" name="moneda" required maxLength="3" class="form-control" value="<?=old('moneda', $paisEntity->moneda) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
@ -34,28 +34,28 @@
|
||||
<label for="urlErp" class="form-label">
|
||||
<?=lang('Paises.urlErp') ?>
|
||||
</label>
|
||||
<input type="url" id="urlErp" name="url_erp" maxLength="255" class="form-control" value="<?=old('url_erp', $pais->url_erp) ?>">
|
||||
<input type="url" id="urlErp" name="url_erp" maxLength="255" class="form-control" value="<?=old('url_erp', $paisEntity->url_erp) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="userErp" class="form-label">
|
||||
<?=lang('Paises.userErp') ?>
|
||||
</label>
|
||||
<input type="text" id="userErp" name="user_erp" maxLength="255" class="form-control" value="<?=old('user_erp', $pais->user_erp) ?>">
|
||||
<input type="text" id="userErp" name="user_erp" maxLength="255" class="form-control" value="<?=old('user_erp', $paisEntity->user_erp) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="keyErp" class="form-label">
|
||||
<?=lang('Paises.keyErp') ?>
|
||||
</label>
|
||||
<input type="text" id="keyErp" name="key_erp" maxLength="255" class="form-control" value="<?=old('key_erp', $pais->key_erp) ?>">
|
||||
<input type="text" id="keyErp" name="key_erp" maxLength="255" class="form-control" value="<?=old('key_erp', $paisEntity->key_erp) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="showErp" class="form-check-label">
|
||||
<input type="checkbox" id="showErp" name="show_erp" value="1" class="form-check-input"<?=$pais->show_erp== true ? 'checked' : ''; ?>>
|
||||
<input type="checkbox" id="showErp" name="show_erp" value="1" class="form-check-input"<?=$paisEntity->show_erp== true ? 'checked' : ''; ?>>
|
||||
<?=lang('Paises.showErp') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->include("Themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("Themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend("Themes/" . config("Basics")->theme["name"] . "/AdminLayout/defaultLayout") ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@ -8,20 +8,17 @@
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form id="paisForm" method="post" class="card-body" action="<?= $formAction ?>">
|
||||
<form id="paisForm" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<div class="card-body">
|
||||
<?= view("Themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/configuracion/paises/_paisFormItems") ?>
|
||||
<div class="pt-4">
|
||||
<input
|
||||
type="submit"
|
||||
class="btn btn-primary float-start me-sm-3 me-1"
|
||||
name="save"
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
/>
|
||||
<?= anchor(route_to("paisList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
</div><!-- /.card-footer -->
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("paisList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<input type="submit" class="btn btn-primary float-end" name="save" value="<?= lang("Basic.global.Save") ?>">
|
||||
</div><!-- /.card-footer -->
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
|
||||
@ -1,21 +1,22 @@
|
||||
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?=$this->include('Themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('Themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?=$this->extend('Themes/'.config('Basics')->theme['name'].'/AdminLayout/defaultLayout') ?>
|
||||
<?=$this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('Paises.paisList') ?></h3>
|
||||
<?=anchor(route_to('newPais'), lang('Basic.global.addNew').' '.lang('Paises.pais'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<?= view('Themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfPaises" class="table table-striped table-hover using-data-table" style="width: 100%;">
|
||||
<table id="tableOfPaises" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Paises.id') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
<th><?=lang('Paises.id')?></th>
|
||||
<th><?= lang('Paises.nombre') ?></th>
|
||||
<th><?= lang('Paises.code') ?></th>
|
||||
<th><?= lang('Paises.code3') ?></th>
|
||||
@ -28,56 +29,154 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($paisList as $item ) : ?>
|
||||
<tr>
|
||||
<td class="align-middle text-center">
|
||||
<?=$item->id ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->code) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->code3) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->moneda) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->url_erp) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->user_erp) || strlen($item->user_erp) < 51 ? esc($item->user_erp) : character_limiter(esc($item->user_erp), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->key_erp) || strlen($item->key_erp) < 51 ? esc($item->key_erp) : character_limiter(esc($item->key_erp), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle text-center text-green">
|
||||
|
||||
<?php if ( $item->show_erp ) { ?>
|
||||
|
||||
<i class="text-success bi bi-check-lg"></i>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
<td class="align-middle text-center text-nowrap">
|
||||
<?=anchor(route_to('editPais', $item->id), "<i class='ti ti-pencil ti-sm mx-2'></i>", ['class'=>'text-body', 'data-id'=>$item->id,]); ?>
|
||||
<?=anchor('#confirm2delete', "<i class='ti ti-trash ti-sm mx-2'></i>", ['class'=>'text-body', 'data-href'=>route_to('deletePais', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
|
||||
<?=anchor(route_to('newPais'), lang('Basic.global.addNew').' '.lang('Paises.pais'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfPaises').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-sm btn-warning btn-edit me-1" data-id="${data.id}"><?= lang('Basic.global.edit') ?></button>
|
||||
<button class="btn btn-sm btn-danger btn-delete ms-1" data-id="${data.id}"><?= lang('Basic.global.Delete') ?></button>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfPaises').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfrtipB', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[1, 'asc']],
|
||||
language: {
|
||||
url: "/assets/dt/<?= config('Basics')->languages[$currentLocale] ?? config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfPaises') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [0,lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': actionBtns },
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': 'code' },
|
||||
{ 'data': 'code3' },
|
||||
{ 'data': 'moneda' },
|
||||
{ 'data': 'url_erp' },
|
||||
{ 'data': 'user_erp' },
|
||||
{ 'data': 'key_erp' },
|
||||
{ 'data': 'show_erp' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
const boolCols = [9];
|
||||
for (let coln of boolCols) {
|
||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = cell.innerHTML == '1' ? '<i class="text-success bi bi-check-lg"></i>' : '';
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `<?= route_to('paisList') ?>/${$(this).attr('data-id')}/edit`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Paises.pais'))]) ?>',
|
||||
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('paisList') ?>/${dataId}`,
|
||||
method: 'DELETE',
|
||||
}).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() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.css">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="code" class="form-label">
|
||||
<?=lang('Provincias.code') ?>*
|
||||
</label>
|
||||
<input type="text" id="code" name="code" required maxLength="2" class="form-control" value="<?=old('code', $provinciaEntity->code) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('Provincias.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $provinciaEntity->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="paisId" class="form-label">
|
||||
<?=lang('Provincias.paisId') ?>*
|
||||
</label>
|
||||
<select id="paisId" name="pais_id" class="form-control select2bs2" style="width: 100%;" >
|
||||
|
||||
<?php if ( isset($paisList) && is_array($paisList) && !empty($paisList) ) :
|
||||
foreach ($paisList as $k => $v) : ?>
|
||||
<option value="<?=$k ?>"<?=$k==$provinciaEntity->pais_id ? ' selected':'' ?>>
|
||||
<?=$v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,63 @@
|
||||
<?= $this->include("Themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("Themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend("Themes/" . config("Basics")->theme["name"] . "/AdminLayout/defaultLayout") ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form id="provinciaForm" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("Themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/configuracion/provincias/_provinciaFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("provinciaList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<input type="submit" class="btn btn-primary float-end" name="save" value="<?= lang("Basic.global.Save") ?>">
|
||||
</div><!-- /.card-footer -->
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
|
||||
$('#paisId').select2({
|
||||
theme: 'bootstrap-5',
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfPaises") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -0,0 +1,190 @@
|
||||
<?=$this->include('Themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?=$this->include('Themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('Themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?=$this->extend('Themes/'.config('Basics')->theme['name'].'/AdminLayout/defaultLayout') ?>
|
||||
<?=$this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('Provincias.provinciaList') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('Themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfProvincias" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
<th><?=lang('Provincias.id')?></th>
|
||||
<th><?= lang('Provincias.code') ?></th>
|
||||
<th><?= lang('Provincias.nombre') ?></th>
|
||||
<th><?= lang('Paises.pais') ?></th>
|
||||
<th><?= lang('Provincias.createdAt') ?></th>
|
||||
<th><?= lang('Provincias.updatedAt') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
<?=anchor(route_to('newProvincia'), lang('Basic.global.addNew').' '.lang('Provincias.provincia'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfProvincias').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-sm btn-warning btn-edit me-1" data-id="${data.id}"><?= lang('Basic.global.edit') ?></button>
|
||||
<button class="btn btn-sm btn-danger btn-delete ms-1" data-id="${data.id}"><?= lang('Basic.global.Delete') ?></button>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfProvincias').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfrtipB', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[1, 'asc']],
|
||||
language: {
|
||||
url: "/assets/dt/<?= config('Basics')->languages[$currentLocale] ?? config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfProvincias') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [0,lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': actionBtns },
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'code' },
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': 'pais' },
|
||||
{ 'data': 'created_at' },
|
||||
{ 'data': 'updated_at' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
|
||||
const dateCols = [5, 6];
|
||||
const shortDateFormat = '<?= convertPhpDateToMomentFormat('mm/dd/YYYY')?>';
|
||||
const dateTimeFormat = '<?= convertPhpDateToMomentFormat('mm/dd/YYYY h:i a')?>';
|
||||
|
||||
for (let coln of dateCols) {
|
||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||
const datestr = cell.innerHTML;
|
||||
const dateStrLen = datestr.toString().trim().length;
|
||||
if (dateStrLen > 0) {
|
||||
let dateTimeParts= datestr.split(/[- :]/); // regular expression split that creates array with: year, month, day, hour, minutes, seconds values
|
||||
dateTimeParts[1]--; // monthIndex begins with 0 for January and ends with 11 for December so we need to decrement by one
|
||||
const d = new Date(...dateTimeParts); // new Date(datestr);
|
||||
const md = moment(d);
|
||||
const usingThisFormat = dateStrLen > 11 ? dateTimeFormat : shortDateFormat;
|
||||
const formattedDateStr = md.format(usingThisFormat);
|
||||
cell.innerHTML = formattedDateStr;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `<?= route_to('provinciaList') ?>/${$(this).attr('data-id')}/edit`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Provincias.provincia'))]) ?>',
|
||||
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('provinciaList') ?>/${dataId}`,
|
||||
method: 'DELETE',
|
||||
}).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() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.css">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
@ -37,65 +37,64 @@
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfTarifasmanipulado').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i>
|
||||
<i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}"></i>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfTarifasmanipulado').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfBrtip',
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[0, 'asc']],
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfTarifasManipulado') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
const lastColNr = $('#tableOfTarifasmanipulado').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i>
|
||||
<i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}"></i>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
|
||||
|
||||
|
||||
theTable = $('#tableOfTarifasmanipulado').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfBrtip',
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[0, 'asc']],
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfTarifasManipulado') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
//window.location.href = `<?= route_to('tarifaManipuladoList') ?>/${$(this).attr('data-id')}/edit`;
|
||||
window.location.href = `/tarifas/tarifasmanipulado/edit/${$(this).attr('data-id')}`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Tarifamanipulado.tarifa manipulado'))]) ?>',
|
||||
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
|
||||
@ -132,8 +131,6 @@ $(document).on('click', '.btn-delete', function(e) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
<script src="<?= site_url('themes/focus2/vendor/timeago/jquery.timeago.js'); ?>"></script>
|
||||
<script src="<?= site_url('themes/focus2/vendor/timeago/locales/jquery.timeago.'.langJS().'.js'); ?>"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
$(document).ready(function () {
|
||||
let time_ago = document.getElementsByClassName("timeAgo");
|
||||
for (let i = 0; i < time_ago.length; i++) {
|
||||
time_ago[i].innerText = jQuery.timeago(time_ago[i].innerText)
|
||||
}
|
||||
});
|
||||
(function($) {
|
||||
"use strict"
|
||||
window.addEventListener('resize', function(e){
|
||||
let body = document.querySelector('body');
|
||||
let ws = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
let mw = document.getElementById('main-wrapper');
|
||||
if(ws>=1216){
|
||||
body.setAttribute('data-sidebar-style', 'full');
|
||||
body.setAttribute('data-sidebar-position', 'fixed');
|
||||
body.setAttribute('data-header-position', 'fixed');
|
||||
mw.classList.remove('menu-toggle');
|
||||
}else if(ws<1216 && ws>=768){
|
||||
body.setAttribute('data-sidebar-style', 'mini');
|
||||
mw.classList.add('menu-toggle');
|
||||
body.setAttribute('data-sidebar-position', 'fixed');
|
||||
body.setAttribute('data-header-position', 'fixed');
|
||||
}else{
|
||||
body.setAttribute('data-sidebar-style', 'overlay');
|
||||
mw.classList.remove('menu-toggle');
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
<div class="footer">
|
||||
<div class="copyright">
|
||||
<p>Copyright © Designed by <a href="https://quixkit.com/" target="_blank">Quixkit</a> & Developed by <a href="https://eduardofiorini.com/" target="_blank">Eduardo Fiorini</a> - WebGuard v1.2.0 </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,130 +0,0 @@
|
||||
<?php
|
||||
$settings = session()->get('settings');
|
||||
$picture = session()->get('picture');
|
||||
$pulse = session()->get('pulse');
|
||||
$notification = session()->get('notification');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= $settings['default_language']??'en'=='pt' ? 'pt-br' : $settings['default_language']??'en' ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title><?= lang("App.dashboard_title") ?> - <?= $settings['title']??'' ?></title>
|
||||
<!-- Favicon icon -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<?=site_url('themes/focus2/images/favicon.png')?>">
|
||||
<link href="<?=site_url('themes/focus2/vendor/owl-carousel/css/owl.carousel.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/owl-carousel/css/owl.theme.default.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/jqvmap/css/jqvmap.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/datatables/css/jquery.dataTables.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/select2/css/select2.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/sweetalert2/dist/sweetalert2.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/lou-multi-select/css/multi-select.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/nestable2/css/jquery.nestable.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/toastr/css/toastr.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/css/style.css')?>" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<!--PreLoader-->
|
||||
<div id="preloader">
|
||||
<div class="sk-three-bounce">
|
||||
<div class="sk-child sk-bounce1"></div>
|
||||
<div class="sk-child sk-bounce2"></div>
|
||||
<div class="sk-child sk-bounce3"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Main Wrapper-->
|
||||
<div id="main-wrapper">
|
||||
<!--Nav Header-->
|
||||
<div class="nav-header">
|
||||
<a href="<?=site_url('home')?>" class="brand-logo">
|
||||
<img class="logo-abbr" src="<?=site_url('themes/focus2/images/logo.png')?>" alt="">
|
||||
<img class="logo-compact" src="<?=site_url('themes/focus2/images/logo-text.png')?>" alt="">
|
||||
<img class="brand-title" src="<?=site_url('themes/focus2/images/logo-text.png')?>" alt="">
|
||||
</a>
|
||||
<div class="nav-control">
|
||||
<div class="hamburger">
|
||||
<span class="line"></span><span class="line"></span><span class="line"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Header-->
|
||||
<div class="header">
|
||||
<div class="header-content">
|
||||
<nav class="navbar navbar-expand">
|
||||
<div class="collapse navbar-collapse justify-content-between">
|
||||
<div class="header-left"></div>
|
||||
<ul class="navbar-nav header-right">
|
||||
<li class="nav-item dropdown notification_dropdown">
|
||||
<a class="nav-link" href="#" role="button" data-toggle="dropdown">
|
||||
<i class="fas fa-bell"></i>
|
||||
<?php if ($pulse > 0) : ?>
|
||||
<div class="pulse-css text-danger"></div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<ul class="list-unstyled">
|
||||
<?php foreach ($notification??[] as $item) : ?>
|
||||
<a href="<?=site_url('my/notification_view/'.$item['token'])?>">
|
||||
<li class="media dropdown-item">
|
||||
<?php if ($item['is_read']) : ?>
|
||||
<span class="success"><i class="far fa-envelope-open"></i> </span>
|
||||
<?php else : ?>
|
||||
<span class="primary"><i class="far fa-envelope"></i> </span>
|
||||
<?php endif; ?>
|
||||
<div class="media-body">
|
||||
<p><?=$item['title']?></p>
|
||||
</div>
|
||||
<span class="notify-time timeAgo"><?=$item['created_at']?></span>
|
||||
</li>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<a class="all-notification" href="<?=site_url('my/notification')?>"><?= lang("App.notification_bell_btn") ?> <i class="ti-arrow-right"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown header-profile">
|
||||
<a class="nav-link" href="#" role="button" data-toggle="dropdown">
|
||||
<i class="fas fa-globe-americas"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a href="<?= site_url('lang/en'); ?>" class="dropdown-item">
|
||||
<img src="<?=site_url('assets/flags/us_32_circle.png')?>">
|
||||
<span class="ml-2"><?= lang("App.lang_en") ?></span>
|
||||
</a>
|
||||
<a href="<?= site_url('lang/es'); ?>" class="dropdown-item">
|
||||
<img src="<?=site_url('assets/flags/es_32_circle.png')?>">
|
||||
<span class="ml-2"><?= lang("App.lang_es") ?></span>
|
||||
</a>
|
||||
<a href="<?= site_url('lang/pt'); ?>" class="dropdown-item">
|
||||
<img src="<?=site_url('assets/flags/br_32_circle.png')?>">
|
||||
<span class="ml-2"><?= lang("App.lang_pt") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown header-profile">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<img src="<?= $picture??''?>" class="btn-circle btn-circle-sm" style="width: 50px ; height: 50px;">
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a href="<?= site_url('profile'); ?>" class="dropdown-item">
|
||||
<i class="fas fa-user"></i>
|
||||
<span class="ml-2"><?= lang("App.menu_profile") ?></span>
|
||||
</a>
|
||||
<a href="<?= site_url('activity'); ?>" class="dropdown-item">
|
||||
<i class="fas fa-list"></i>
|
||||
<span class="ml-2"><?= lang("App.menu_activity") ?></span>
|
||||
</a>
|
||||
<a href="<?= site_url('login/logout'); ?>" class="dropdown-item">
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
<span class="ml-2"><?= lang("App.menu_logout") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<?php include "menu.php" ?>
|
||||
|
||||
@ -1,61 +0,0 @@
|
||||
<?php $menus = getMenuControl(); ?>
|
||||
<!--Sidebar-->
|
||||
<div class="quixnav">
|
||||
<div class="quixnav-scroll">
|
||||
<ul class="metismenu" id="menu">
|
||||
<li><a href="/" aria-expanded="false"><i class="fas fa-th-large"></i><span class="nav-text"><?= lang("App.menu_dashboard") ?></span></a></li>
|
||||
<?php if (count(getArrayItem($menus,'name','User')) > 0): ?>
|
||||
<li class="nav-label"><?= lang("App.menu_registration") ?></li>
|
||||
<li><a class="has-arrow" href="javascript:void()" aria-expanded="false"><i class="fas fa-user-friends"></i><span class="nav-text"><?= lang("App.menu_users") ?></span></a>
|
||||
<ul aria-expanded="false">
|
||||
<?php if (count(getArrayItem($menus,'methods','index',true)) > 0): ?>
|
||||
<li><a href="/user"><?= lang("App.menu_list") ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($menus,'methods','add',true)) > 0): ?>
|
||||
<li><a href="/user/add"><?= lang("App.menu_add") ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($menus,'name','Group')) > 0): ?>
|
||||
<li><a class="has-arrow" href="javascript:void()" aria-expanded="false"><i class="fas fa-user-lock"></i><span class="nav-text"><?= lang("App.menu_permission_group") ?></span></a>
|
||||
<ul aria-expanded="false">
|
||||
<?php if (count(getArrayItem($menus,'methods','index',true)) > 0): ?>
|
||||
<li><a href="/group"><?= lang("App.menu_list") ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($menus,'methods','add',true)) > 0): ?>
|
||||
<li><a href="/group/add"><?= lang("App.menu_add") ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($menus,'name','Notification')) > 0): ?>
|
||||
<li><a class="has-arrow" href="javascript:void()" aria-expanded="false"><i class="fas fa-bell"></i><span class="nav-text"><?= lang("App.menu_notification") ?></span></a>
|
||||
<ul aria-expanded="false">
|
||||
<?php if (count(getArrayItem($menus,'methods','index',true)) > 0): ?>
|
||||
<li><a href="/notification"><?= lang("App.menu_list") ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($menus,'methods','add',true)) > 0): ?>
|
||||
<li><a href="/notification/add"><?= lang("App.menu_add") ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($menus,'name','Settings')) > 0): ?>
|
||||
<li class="nav-label"><?= lang("App.menu_settings") ?></li>
|
||||
<?php if (count(getArrayItem($menus,'methods','index',true)) > 0): ?>
|
||||
<li><a href="/settings" aria-expanded="false"><i class="fas fa-sliders-h"></i><span class="nav-text"><?= lang("App.menu_general") ?></span></a></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count(getArrayItem($menus,'methods','template',true)) > 0): ?>
|
||||
<li><a href="/settings/template" aria-expanded="false"><i class="fas fa-mail-bulk"></i><span class="nav-text"><?= lang("App.menu_template") ?></span></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<li class="nav-label"></li>
|
||||
<?php if (count(getArrayItem($menus,'name','Activity')) > 0): ?>
|
||||
<li><a href="/activity" aria-expanded="false"><i class="fas fa-list"></i><span class="nav-text"><?= lang("App.menu_activity") ?></span></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="/login/logout" aria-expanded="false"><i class="fas fa-sign-out-alt"></i><span class="nav-text"><?= lang("App.menu_logout") ?></span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user