UI updates for audit.
This commit is contained in:
@@ -11,7 +11,8 @@ import {
|
||||
setReportingData,
|
||||
setScoreCard,
|
||||
setReportingError,
|
||||
setAuditResults
|
||||
setAuditResults,
|
||||
setAuditError
|
||||
} from "./reporting.actions";
|
||||
import ReportingApplicationTypes from "./reporting.types";
|
||||
|
||||
@@ -46,11 +47,18 @@ export function* onCalculateAudit() {
|
||||
yield takeLatest(ReportingApplicationTypes.CALCULATE_AUDIT, handleCalculateAudit);
|
||||
}
|
||||
export function* handleCalculateAudit({ payload: claimsArrayFromAudit }) {
|
||||
if (claimsArrayFromAudit.length === 0) {
|
||||
yield put(
|
||||
setAuditError(
|
||||
"The excel file did not return any matching results for this sheet. Please ensure you have selected the correct sheet. This is typically 'Shop RPS Claim Detail' but may vary."
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
const rpsJobs = yield select((state) => state.reporting.data);
|
||||
//Get List of Claims delta.
|
||||
const missingFromRps = rpsJobs.filter((job) => !claimsArrayFromAudit.find((c) => c.clm_no.includes(job.clm_no)));
|
||||
const missingFromAudit = claimsArrayFromAudit.filter((c) => !rpsJobs.find((job) => c.clm_no.includes(job.clm_no)));
|
||||
console.log("Missing From RPS/From Audit", missingFromRps.length, missingFromAudit.length);
|
||||
|
||||
//For the items in both spots, highlight the discrepancy.
|
||||
const claimsArrayHashObject = {};
|
||||
|
||||
Reference in New Issue
Block a user