rectification audit options: TRUE auto-"Others", FALSE limited to true/false others

- rect TRUE: no category menu, verdict saved as "Others" (legacy behavior);
  Save/Enter work without a category, A auto-saves in Quick mode
- rect FALSE: only "true others" / "false others" (keys 1-2); audits safe
  menu no longer selectable in rect mode (closes the "duplicate" soft-delete trap)
- FALSE + "true others" now calls POST /auditor/rectified/false to re-open
  the defect (asset DAMAGED) - wired into single save, Bulk Mode phase 2b,
  and Audit All; per-record errors surfaced in toasts
- audits mode untouched (all changes gated on isRectActive)
This commit is contained in:
2026-07-17 11:27:36 +05:30
parent c872566e83
commit ee25bb6065
2 changed files with 184 additions and 35 deletions

View File

@@ -84,6 +84,15 @@ export const activityFeedsService = {
return response;
},
// Called after a rectification FALSE + 'true others' audit - the defect is
// NOT fixed, so this re-opens/creates it in the work-order layer with
// asset status DAMAGED. Backend only accepts rows already saved with
// Audit_value = 'true others' (exact lowercase).
rectifiedFalse: async (payload: { site_id: number; anomaly_id: number[] }) => {
const response = await axiosClient.post('/api/audit/auditor/rectified/false', payload);
return response;
},
getOrganizationSites: async (org_id: string) => {
const response = await axiosClient.get('/api/audit/Master/site', {
params: { org_id }