mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido cliente id a users
This commit is contained in:
@ -73,5 +73,22 @@
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="cliente_id" class="form-label">
|
||||
<?= lang('Presupuestos.clienteId') ?>
|
||||
</label>
|
||||
<select id="cliente_id" name="cliente_id" class="form-control select2bs2" style="width: 100%;">
|
||||
|
||||
<?php if (isset($clienteList) && is_array($clienteList) && !empty($clienteList)) :
|
||||
foreach ($clienteList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" <?= $k == $user->cliente_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -1,4 +1,5 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
@ -28,3 +29,33 @@
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
$('#cliente_id').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfClientes") ?>',
|
||||
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() ?>
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
<tr>
|
||||
<th><?= lang('Users.firstName') ?></th>
|
||||
<th><?= lang('Users.lastName') ?></th>
|
||||
<th><?= lang('Users.lastAccess') ?></th>
|
||||
<?php /*
|
||||
<th><?= lang('Users.group') ?></th>
|
||||
<th><?= lang('Users.lastAccess') ?></th>
|
||||
<?php /*
|
||||
<th><?= lang('Users.mobile') ?></th>
|
||||
<th><?= lang('Users.email') ?></th>
|
||||
<th><?= lang('Users.address') ?></th>
|
||||
@ -38,7 +38,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($userList as $item ) : ?>
|
||||
<?php foreach ($userList2 as $item ) : ?>
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->first_name) || strlen($item->first_name) < 51 ? esc($item->first_name) : character_limiter(esc($item->first_name), 50) ?>
|
||||
@ -46,6 +46,9 @@
|
||||
<td class="align-middle">
|
||||
<?= empty($item->last_name) || strlen($item->last_name) < 51 ? esc($item->last_name) : character_limiter(esc($item->last_name), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->group) ? "" : character_limiter(esc(lang('Users.' . $item->group)), 50) ?>
|
||||
</td>
|
||||
|
||||
<td class="align-middle text-nowrap">
|
||||
<?= empty($item->last_active) ? '' : date('d/m/Y H:m:s', strtotime($item->last_active)) ?>
|
||||
|
||||
Reference in New Issue
Block a user