Current behaviour:
Single Compliance Status configuration (no types), applied uniformly.
Limited/no ability to manage enable/disable per status or reorder within a grouping.
Required changes:
Introduce multiple Compliance Status Types
Concept similar to “Check Forms Rating Types.”
Each Type contains an ordered list of statuses (e.g., Compliant, Minor NC, Major NC, etc.).
Admins can create, edit, enable/disable, and delete Types.
Apply Compliance Status Type to an Audit Type
Add a field on “Audit Type” to select which Compliance Status Type it uses.
When an Audit Type is selected/used in workflows, the associated statuses are the only available options.
Enforce referential integrity (prevent deletion of a Type in use or require remapping).
Manage statuses within a Type
For each Type:
Add/edit/delete statuses (name, code/key, optional colour/badge, description, weight/score if applicable).
Enable/disable individual statuses (disabled statuses should not be selectable in forms but retained for history).
Reorder statuses via drag-and-drop; order is persisted and used wherever statuses are displayed.
Provide “Set default status” per Type (optional).
Enable/disable at the Type level
Disabling a Type hides it from selection for new Audit Types but preserves historical data.
Migration/compatibility
Migrate existing single status set into a default Compliance Status Type.
Auto-assign this default Type to existing Audit Types to maintain behaviour.
Acceptance criteria:
Admins can create multiple Compliance Status Types, each with an ordered, editable list of statuses.
Audit Types can be linked to a specific Compliance Status Type; only that Type’s statuses appear in related UIs and workflows.
Statuses and Types can be enabled/disabled; disabled items are excluded from new selections but kept for reporting/history.
Reordering statuses updates their order everywhere they appear.
All changes are permission-controlled and audited (who/when changed).