update departments

This commit is contained in:
Flatlogic Bot 2026-03-23 02:22:57 +00:00
parent 0690a23bb7
commit fbacfd6e29
2 changed files with 1 additions and 98 deletions

View File

@ -555,88 +555,6 @@
</div> </div>
</div> </div>
<!-- Add Department Modal -->
<div class="modal fade" id="addDepartmentModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?section=<?php echo $section; ?>" method="POST" enctype="multipart/form-data">
<input type="hidden" name="action" value="add_department">
<div class="modal-content border-0 shadow">
<div class="modal-header">
<h5 class="modal-title fw-bold text-white"><?php echo __('add_department'); ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="mb-3">
<label class="form-label"><?php echo __('name_en'); ?></label>
<input type="text" name="name_en" class="form-control" required>
</div>
<div class="mb-3">
<label class="form-label"><?php echo __('name_ar'); ?></label>
<input type="text" name="name_ar" class="form-control" dir="rtl" required>
</div>
</div>
<div class="modal-footer bg-light">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo __('cancel'); ?></button>
<button type="submit" class="btn btn-primary px-4"><?php echo __('save'); ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Edit Department Modal -->
<div class="modal fade" id="editDepartmentModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?section=<?php echo $section; ?>" method="POST" enctype="multipart/form-data">
<input type="hidden" name="action" value="edit_department">
<input type="hidden" name="id" id="edit_department_id">
<div class="modal-content border-0 shadow">
<div class="modal-header">
<h5 class="modal-title fw-bold text-white"><?php echo __('edit'); ?> <?php echo __('department'); ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="mb-3">
<label class="form-label"><?php echo __('name_en'); ?></label>
<input type="text" name="name_en" id="edit_department_name_en" class="form-control" required>
</div>
<div class="mb-3">
<label class="form-label"><?php echo __('name_ar'); ?></label>
<input type="text" name="name_ar" id="edit_department_name_ar" class="form-control" dir="rtl" required>
</div>
</div>
<div class="modal-footer bg-light">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo __('cancel'); ?></button>
<button type="submit" class="btn btn-primary px-4"><?php echo __('save'); ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Delete Department Modal -->
<div class="modal fade" id="deleteDepartmentModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?section=<?php echo $section; ?>" method="POST" enctype="multipart/form-data">
<input type="hidden" name="action" value="delete_department">
<input type="hidden" name="id" id="delete_department_id">
<div class="modal-content border-0 shadow">
<div class="modal-header">
<h5 class="modal-title fw-bold text-white"><?php echo __('delete'); ?> <?php echo __('department'); ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p><?php echo __('confirm_delete'); ?>?</p>
</div>
<div class="modal-footer bg-light">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo __('cancel'); ?></button>
<button type="submit" class="btn btn-danger px-4"><?php echo __('delete'); ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Add Insurance Modal --> <!-- Add Insurance Modal -->
<div class="modal fade" id="addInsuranceModal" tabindex="-1" aria-hidden="true"> <div class="modal fade" id="addInsuranceModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
@ -1731,21 +1649,6 @@ function showDeleteNurseModal(id) {
modal.show(); modal.show();
} }
function showEditDepartmentModal(data) {
document.getElementById('edit_department_id').value = data.id;
document.getElementById('edit_department_name_en').value = data.name_en;
document.getElementById('edit_department_name_ar').value = data.name_ar;
var modal = new bootstrap.Modal(document.getElementById('editDepartmentModal'));
modal.show();
}
function showDeleteDepartmentModal(id) {
document.getElementById('delete_department_id').value = id;
var modal = new bootstrap.Modal(document.getElementById('deleteDepartmentModal'));
modal.show();
}
function showEditEmployeeModal(data) { function showEditEmployeeModal(data) {
document.getElementById('edit_employee_id').value = data.id; document.getElementById('edit_employee_id').value = data.id;
document.getElementById('edit_employee_name_en').value = data.name_en; document.getElementById('edit_employee_name_en').value = data.name_en;

View File

@ -285,7 +285,7 @@ if (isset($_GET['ajax_search'])) {
</button> </button>
</div> </div>
</div> </div>
<div class="mb-3 form-check"> <div class="mb-3 form-check form-switch">
<input type="checkbox" class="form-check-input" name="show_in_queue" id="deptShowInQueue" value="1" checked> <input type="checkbox" class="form-check-input" name="show_in_queue" id="deptShowInQueue" value="1" checked>
<label class="form-check-label" for="deptShowInQueue"><?php echo __('show_in_queue'); ?></label> <label class="form-check-label" for="deptShowInQueue"><?php echo __('show_in_queue'); ?></label>
</div> </div>