Skip to content

Commit

Permalink
Removed: unwanted sample data and console statements(#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Nov 29, 2024
1 parent 8399412 commit 8d7aea9
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions src/store/modules/rejection/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,19 @@ const actions: ActionTree<RejectionState, RootState> = {
}
const resp = await UtilService.fetchRejectReasons(payload)

const sampleData = [{
description: "Inactive store",
enumId: "INACTIVE_STOR",
enumName: "Inactive store",
enumTypeId: "REPORT_NO_VAR",
sequenceNum: 1
}]

console.log('usedReasons', usedReasons);

// if (!hasError(resp)) {
if (!hasError(resp)) {
const reasonCountDetail = usedReasons.reduce((reasonDetail: any, reason: any) => {
reasonDetail[reason.val.trim().toUpperCase()] = reason;
return reasonDetail;
}, {});

console.log('reasonCountDetail', reasonCountDetail)

usedRejectionReasons = sampleData
usedRejectionReasons = resp.data.docs
usedRejectionReasons.map((rejectionReason: any) => {
rejectionReason.count = reasonCountDetail[rejectionReason.enumId]?.count
})
// } else {
// throw resp.data
// }
} else {
throw resp.data
}
}
} else {
throw resp.data;
Expand Down

0 comments on commit 8d7aea9

Please sign in to comment.