devsofttech_hms_ci4/app/Controllers/Setting
DevSoftTech Server d923dc6c29 Fix: Template delete page refresh + add debug logging
ISSUE: Template delete returns success but record appears not deleted

ROOT CAUSE: Delete WAS working (verified in database), but page wasn't refreshing properly after success

CHANGES:

1. JavaScript fix (discharge_templates.php):
   - Replaced conditional load_form_div / location.assign logic
   - Now uses simple location.reload() after 500ms delay
   - Ensures page always refreshes after successful delete

2. Controller debug logging (Template.php):
   - Added comprehensive debug logs to trace delete flow
   - Logs: request ID, row fetch, query compilation, affected rows
   - Logs error codes and messages for troubleshooting
   - Will help diagnose future issues

VERIFIED:
- Database confirmed template ID 2 was deleted
- Only frontend refresh was failing
- Now forces reload to show updated list
2026-06-07 11:32:24 +05:30
..
AbdmGatewaySettings.php feat(abdm): proper FHIR bundles for lab reports and IPD discharge 2026-05-23 04:41:59 +05:30
AbdmReportDoctorSettings.php Align ABDM bridge workflow APIs and add report doctor mapping 2026-06-01 07:02:34 +05:30
Admin.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
AiSettings.php feat(abdm): proper FHIR bundles for lab reports and IPD discharge 2026-05-23 04:41:59 +05:30
Bank.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
BedManagement.php Fix BedManagement controller header to restore bed-status route 2026-04-02 06:27:52 +05:30
Charges.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Doctor.php Make HealthPlix Doctor Identifier field optional in Doctor Master 2026-04-28 08:22:00 +05:30
HealthplixSettings.php Reflect actual HealthPlix fetch secret save state 2026-04-28 07:40:22 +05:30
HospitalProfile.php feat: add configurable sidebar auto-hide in hospital settings 2026-04-27 14:32:31 +05:30
HospitalStock.php feat(stock): add modular hospital stock management with dashboard, masters, indents, purchase and reports 2026-04-02 10:28:38 +05:30
Insurance.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
MedicalBank.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
NursingBedsideItems.php Add nursing scan-to-structured workflow and discharge UI polish 2026-03-09 00:12:04 +05:30
Reffer.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Template.php Fix: Template delete page refresh + add debug logging 2026-06-07 11:32:24 +05:30
UserManagement.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30