mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
messages departments section
This commit is contained in:
@ -26,11 +26,11 @@
|
||||
</div>
|
||||
<hr class="container-m-nx m-0" />
|
||||
<div class="sidebar-body">
|
||||
<div class="chat-contact-list-item-title">
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
<div class="mb-0 px-4 pt-3 pb-2">
|
||||
<select class="form-control chat-search-client"></select>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="chat-contact-list-item-title">
|
||||
<h5 class="text-primary mb-0 px-4 pt-3 pb-2">Departamentos</h5>
|
||||
</div>
|
||||
@ -68,18 +68,22 @@
|
||||
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-danger btn-sm exit-chat">
|
||||
<i class="ti ti-trash"></i>
|
||||
<?= lang('Chat.exit_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-success btn-sm subscribe-chat">
|
||||
<i class="ti ti-plus"></i>
|
||||
<?= lang('Chat.subscribe_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-danger btn-sm exit-chat">
|
||||
<i class="ti ti-trash"></i>
|
||||
<?= lang('Chat.exit_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-success btn-sm subscribe-chat">
|
||||
<i class="ti ti-plus"></i>
|
||||
<?= lang('Chat.subscribe_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="dropdown d-flex align-self-center ml-2 px-2 d-none" id="chat-header-dropdown-users">
|
||||
<button type="button" class="btn btn-primary btn-icon rounded-pill dropdown-toggle hide-arrow" data-bs-toggle="dropdown">
|
||||
<i class="ti ti-users"></i>
|
||||
@ -117,11 +121,19 @@
|
||||
placeholder="<?= lang('Chat.write_message_placeholder') ?>" />
|
||||
<div class="message-actions d-flex align-items-center">
|
||||
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment" disabled>
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment" disabled>
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
<?php else : ?>
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment-client">
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -27,9 +27,11 @@
|
||||
<hr class="container-m-nx m-0" />
|
||||
<div class="sidebar-body">
|
||||
<div class="chat-contact-list-item-title">
|
||||
<div class="mb-0 px-4 pt-3 pb-2">
|
||||
<select class="form-control chat-search-client"></select>
|
||||
</div>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
<div class="mb-0 px-4 pt-3 pb-2">
|
||||
<select class="form-control chat-search-client"></select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="chat-contact-list-item-title">
|
||||
<h5 class="text-primary mb-0 px-4 pt-3 pb-2">Departamentos</h5>
|
||||
@ -65,18 +67,21 @@
|
||||
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-danger btn-sm exit-chat">
|
||||
<i class="ti ti-trash"></i>
|
||||
<?= lang('Chat.exit_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-success btn-sm subscribe-chat">
|
||||
<i class="ti ti-plus"></i>
|
||||
<?= lang('Chat.subscribe_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-danger btn-sm exit-chat">
|
||||
<i class="ti ti-trash"></i>
|
||||
<?= lang('Chat.exit_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-success btn-sm subscribe-chat">
|
||||
<i class="ti ti-plus"></i>
|
||||
<?= lang('Chat.subscribe_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="dropdown d-flex align-self-center ml-2 px-2 d-none" id="chat-header-dropdown-users">
|
||||
<button type="button" class="btn btn-primary btn-icon rounded-pill dropdown-toggle hide-arrow" data-bs-toggle="dropdown">
|
||||
<i class="ti ti-users"></i>
|
||||
@ -113,12 +118,19 @@
|
||||
<input class="form-control message-input border-0 me-3 shadow-none"
|
||||
placeholder="<?= lang('Chat.write_message_placeholder') ?>" />
|
||||
<div class="message-actions d-flex align-items-center">
|
||||
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment" disabled>
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment" disabled>
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
<?php else : ?>
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment-client">
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -26,9 +26,11 @@
|
||||
<hr class="container-m-nx m-0" />
|
||||
<div class="sidebar-body">
|
||||
<div class="chat-contact-list-item-title">
|
||||
<div class="mb-0 px-4 pt-3 pb-2">
|
||||
<select class="form-control chat-search-client"></select>
|
||||
</div>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
<div class="mb-0 px-4 pt-3 pb-2">
|
||||
<select class="form-control chat-search-client"></select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="chat-contact-list-item-title">
|
||||
@ -67,18 +69,21 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-danger btn-sm exit-chat">
|
||||
<i class="ti ti-trash"></i>
|
||||
<?= lang('Chat.exit_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-success btn-sm subscribe-chat">
|
||||
<i class="ti ti-plus"></i>
|
||||
<?= lang('Chat.subscribe_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-danger btn-sm exit-chat">
|
||||
<i class="ti ti-trash"></i>
|
||||
<?= lang('Chat.exit_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="ml-2 px-2">
|
||||
<button type="button" class="btn btn-success btn-sm subscribe-chat">
|
||||
<i class="ti ti-plus"></i>
|
||||
<?= lang('Chat.subscribe_chat') ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="dropdown d-flex align-self-center ml-2 px-2 d-none" id="chat-header-dropdown-users">
|
||||
<button type="button" class="btn btn-primary btn-icon rounded-pill dropdown-toggle hide-arrow" data-bs-toggle="dropdown">
|
||||
<i class="ti ti-users"></i>
|
||||
@ -112,12 +117,20 @@
|
||||
<input class="form-control message-input border-0 me-3 shadow-none"
|
||||
placeholder="<?= lang('Chat.write_message_placeholder') ?>" />
|
||||
<div class="message-actions d-flex align-items-center">
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment" disabled>
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
<?php else : ?>
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment-client">
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<button type="button" class="btn btn-primary d-flex send-msg-btn" style="color:white"
|
||||
id="send-msg-btn-deparment" disabled>
|
||||
<i class="ti ti-send me-md-1 me-0"></i>
|
||||
<span class="align-middle d-md-inline-block">Enviar</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
<form id="<?=$id?>" data-id="<?= $entity->id ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-12 mb-2">
|
||||
<label for="chat-department-display"><?= lang('Chat.datatable_departments.name') ?></label>
|
||||
<input type="text" name="display" id="chat-department-display" value="<?= $entity->display ?>" class="form-control" />
|
||||
</div>
|
||||
<div class="col-md-12 mb-2">
|
||||
<label for="chat-department-description"><?= lang('Chat.datatable_departments.description') ?></label>
|
||||
<textarea rows="5" cols="5" type="text" name="description" id="chat-department-description" class="form-control"><?= $entity->description ?></textarea>
|
||||
</div>
|
||||
<div class="col-md-12 mb-5">
|
||||
<button type="button" class="btn btn-primary w-100" id="btn-chat-department-update"><i class="ti icon-base ti-refresh me-2"></i>
|
||||
<?= lang("App.global_save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<div class="accordion accordion-bordered" id="accordionChatDepartmentUser">
|
||||
<div class="card accordion-item active">
|
||||
<h2 class="accordion-header">
|
||||
<button type="button" class="accordion-button" data-bs-toggle="collapse"
|
||||
data-bs-target="#accordionChatDepartmentUserTip" aria-expanded="false"
|
||||
aria-controls="accordionChatDepartmentUserTip">
|
||||
<h4><?= lang("Chat.department_users") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="accordionChatDepartmentUserTip" class="accordion-collapse"
|
||||
data-bs-parent="#accordionChatDepartment">
|
||||
<div class="accordion-body">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<select id="selectChatDepartmentUser" class="select2 form-select" data-allow-clear="true"></select>
|
||||
<div id="floatingInputHelp" class="form-text"><?=lang('Chat.help_select_chat_department_user')?></div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-primary w-100" id="add-user-admin-chat-department"><i class="ti icon-base ti-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<?= view("themes/vuexy/components/tables/chat_department_users_table", ["id" => "tableChatDepartmentUsers", "entity" => $entity]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -0,0 +1,12 @@
|
||||
<table id="<?= $id ?>" class="table table-striped table-hover" style="width: 100%;" data-id="<?= $entity->id ?>">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Chat.datatable_department_users.name') ?></th>
|
||||
<th><?= lang('Chat.datatable_department_users.user') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@ -0,0 +1,13 @@
|
||||
<table id="<?= $id ?>" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?= lang('Chat.datatable_departments.name') ?></th>
|
||||
<th><?= lang('Chat.datatable_departments.description') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@ -0,0 +1,54 @@
|
||||
<?= $this->include('themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
|
||||
|
||||
<?= $this->section('content'); ?>
|
||||
<!--Content Body-->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= lang('Chat.message_configuration') ?></h3>
|
||||
</div>
|
||||
<!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<h4 class="card-title"><?= lang('Chat.store_department') ?></h4>
|
||||
<div class="row d-flex align-item-center">
|
||||
<div class="col-md-10 mb-2">
|
||||
<label for="chat-department-display"><?= lang('Chat.datatable_departments.name') ?></label>
|
||||
<input type="text" name="display" id="chat-department-display" class="form-control" placeholder="<?= lang('Chat.datatable_departments.name') ?>" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="btn-add-new-chat-department"> </label>
|
||||
<button type="button" class="btn btn-primary btn-sm w-100" id="btn-add-new-chat-department">
|
||||
<span class="icon-base ti ti-plus icon-xs me-1"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?= view("themes/vuexy/components/tables/chat_departments_table", ["id" => "tableChatDepartments"]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/css/formValidation.min.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
<?= $this->section("additionalExternalJs") ?>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/FormValidation.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/popper/popper.js') ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/Bootstrap5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/AutoFocus.min.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/messages/configView.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -0,0 +1,38 @@
|
||||
<?= $this->include('themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
|
||||
|
||||
<?= $this->section('content'); ?>
|
||||
<!--Content Body-->
|
||||
<div class="row" id="chatDepartmentEditContainer">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $chat_department->display ?></h3>
|
||||
</div>
|
||||
<!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view("themes/vuexy/components/forms/chat_department", ["id" => "chatDepartmentForm", "entity" => $chat_department]) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/css/formValidation.min.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
<?= $this->section("additionalExternalJs") ?>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/FormValidation.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/popper/popper.js') ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/Bootstrap5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/AutoFocus.min.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/messages/editChatDepartmentView.js') ?>"></script>
|
||||
<?= $this->endSection() ?>
|
||||
@ -120,6 +120,13 @@ if (
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('configMessagesIndex') ?>" class="menu-link">
|
||||
<?= lang("App.menu_config_messages") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
Reference in New Issue
Block a user