mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
corregidos problemas
This commit is contained in:
@ -153,7 +153,10 @@ class Ticketcontroller extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
|
||||
$ticket = $this->model->find($id);
|
||||
$ticket = $this->model->select("tickets.*, CONCAT(users.first_name, ' ',users.last_name) as usuario_ticket")
|
||||
->join('users', 'users.id = tickets.usuario_id', 'left')
|
||||
->where('tickets.id', $id)->first();
|
||||
|
||||
|
||||
if ($ticket == false):
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Tickets.ticket')), $id]);
|
||||
|
||||
@ -97,6 +97,16 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if($formAction !== route_to('NewTicket')): ?>
|
||||
<div class="mb-3 col-3">
|
||||
<label class="form-label"><?= lang('Tickets.usuario') ?></label>
|
||||
<input readonly type="text" name="titulo" class="form-control"
|
||||
value="<?= old('titulo', $ticket->usuario_ticket) ?>">
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mb-3 col-3">
|
||||
<label class="form-label"><?= lang('Tickets.asignarTo') ?></label>
|
||||
<select id="user_soporte_id" name="user_soporte_id" class="form-control">
|
||||
@ -125,7 +135,9 @@
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.respuesta") ?></label>
|
||||
<textarea id="respuestaMensaje" name="respuesta_mensaje" class="form-control"
|
||||
<?= !auth()->user()->can('tickets.edit') ? "readonly" : "" ?>
|
||||
<?php if (!in_array(auth()->user()->id, $supportUsers)){
|
||||
echo "readonly";
|
||||
} ?>
|
||||
rows="4"><?= isset($respuesta) ? old('respuestaMensaje', $respuesta->mensaje) : "" ?></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
@ -128,11 +128,8 @@ class Ticket {
|
||||
buttonsExport: true,
|
||||
});
|
||||
|
||||
this.table.table.on('init.dt', function () {
|
||||
|
||||
self.table.table.one('xhr.dt', function () {
|
||||
self.table.table.page.len(100).draw();
|
||||
self.table.table.draw();
|
||||
|
||||
});
|
||||
|
||||
this.table.setEditCallback(function (id) {
|
||||
|
||||
Reference in New Issue
Block a user