feat:chat modules

This commit is contained in:
amazuecos
2024-09-25 17:42:55 +00:00
parent 2fc9af9db4
commit c651db61ff
16 changed files with 808 additions and 382 deletions

View File

@ -52,6 +52,25 @@
</select>
</div>
</div>
<div class="mb-3">
<div class="form-group">
<label for="chat_departments" class="form-label"> <?= lang('Users.chatDepartments') ?></label>
<select tabindex="11" name="chatDepartments[]" id="chat_departments" multiple="multiple"
class="form-control select2 form-select">
<?php
$selectedChatDepartments = isset($chatDepartmentUser) && is_array($chatDepartmentUser) ? $chatDepartmentUser : [];
$selectedKeywords = array_map(fn($chatDepartment) => $chatDepartment->name, $selectedChatDepartments);
foreach ($chatDepartments as $item) :
$isSelected = in_array($item["name"], $selectedKeywords) ? 'selected' : '';
?>
<option value="<?= $item["name"] ?>"
data-select2-id=<?= $item["name"] ?> <?= $isSelected ?>>
<?= $item["display"] ?>
</option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="mb-3">
<label for="cliente_id" class="form-label">
<?= lang('Presupuestos.clienteId') ?>