mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminado tickets. faltan respuestas
This commit is contained in:
@ -1,21 +1,40 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section('content'); ?>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="imageModal" tabindex="-1" aria-labelledby="imageModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="imageModalLabel">Vista Previa</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Cerrar"></button>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<img src="" id="modalImage" class="img-fluid rounded">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4><?= lang("Tickets.createTicket") ?></h4>
|
||||
<h4><?= $boxTitle ?></h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post" class="card-body" action="<?= $formAction ?>" enctype="multipart/form-data">
|
||||
<?= csrf_field(); ?>
|
||||
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<div class="row">
|
||||
<div class="mb-3 col-9">
|
||||
<label class="form-label"><?= lang("Tickets.asunto") ?></label>
|
||||
<input type="text" name="titulo" class="form-control" required>
|
||||
<input type="text" name="titulo" class="form-control"
|
||||
<?= ($formAction === route_to('updateTicket', $ticket->id))?"readonly":"" ?>
|
||||
value="<?= old('titulo', $ticket->titulo) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -23,9 +42,11 @@
|
||||
|
||||
<div class="col-3 mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.tipo") ?></label>
|
||||
<select id="categoria" name="categoria_id" class="form-control select2">
|
||||
<select id="categoria" name="categoria_id" class="form-control select2"
|
||||
<?= ($formAction === route_to('updateTicket', $ticket->id) && !auth()->user()->can('tickets.edit'))?"disabled":"" ?>>
|
||||
<?php foreach ($categorias as $categoria): ?>
|
||||
<option value="<?= $categoria['id']; ?>"><?= $categoria['text']; ?></option>
|
||||
<option value="<?= $categoria['id']; ?>" <?= $categoria['id'] == $ticket->categoria_id ? ' selected' : '' ?>> <?= $categoria['text']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
@ -33,18 +54,25 @@
|
||||
|
||||
<div class="col-3 mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.seccion") ?></label>
|
||||
<select id="seccion" name="seccion_id" class="form-control select2">
|
||||
<select id="seccion" name="seccion_id" class="form-control select2"
|
||||
<?= ($formAction === route_to('updateTicket', $ticket->id) && !auth()->user()->can('tickets.edit'))?"disabled":"" ?>>
|
||||
<?php foreach ($secciones as $seccion): ?>
|
||||
<option value="<?= $seccion['id']; ?>"><?= $seccion['text']; ?></option>
|
||||
<option value="<?= $seccion['id']; ?>" <?= $seccion['id'] == $ticket->seccion_id ? ' selected' : '' ?>><?= $seccion['text']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-3 mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.estado") ?></label>
|
||||
<select id="estado" name="estado_id" class="form-control select2" disabled>
|
||||
<?php if ($formAction !== route_to('NewTicket') && auth()->user()->can('tickets.edit')): ?>
|
||||
<select id="estado" name="estado_id" class="form-control select2">
|
||||
<?php else: ?>
|
||||
<select id="estado" name="estado_id" class="form-control select2" disabled>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($estados as $estado): ?>
|
||||
<option value="<?= $estado['id']; ?>"><?= $estado['text']; ?></option>
|
||||
<option value="<?= $estado['id']; ?>" <?= $estado['id'] == $ticket->estado_id ? ' selected' : '' ?>><?= $estado['text']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
@ -57,15 +85,25 @@
|
||||
<div class="mb-3 col-3">
|
||||
<label class="form-label"><?= lang('Tickets.prioridad') ?></label>
|
||||
<select id="prioridad" name="prioridad" class="form-control">
|
||||
<option value="alta"><?= lang('Tickets.alta') ?></option>
|
||||
<option value="media" selected><?= lang('Tickets.media') ?></option>
|
||||
<option value="baja"><?= lang('Tickets.baja') ?></option>
|
||||
<option value="baja" <?= $ticket->prioridad == 'baja' ? ' selected' : '' ?>>
|
||||
<?= lang('Tickets.alta') ?>
|
||||
</option>
|
||||
<option value="media" <?= $ticket->prioridad == 'media' ? ' selected' : '' ?>>
|
||||
<?= lang('Tickets.media') ?>
|
||||
</option>
|
||||
<option value="alta" <?= $ticket->prioridad == 'alta' ? ' selected' : '' ?>>
|
||||
<?= lang('Tickets.baja') ?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-3">
|
||||
<label class="form-label"><?= lang('Tickets.asignarTo') ?></label>
|
||||
<select id="supportUser" name="supportUser" class="form-control">
|
||||
<?php foreach ($supportUsers as $supportUser): ?>
|
||||
<option value="<?= $supportUser['id']; ?>" <?= $supportUser['id'] == $ticket->user_soporte_id ? ' selected' : '' ?>><?= $supportUser['name']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -75,63 +113,51 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.descripcion") ?></label>
|
||||
<textarea id="descripcion" name="descripcion" class="form-control" rows="4" required></textarea>
|
||||
<textarea id="descripcion" name="descripcion" class="form-control"
|
||||
<?= ($formAction === route_to('updateTicket', $ticket->id))?"readonly":"" ?>
|
||||
rows="4"><?= old('descripcion', $ticket->descripcion) ?></textarea>
|
||||
</div>
|
||||
|
||||
<?php if ($formAction === route_to('NewTicket')): ?>
|
||||
|
||||
<h4><?= lang("Tickets.adjuntos") ?></h4>
|
||||
<div class="row">
|
||||
<div class="mb-3">
|
||||
<label for="filesInput" class="form-label"><?=lang("Tickets.adjuntos")?></label>
|
||||
<input name="files[]" class="form-control" type="file" id="filesInput" multiple accept="image/*">
|
||||
<label for="filesInput" class="form-label"><?= lang("Tickets.adjuntos") ?></label>
|
||||
<input name="files[]" class="form-control" type="file" id="filesInput" multiple
|
||||
accept="image/*">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php else: /*?>
|
||||
<div id="carouselInput" class="carousel slide" data-bs-ride="carousel">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
<a href="ruta-imagen-1.jpg" data-bs-toggle="lightbox">
|
||||
<img src="ruta-imagen-1.jpg" class="d-block w-100" alt="Imagen 1">
|
||||
</a>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<a href="ruta-imagen-2.jpg" data-bs-toggle="lightbox">
|
||||
<img src="ruta-imagen-2.jpg" class="d-block w-100" alt="Imagen 2">
|
||||
</a>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<a href="ruta-imagen-3.jpg" data-bs-toggle="lightbox">
|
||||
<img src="ruta-imagen-3.jpg" class="d-block w-100" alt="Imagen 3">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<h4><?= lang("Tickets.adjuntos_ticket") ?></h4>
|
||||
<div class="container">
|
||||
<?php foreach ($imagesTicket as $image): ?>
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<img src="<?= esc($image['path']) ?>" class="img-thumbnail img-fluid gallery-img"
|
||||
data-bs-toggle="modal" data-bs-target="#imageModal" data-src="<?= esc($image['path']) ?>"
|
||||
style="cursor:pointer;">
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<!-- Controles del carrusel -->
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExample"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#carouselExample"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Lightbox (usando Bootstrap Modal) -->
|
||||
<div id="lightboxModal" class="modal fade" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<img id="lightboxImage" src="" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-4">
|
||||
<?php if ($formAction === route_to('NewTicket') ||
|
||||
($formAction === route_to('updateTicket', $ticket->id) && auth()->user()->can('tickets.edit'))): ?>
|
||||
<input
|
||||
type="submit"
|
||||
class="btn btn-primary float-start me-sm-3 me-1"
|
||||
name="save"
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
/>
|
||||
<?php endif; ?>
|
||||
<?= anchor(route_to("TicketIndex"), lang("Basic.global.back"), ["class" => "btn btn-secondary"]) ?>
|
||||
|
||||
<?php */ endif; ?>
|
||||
|
||||
<button type="submit" class="btn btn-primary"><?= lang("Tickets.createTicket") ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfTieckets" class="table table-striped table-hover using-exportable-data-table"
|
||||
<table id="tableOfTickets" class="table table-striped table-hover using-exportable-data-table"
|
||||
style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -21,10 +21,10 @@
|
||||
<th><?= lang('Tickets.tipo') ?></th>
|
||||
<th><?= lang('Tickets.seccion') ?></th>
|
||||
<th><?= lang('Tickets.estado') ?></th>
|
||||
<th><?= lang('Tickets.prioridad') ?></th>
|
||||
<th style="display: none;"><?= lang('Tickets.prioridad') ?></th>
|
||||
<th><?= lang('Tickets.asunto') ?></th>
|
||||
<th><?= lang('Tickets.usuario') ?></th>
|
||||
<th><?= lang('Tickets.asignarTo') ?></th>
|
||||
<th style="display: none;"><?= lang('Tickets.usuario') ?></th>
|
||||
<th style="display: none;"><?= lang('Tickets.asignarTo') ?></th>
|
||||
<th><?= lang('Tickets.fechaCreacion') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
@ -49,6 +49,11 @@
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
|
||||
<script>
|
||||
window.userType = <?= $userType ?>;
|
||||
</script>
|
||||
|
||||
<script
|
||||
src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/dataTables.buttons.min.js") ?>"></script>
|
||||
<script
|
||||
@ -59,6 +64,7 @@
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/pdfmake.min.js") ?>"
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/vfs_fonts.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.colVis.min.js") ?>"></script>
|
||||
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/soporte/tickets.js') ?>"></script>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
Reference in New Issue
Block a user