Design: Submission Form Customization (G8) #787
ChakshuGautam
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Submission Form Customization
Architecture discussion for phase G8 of the CRS Configurator. Implementation tracked in (draft) PR #782. Stacked on the escalation foundation in PR #770.
G8: Submission Form Customization
Why
The citizen intake form is the entry point for every complaint flowing through CRS.
Today the field set is hardcoded in the citizen portal SPA: a new field, a renamed
label, or a tweaked validation rule needs a UI release, a CI build, and a
re-deployment. BRD Appendix B specifies the form in three sections — General
Information (I), IGSAE complaints (II), and IGE complaints (III) — with per-field
Type / Mandatory / Validation / Applicable-path metadata; the BRD wants this metadata
operator-editable.
The Configurator roadmap (see
docs/crs-configurator-roadmap.md§G8) sized this asXL and called it the highest-impact phase from a citizen-experience perspective.
It also closes the loop on the CategorySLA wiring strategies
doc — specifically Strategy A (Rich intake),
which requires the intake form to surface
path,category, andsubcategoryL1asoperator-configurable fields. Without G8, Strategy A is infeasible for tenants whose
current intake form lacks those three fields.
Scope
In:
Dependent List, Number, Email, Yes/No, Checkbox, Date, Upload, GPS.
maxChars,minChars,regex,mimeTypes,maxSizeMb,dependsOn,listSource.IGE/IGSAE/BOTH).displayOrder).no actual submit).
label_ptMZandlabel_enare both required for every field.Out (deferred):
category == 'WaterSupply'"). Tracked as a follow-up phase.schema + portal change, not a configurator change.
SubmissionFormFieldfrom MDMSinstead of its hardcoded config). That's a separate PR against the portal repo,
scoped at ~half-day on top of the configurator UI.
config — first-pass operators will seed via the XLSX importer.
MDMS schemas
Schema code reserved by this PR:
CRS.SubmissionFormField(modulecrs, masterSubmissionFormField). Style matches the existingCRS.CategorySLA/CRS.StateSLA/CRS.SLAAuditLogshape from #770: objecttype, populatedx-unique, emptyx-ref-schema,additionalProperties: false.Sketch of the final shape (will be filled into
CRS.G8.jsonby the implementationPR; this PR commits an empty-shape stub so the code is reserved):
uniqueIdentifierconvention:<section>:<code>so the samecodecan be reusedacross sections without collision.
Once
CRS.ConfigAuditLoglands in G4, every save againstCRS.SubmissionFormFieldwrites a
ConfigAuditLogrow via the shared helper atconfigurator/src/admin/audit/. Until G4 ships, G8 saves go through MDMS auditDetailsonly (consistent with G1-G3).
Configurator routes + UI sketch
New routes added under the existing
/manage/crs/...namespace established by theSLA Matrix work in #770:
/manage/crs-submission-form— list view, grouped by section, drag-to-reorder./manage/crs-submission-form/:code/edit— field editor with live preview.Sidebar nav entry: "Submission Form" under the Citizen Experience group
(new group introduced by G8; will house G7-Dashboard-config when that lands).
Page anatomy:
visible on hover); right column is the live preview, scoped to the currently-
selected section's
applicablePaths.ASCII wireframe of the editing surface:
Edit page right pane re-renders the same preview but for one field at a time, so
the operator sees their validation/regex changes apply live.
API endpoints touched
_create,_update,_searchagainst thereserved
CRS.SubmissionFormFieldcode. No new backend endpoints are requiredfor the configurator side.
CRS.SubmissionFormField(filtered by tenant, byactive: true, sorted bydisplayOrder). Replaces the hardcoded field config. Out of scope for thisPR — separate PR against the portal repo.
fix-missing-keysskill on missing UI strings. In-content labels live in
label_ptMZ/label_enon the MDMS records and bypass the localisation service.Dependencies on prior phases
Must ship before G8:
CRS.*schema-codeconvention this phase extends.
previously-hardcoded enums.
— documents why Strategy A needs G8.
fields (BRD Appendix B II / III) need the taxonomy as their
listSource.(BRD Appendix B I) need the boundary tree as
listSource.G8 blocks:
add
path/category/subcategoryL1intake fields without G8)."household head ID" field for a non-Mozambique deployment) without a portal
release.
Acceptance criteria
II / III, field-for-field.
Witnesses (Name / Contact)from optional to mandatory immediatelychanges the citizen-portal validation (no portal restart).
resets District; District options come from the boundary tree).
(same component library, same typography).
applicablePaths: ["IGSAE"]does not appear on the IGEform, and vice versa.
with no manual MDMS poke.
CRS.SubmissionFormFieldwrites aCRS.ConfigAuditLogrow capturing before / after JSON + actor.Estimated effort
XL (multi-week) — large schema surface, eleven widget kinds, dependent-list
semantics, mandatory locale duplication, live preview parity with the portal, plus
the corresponding citizen-portal consumer changes. Configurator side alone is
~1 week; the portal-consumer side adds another week. Localisation seed for the BRD
defaults is another half-day.
Open questions
override per city), or per-city seeds out of the gate? G3 + G8 are the most
likely to want city-level overrides (per the roadmap §Cross-cutting concerns).
displayOrderin one go. Single MDMS bulk-update, or N serial updates withspinner? MDMS v2 has no native bulk-update endpoint today.
components directly (creates a build-time coupling), or duplicate them and risk
drift? A monorepo extraction is the third option but out of scope for G8.
tenant level, the preview has no boundary tree to populate Province / District
list sources from. Show a "preview limited at root" warning, or pick a sample
city tenant?
field config as a fallback (in case the MDMS fetch fails on boot), and where
does that fallback get sunset?
Cross-references
docs/crs-configurator-roadmap.md§G8docs/escalation-feature-design.mddocs/categorysla-wiring-strategies.mdBeta Was this translation helpful? Give feedback.
All reactions