3 Commits

Author SHA1 Message Date
3b9468748c Fix syntax errors in forms.py files 2026-03-11 01:26:19 +03:00
da0ca4ee19 Fix hospital fields in forms - Add HospitalFieldMixin and update templates
PHASE 1: Add HospitalFieldMixin to forms without it
- apps/complaints/forms.py: SLAConfigForm, EscalationRuleForm
- apps/feedback/forms.py: FeedbackForm
- apps/rca/forms.py: RootCauseAnalysisForm

PHASE 2: Update templates to conditionally hide hospital field labels
- templates/complaints/complaint_form.html
- templates/complaints/inquiry_form.html
- templates/complaints/complaint_threshold_form.html
- templates/complaints/escalation_rule_form.html
- templates/feedback/feedback_form.html

PHASE 3: Remove redundant manual hospital filtering code
- Removed manual __init__ hospital logic from forms now using mixin

Behavior:
- PX Admin: Sees hospital dropdown (can select any hospital)
- Hospital Admin/Staff: Hospital field hidden, auto-set to their hospital
- Cleaner code: Mixin handles all role-based filtering automatically
2026-03-11 01:19:41 +03:00
72dd1e8e3c more updates in complaint and survey 2026-02-10 12:33:31 +03:00