diff --git a/app/Views/Setting/Admin/UserManagement/index.php b/app/Views/Setting/Admin/UserManagement/index.php index 1924321..0189d31 100644 --- a/app/Views/Setting/Admin/UserManagement/index.php +++ b/app/Views/Setting/Admin/UserManagement/index.php @@ -11,14 +11,6 @@ Role Master - -
@@ -106,10 +98,19 @@
- - + + + id ?? 0) !== (int) (auth()->user()->id ?? 0)) : ?> - +
diff --git a/app/Views/Setting/Admin/UserManagement/permissions.php b/app/Views/Setting/Admin/UserManagement/permissions.php index d2d1c0c..fa43ee6 100644 --- a/app/Views/Setting/Admin/UserManagement/permissions.php +++ b/app/Views/Setting/Admin/UserManagement/permissions.php @@ -24,32 +24,49 @@
+ getEmailIdentity(); + $selectedEmail = trim((string) ($selectedIdentity->secret ?? '')); + $selectedExtra = $selectedIdentity->extra ?? []; + if (is_string($selectedExtra) && trim($selectedExtra) !== '') { + $decodedExtra = json_decode($selectedExtra, true); + $selectedExtra = is_array($decodedExtra) ? $decodedExtra : []; + } + if (is_array($selectedExtra)) { + $selectedPersonName = trim((string) ($selectedExtra['full_name'] ?? '')); + $selectedPhoneNo = trim((string) ($selectedExtra['phone_no'] ?? '')); + } + } + ?>
-
-
- - -
User is required.
+ + + +
+
+ +
+
username ?? 'User')) ?>
+
Selected user for additional permissions
+
+
+
+
Login ID: username ?? '-')) ?>
+
User ID: id ?>
+
Status: active) ? 'Active' : 'Inactive' ?>
+
Email:
+
Phone:
+
Role:
+
-
- -
-
+ +
No user was selected. Return to the user list and choose the permissions action for a user.
+
@@ -61,9 +78,6 @@
Checked boxes are additional permissions saved specifically for this user. Unchecking one does not remove access inherited from the role.
-
- Pharmacy module access is controlled by pharmacy.access. Editing past Walk-in/Registered pharmacy invoices requires pharmacy.invoice.edit-old (or pharmacy.invoice.admin). Discount caps can be granted with pharmacy.invoice.discount.10, pharmacy.invoice.discount.20, pharmacy.invoice.discount.30, or full override using pharmacy.invoice.admin. Base user discount can be set in hospital setting key PHARMACY_NORMAL_MAX_DISCOUNT_PERCENT. -
'OPD', 'billing.charges' => 'Charges', 'billing.ipd' => 'IPD Billing', - 'billing' => 'Billing', + 'billing.access' => 'Billing Access', + 'billing.patient' => 'Patient Billing', + 'billing.payment_request' => 'Payment Requests', + 'billing.refund' => 'Refunds', + 'billing.items' => 'Billing Items', + 'billing.packages' => 'Billing Packages', 'abdm' => 'ABDM', + 'diagnosis' => 'Diagnosis', + 'doctor_work' => 'Doctor Work', + 'hospital_stock' => 'Hospital Stock', + 'media' => 'Media', + 'reports' => 'Reports', + 'settings' => 'Settings', 'other' => 'Other', ]; foreach ($permissions as $permissionKey => $permissionLabel) { @@ -134,13 +159,45 @@ $groupOrder[] = $detectedGroup; } } + + $groupHelp = [ + 'admin' => 'Controls access to the administrative area and core application settings. Grant only to trusted system administrators.', + 'users' => 'Controls user-account lifecycle actions such as creating, editing, deleting, and managing privileged users.', + 'template' => 'Controls access to clinical, diagnostic, discharge, document, and print-template configuration areas.', + 'pharmacy' => 'Controls pharmacy access, invoice administration, old-invoice editing, purchase status changes, and user discount limits. The base discount is configured by hospital setting PHARMACY_NORMAL_MAX_DISCOUNT_PERCENT.', + 'finance' => 'Controls Accounts and Finance workflows including cash submission, verification, bank reconciliation, compliance, vendors, purchase orders, GRNs, invoices, and payouts.', + 'opd' => 'Controls access to the OPD doctor panel used for clinical work on outpatient visits.', + 'billing.access' => 'Provides the main entry permission for billing workflows. More specific billing permissions below restrict individual operations.', + 'billing.patient' => 'Controls exceptional patient billing actions, including editing a patient name after the normal time restriction.', + 'billing.opd' => 'Controls OPD registration editing and payment confirmation actions.', + 'billing.charges' => 'Controls charges invoice viewing, editing, date changes, payment, cancellation, and correction actions.', + 'billing.ipd' => 'Controls IPD billing access, admissions, invoices, cash reports, bill printing, discharge edits, status management, and exports.', + 'billing.payment_request' => 'Controls viewing and processing of organization payment requests.', + 'billing.refund' => 'Controls viewing and processing of billing refund requests.', + 'billing.items' => 'Controls access to billing item masters and permission to maintain them.', + 'billing.packages' => 'Controls access to billing package masters and permission to maintain them.', + 'abdm' => 'Controls ABDM access, ABHA operations, task board, gateway actions, and Bridge communication logs.', + 'diagnosis' => 'Controls entry to the diagnosis module and access to diagnosis reports.', + 'doctor_work' => 'Controls doctor workflows including appointments, Rx groups, medicines, advice, clinical templates, and immunization records.', + 'hospital_stock' => 'Controls hospital stock masters, indents, approvals, issues, purchases, receiving, reports, and alerts.', + 'media' => 'Controls optional image preparation actions such as rotating or cropping before upload.', + 'reports' => 'Controls access to operational, collection, insurance, NABH audit, billing, and document issue reports.', + 'settings' => 'Controls access to operational settings such as bed management and charges configuration.', + 'beta' => 'Provides access to features designated for beta testing before general availability.', + 'other' => 'Contains permissions that do not yet belong to a dedicated module heading.', + ]; ?>
-
+
+
+ +
$permissionLabel) : ?>
> @@ -169,23 +226,61 @@
+ +