image scanning and asset edit

This commit is contained in:
2026-07-14 14:20:24 +05:30
parent 8c6c26bc8e
commit 08307119da
4 changed files with 180 additions and 12 deletions

View File

@@ -62,6 +62,16 @@ export const activityFeedsService = {
return response;
},
// Corrects a single record's asset classification. The backend resolves
// the canonical asset_name from the central catalog and returns it.
updateAnomalyAsset: async (id: number, assetId: number, isRectificationEnabled: boolean) => {
const response = await axiosClient.put('/api/audit/anomaly/asset',
{ id, asset_id: assetId },
{ params: { isRectificationEnabled } }
);
return response as unknown as { id: number; asset_id: number; asset_name: string };
},
// Called after normal (non-rectification) true anomaly audit
updateAnomalyInDashboard: async (payload: { site_id: string, anomaly_id: number[] }) => {
const response = await axiosClient.post('/api/audit/auditor/anomaly/submit', payload);