devsofttech_hms_ci4/app/Views
DevSoftTech Server 57691e6a7f Fix AJAX header for complaint field update to pass CI4 isAJAX() check
BUGFIX: HTTP 400 'Invalid request' when saving editable complaint fields

PROBLEM: After adding the route, the request still returned 400 Bad
Request with 'Invalid request' error. The controller's isAJAX() check
was failing and rejecting the request.

ROOT CAUSE: The fetch() API does not automatically add the
X-Requested-With header that CodeIgniter 4's isAJAX() method checks
for. Unlike jQuery.ajax() which adds this header by default, vanilla
fetch() requires explicit header configuration.

SOLUTION: Added 'X-Requested-With': 'XMLHttpRequest' header to the
fetch request in attachComplaintFieldHandlers() function. This is the
standard header that identifies AJAX requests and is what CI4's
Request::isAJAX() method validates.

Now the editable complaint fields save correctly:
- Type in complaint name/remark
- Press Tab or Enter
- Green border = saved successfully
- Changes persist in database
2026-06-06 05:30:20 +05:30
..
abdm ABDM: enforce PDF-backed report submit and improve gateway tracking 2026-05-31 04:17:39 +05:30
abha feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
account Add dedicated Save Settings button for user preferences 2026-04-28 13:54:46 +05:30
auth Add dark border theme for better visibility on old LED screens 2026-06-05 16:10:38 +05:30
billing Fix AJAX header for complaint field update to pass CI4 isAJAX() check 2026-06-06 05:30:20 +05:30
dashboard Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
diagnosis Improve radiology template workflow and editor stability 2026-05-30 18:01:20 +05:30
doctor_document Improve doctor document workflow and print performance 2026-05-06 02:06:18 +05:30
errors Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
finance feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
Invoice Polish payment request alert wording 2026-04-10 04:20:14 +05:30
ipd_nursing refactor: set number input step to 1 across views 2026-04-10 21:16:25 +05:30
medical Restore legacy pharmacy reports and fix net/payment totals 2026-06-01 10:53:27 +05:30
org_packing Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
partials feat(abdm): proper FHIR bundles for lab reports and IPD discharge 2026-05-23 04:41:59 +05:30
PathLab_Report Improve radiology template workflow and editor stability 2026-05-30 18:01:20 +05:30
report Implement medical store credit payout workflow and optimize payout pool DataTable grouping 2026-04-30 01:42:03 +05:30
Setting feat(discharge): add department and time placeholders 2026-06-05 11:05:00 +05:30
setup Fix: {{advice}} prints as-is (no Hindi/AI conversion); fix Schema Diff truncation 2026-04-16 12:31:42 +05:30
storestock Revert card/modal/container borders to original light colors 2026-06-05 16:20:21 +05:30
tools feat: OPD speech-to-text mic, medicine label enhancements & template search 2026-03-30 18:46:33 +05:30
welcome_message.php Add dark border theme for better visibility on old LED screens 2026-06-05 16:10:38 +05:30