Initial commit of react-revamp for Auditor Portal

This commit is contained in:
2026-06-10 18:33:17 +05:30
commit a4c0892741
45 changed files with 7095 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import { axiosClient } from './axiosClient';
export const activityFeedsService = {
getAssets: async () => {
const response = await axiosClient.get('/api/dashboard/Master/asset_types');
return response;
},
getHistoryDates: async (isRectificationEnabled: boolean) => {
// Requires dbName and siteIds, which should be handled by axios interceptors or passed in
const params = new URLSearchParams({
isRectificationEnabled: String(isRectificationEnabled)
});
const response = await axiosClient.get(`/api/audit/anomaly/get_history_dates?${params.toString()}`);
return response;
},
getHistory: async (params: any) => {
const queryParams = new URLSearchParams(params);
const response = await axiosClient.get(`/api/audit/anomaly/history?${queryParams.toString()}`);
return response;
},
// Mocking update anomaly
updateAuditedAnomaly: async (site_id: string, anomaly_id: string, payload: any) => {
const response = await axiosClient.put(`/api/audit/anomalies/updateAuditedAnomaly/${site_id}/${anomaly_id}`, payload);
return response;
},
getOrganizationSites: async (org_id: string) => {
const params = new URLSearchParams({ org_id });
const response = await axiosClient.get(`/api/dashboard/Master/site?${params.toString()}`);
return response;
}
};