From 9d2d3604e113fb16cb8ebd7eda541b2ab8f989d1 Mon Sep 17 00:00:00 2001 From: divyav-aot Date: Wed, 6 Dec 2023 14:29:45 -0500 Subject: [PATCH 1/2] statuslabel changes --- api/reviewer_api/resources/document.py | 2 +- .../services/docReviewerService.tsx | 2 +- web/src/constants/enum.ts | 36 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/api/reviewer_api/resources/document.py b/api/reviewer_api/resources/document.py index e398d6bc8..cde76a9fd 100644 --- a/api/reviewer_api/resources/document.py +++ b/api/reviewer_api/resources/document.py @@ -103,7 +103,7 @@ def get(requestid): "requesttype": jsonobj["requestType"] } result = documentservice().getdocuments(requestid, requestinfo["bcgovcode"]) - return json.dumps({"requeststatusid": jsonobj["requeststatusid"], "documents": result, "requestnumber":jsonobj["axisRequestId"], "requestinfo":requestinfo}), 200 + return json.dumps({"requeststatuslabel": jsonobj["requeststatuslabel"], "documents": result, "requestnumber":jsonobj["axisRequestId"], "requestinfo":requestinfo}), 200 except KeyError as error: return {'status': False, 'message': CUSTOM_KEYERROR_MESSAGE + str(error)}, 400 except BusinessException as exception: diff --git a/web/src/apiManager/services/docReviewerService.tsx b/web/src/apiManager/services/docReviewerService.tsx index 9570161d5..33107e644 100644 --- a/web/src/apiManager/services/docReviewerService.tsx +++ b/web/src/apiManager/services/docReviewerService.tsx @@ -23,7 +23,7 @@ export const fetchDocuments = ( const __files = res.data.documents.filter((d: any) => !d.attributes.incompatible); store.dispatch(setDocumentList(__files) as any); store.dispatch(setRequestNumber(res.data.requestnumber) as any); - store.dispatch(setRequestStatus(res.data.requeststatusid) as any); + store.dispatch(setRequestStatus(res.data.requeststatuslabel) as any); store.dispatch(setRequestInfo(res.data.requestinfo) as any); callback(res.data.documents); } else { diff --git a/web/src/constants/enum.ts b/web/src/constants/enum.ts index 4d27fe768..4c31ff2d5 100644 --- a/web/src/constants/enum.ts +++ b/web/src/constants/enum.ts @@ -66,27 +66,27 @@ const pageFlagTypes:pageFlagType = { }; type RequestStatesType = { - [key: string]: number + [key: string]: string } const RequestStates:RequestStatesType = { - "Open": 1, - "Call For Records": 2, - "Closed": 3, - "Redirect": 4, - "Unopened": 5, - "Intake in Progress": 6, - "Records Review": 7, - "Fee Estimate": 8, - "Consult": 9, - "Ministry Sign Off": 10, - "On Hold": 11, - "Deduplication": 12, - "Harms Assessment": 13, - "Response": 14, - "Archived": 15, - "Peer Review": 16, - "Call For Records Overdue": 17 + "Open": "open", + "Call For Records": "callforrecords", + "Closed": "closed", + "Redirect": "redirect", + "Unopened": "unopened", + "Intake in Progress": "intakeinprogress", + "Records Review": "recordsreview", + "Fee Estimate": "feeestimate", + "Consult": "consult", + "Ministry Sign Off": "ministrysignoff", + "On Hold": "onhold", + "Deduplication": "deduplication", + "Harms Assessment": "harmsassessment", + "Response": "response", + "Archived": "archived", + "Peer Review": "peerreview", + "Call For Records Overdue": "callforrecordsoverdue" }; export { From d946232f33ef6a91fd8a3699ae1053816572b796 Mon Sep 17 00:00:00 2001 From: divyav-aot Date: Wed, 13 Dec 2023 11:18:46 -0500 Subject: [PATCH 2/2] fix related to dedupe --- .../DedupeServices/services/s3documentservice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/computingservices/DedupeServices/services/s3documentservice.py b/computingservices/DedupeServices/services/s3documentservice.py index d6545f851..957da66cb 100644 --- a/computingservices/DedupeServices/services/s3documentservice.py +++ b/computingservices/DedupeServices/services/s3documentservice.py @@ -77,8 +77,8 @@ def extract_annotations_from_pdf(pdf_document, output_bytestream): new_content = legend_text + ":The comment text of the annotation is added as part of the pdf." index += 1 author = annot.info.get('title', '') - if author: - new_author = "Original Document Comment" + # if author: + new_author = "Original Document Comment" annot.set_info(content=new_content,title=new_author) annot.update() annot_dict = {