mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadida columna cliente a la lista de usuarios
This commit is contained in:
@ -52,6 +52,8 @@ return [
|
||||
'editor' => 'Editor',
|
||||
'beta' => 'Beta',
|
||||
|
||||
'cliente' => 'Cliente',
|
||||
|
||||
'errors' => [
|
||||
'cliente_sin_clienteID' => 'El usuario debe de tener un cliente asignado cuando se usa algún rol de cliente.',
|
||||
],
|
||||
|
||||
@ -27,7 +27,8 @@ class UserModel extends ShieldUserModel
|
||||
1 => "t1.first_name",
|
||||
2 => "t1.last_name",
|
||||
3 => "t2.secret",
|
||||
4 => "t1.last_active",
|
||||
4 => "t3.nombre",
|
||||
5 => "t1.last_active",
|
||||
];
|
||||
|
||||
protected $returnType = UsersEntity::class;
|
||||
@ -79,10 +80,12 @@ class UserModel extends ShieldUserModel
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.id as id, t1.first_name AS first_name, t1.last_name AS last_name,
|
||||
t2.secret AS email, t1.last_active AS last_active"
|
||||
t2.secret AS email, t1.last_active AS last_active, t3.nombre AS cliente"
|
||||
);
|
||||
|
||||
$builder->join("auth_identities t2", "t1.id = t2.user_id", "left");
|
||||
$builder->join("clientes t3", "t1.cliente_id = t3.id", "left");
|
||||
|
||||
$builder->where('t1.deleted_at', null)->groupBy("t1.id");
|
||||
|
||||
if (empty($search))
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
<th><?= lang('Users.firstName') ?></th>
|
||||
<th><?= lang('Users.lastName') ?></th>
|
||||
<th><?= lang('Users.email') ?></th>
|
||||
<th><?= lang('Users.cliente') ?></th>
|
||||
<th class="noFilter"><?= lang('Users.lastAccess') ?></th>
|
||||
<th class="noFilter text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
|
||||
@ -80,8 +80,8 @@ class UserList {
|
||||
{ 'data': 'first_name' },
|
||||
{ 'data': 'last_name' },
|
||||
{ 'data': 'email' },
|
||||
{ 'data': 'cliente' },
|
||||
{ 'data': 'last_active' },
|
||||
|
||||
];
|
||||
|
||||
const actions = ['edit', 'delete'];
|
||||
|
||||
Reference in New Issue
Block a user