Skip to content

Commit

Permalink
Merge pull request #1325 from sriranjan-s/Dev-2.0
Browse files Browse the repository at this point in the history
Dev 2.0 - OBPS CHANGES PUBLISHED
  • Loading branch information
sriranjan-s authored Sep 3, 2024
2 parents ccca3bc + b7b28c7 commit ca4e345
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 52 deletions.
2 changes: 1 addition & 1 deletion frontend/micro-ui/web/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN yarn add @upyog/digit-ui-module-noc@1.7.0-beta.3
RUN yarn add @upyog/digit-ui-module-engagement@1.7.0-beta.4
RUN yarn add @upyog/digit-ui-module-hrms@1.7.0-beta.3
RUN yarn add @upyog/digit-ui-module-core@1.7.0-beta.3
RUN yarn add @upyog/digit-ui-module-obps@1.7.0-beta.8
RUN yarn add @upyog/digit-ui-module-obps@1.7.0-beta.9
RUN yarn add @upyog/digit-ui-module-common@1.7.0-beta.5
RUN yarn add @upyog/digit-ui-module-ws@1.7.0-beta.12
RUN yarn add @upyog/digit-ui-module-commonpt@1.7.0-beta.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@upyog/digit-ui-module-fsm":"1.7.0-beta.18",
"@upyog/digit-ui-module-mcollect":"1.7.0-beta.4",
"@upyog/digit-ui-module-noc":"1.7.0-beta.3",
"@upyog/digit-ui-module-obps":"1.7.0-beta.8",
"@upyog/digit-ui-module-obps":"1.7.0-beta.9",
"@upyog/digit-ui-module-pgr":"1.7.0-beta.6",
"@upyog/digit-ui-module-pt":"1.7.0-beta.4",
"@upyog/digit-ui-module-receipts":"1.7.0-beta.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@upyog/digit-ui-module-fsm": "1.7.0-beta.18",
"@upyog/digit-ui-module-mcollect": "1.7.0-beta.4",
"@upyog/digit-ui-module-noc": "1.7.0-beta.3",
"@upyog/digit-ui-module-obps": "1.7.0-beta.8",
"@upyog/digit-ui-module-obps": "1.7.0-beta.9",
"@upyog/digit-ui-module-pgr": "1.7.0-beta.6",
"@upyog/digit-ui-module-pt": "1.7.0-beta.4",
"@upyog/digit-ui-module-receipts": "1.7.0-beta.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@upyog/digit-ui-module-obps",
"version": "1.7.0-beta.8",
"version": "1.7.0-beta.9",
"description": "",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,16 @@ const BPAApplicationTimeline = (props) => {
function OpenImage(imageSource, index,thumbnailsToShow){
window.open(thumbnailsToShow?.fullImage?.[0],"_blank");
}
const getTimelineCaptions = (checkpoint) => {
// if (checkpoint.state === "INITIATE") {
// const caption = {
// date: Digit.DateUtils.ConvertEpochToDate(props.application?.auditDetails?.createdTime),
// source: props.application?.tradeLicenseDetail?.channel || "",
// };
// return <BPACaption data={caption} />;
// }
//else {
const caption = {
date: checkpoint?.auditDetails?.lastModified,
name: checkpoint?.assignes?.[0]?.name,
mobileNumber: checkpoint?.assignes?.[0]?.mobileNumber,
comment: t(checkpoint?.comment),
wfComment : checkpoint.wfComment,
thumbnailsToShow : checkpoint?.thumbnailsToShow,
};
return <BPACaption data={caption} OpenImage={OpenImage} />;
//}
const getTimelineCaptions = (checkpoint, index, timeline) => {
const previousCheckpoint = timeline[index - 1];
const caption = {
date: checkpoint?.auditDetails?.lastModified,
name: checkpoint?.assignes?.[0]?.name,
mobileNumber: checkpoint?.assignes?.[0]?.mobileNumber,
wfComment: previousCheckpoint ? previousCheckpoint.wfComment : [], // Get wfComment from the previous checkpoint
thumbnailsToShow: checkpoint?.thumbnailsToShow,
};
return <BPACaption data={caption} OpenImage={OpenImage} />;
};

if (isLoading) {
Expand Down Expand Up @@ -78,7 +69,7 @@ const BPAApplicationTimeline = (props) => {
keyValue={index}
isCompleted={index === 0}
label={checkpoint.state ? t(`WF_${businessService}_${checkpoint.state}${timelineStatusPostfix}`) : "NA"}
customChild={getTimelineCaptions(checkpoint)}
customChild={getTimelineCaptions(checkpoint,index,data.timeline)}
/>
</React.Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ function selectfile(e) {
<CardSubHeader>{t("BPA_P1_SUMMARY_FEE_EST")}</CardSubHeader>
<Row className="border-none" label={t(`BPA_APPL_FEES`)} text={`₹ ${value?.additionalDetails?.P1charges || paymentDetails?.Bill[0]?.billDetails[0]?.amount}`} />
<Row className="border-none" label={t(`BUILDING_APPLICATION_FEES`)} text={`₹ ${Math.round((datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea)*10.7639*2.5)}`}></Row>
<Row className="border-none" label={t(`BOUNDARY_WALL_FEES`)} text={`₹ ${data?.boundaryWallLength*2.5}`}></Row>
<Row className="border-none" label={t(`BOUNDARY_WALL_FEES`)} text={`₹ ${Math.round(data?.boundaryWallLength*2.5)}`}></Row>

<CardSubHeader>{t("BPA_P2_SUMMARY_FEE_EST")}</CardSubHeader>
<Row className="border-none" label={t(`BPA_COMMON_MALBA_AMT`)} text={`₹ ${malbafees}`} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const useInboxTableConfig = ({ parentRoute, onPageSizeChange, formState, totalCo
},
{
Header: t("ES_INBOX_SLA_DAYS_REMAINING"),
accessor: row => GetStatusCell(row?.sla),
accessor: row => row?.state == "PENDING_SANC_FEE_PAYMENT" ? "NA" : GetStatusCell(row?.sla),
}
]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,49 +108,59 @@ console.log("appl", applicationDetails)
day = (day > 9 ? "" : "0") + day;
return `${day}/${month}/${year}`;
};
const getTimelineCaptions = (checkpoint,index=0) => {
const getTimelineCaptions = (checkpoint, index = 0, timeline) => {
if (checkpoint.state === "OPEN" || (checkpoint.status === "INITIATED" && !window.location.href.includes("/obps/"))) {
const caption = {
date: convertEpochToDateDMY(applicationData?.auditDetails?.createdTime),
source: applicationData?.channel || "",
};
return <TLCaption data={caption} />;
} else if (window.location.href.includes("/obps/") || window.location.href.includes("/noc/") || window.location.href.includes("/ws/")) {
//From BE side assigneeMobileNumber is masked/unmasked with connectionHoldersMobileNumber and not assigneeMobileNumber
const privacy = { uuid: checkpoint?.assignes?.[0]?.uuid, fieldName: "mobileNumber", model: "User",showValue: false,
loadData: {
serviceName: "/egov-workflow-v2/egov-wf/process/_search",
requestBody: {},
requestParam: { tenantId : applicationDetails?.tenantId, businessIds : applicationDetails?.applicationNo, history:true },
jsonPath: "ProcessInstances[0].assignes[0].mobileNumber",
isArray: false,
d: (res) => {
let resultstring = "";
resultstring = `+91 ${_.get(res,`ProcessInstances[${index}].assignes[0].mobileNumber`)}`;
return resultstring;
}
}, }
const privacy = {
uuid: checkpoint?.assignes?.[0]?.uuid,
fieldName: "mobileNumber",
model: "User",
showValue: false,
loadData: {
serviceName: "/egov-workflow-v2/egov-wf/process/_search",
requestBody: {},
requestParam: { tenantId: applicationDetails?.tenantId, businessIds: applicationDetails?.applicationNo, history: true },
jsonPath: "ProcessInstances[0].assignes[0].mobileNumber",
isArray: false,
d: (res) => {
let resultstring = "";
resultstring = `+91 ${_.get(res, `ProcessInstances[${index}].assignes[0].mobileNumber`)}`;
return resultstring;
}
},
};
const previousCheckpoint = timeline[index - 1];
const caption = {
date: checkpoint?.auditDetails?.lastModified,
name: checkpoint?.assignes?.[0]?.name,
mobileNumber:applicationData?.processInstance?.assignes?.[0]?.uuid===checkpoint?.assignes?.[0]?.uuid && applicationData?.processInstance?.assignes?.[0]?.mobileNumber ? applicationData?.processInstance?.assignes?.[0]?.mobileNumber: checkpoint?.assignes?.[0]?.mobileNumber,
mobileNumber: applicationData?.processInstance?.assignes?.[0]?.uuid === checkpoint?.assignes?.[0]?.uuid && applicationData?.processInstance?.assignes?.[0]?.mobileNumber
? applicationData?.processInstance?.assignes?.[0]?.mobileNumber
: checkpoint?.assignes?.[0]?.mobileNumber,
comment: t(checkpoint?.comment),
wfComment: checkpoint.wfComment,
wfComment: previousCheckpoint ? previousCheckpoint.wfComment : [],
thumbnailsToShow: checkpoint?.thumbnailsToShow,
};


return <TLCaption data={caption} OpenImage={OpenImage} privacy={privacy} />;
} else {

const caption = {
date: convertEpochToDateDMY(applicationData?.auditDetails?.lastModifiedTime),
// name: checkpoint?.assigner?.name,
name: checkpoint?.assignes?.[0]?.name,
// mobileNumber: checkpoint?.assigner?.mobileNumber,
wfComment: checkpoint?.wfComment,
wfComment: previousComment || checkpoint?.wfComment,
mobileNumber: checkpoint?.assignes?.[0]?.mobileNumber,
};

return <TLCaption data={caption} />;
}
};


const getTranslatedValues = (dataValue, isNotTranslated) => {
if (dataValue) {
Expand Down Expand Up @@ -442,7 +452,7 @@ console.log("appl", applicationDetails)
<CheckPoint
isCompleted={true}
label={t(`${timelineStatusPrefix}${workflowDetails?.data?.timeline[0]?.state}`)}
customChild={getTimelineCaptions(workflowDetails?.data?.timeline[0])}
customChild={getTimelineCaptions(workflowDetails?.data?.timeline[0],workflowDetails?.data?.timeline)}
/>
) : (
<ConnectingCheckPoints>
Expand All @@ -469,7 +479,7 @@ console.log("appl", applicationDetails)
checkpoint?.performedAction === "REOPEN" ? checkpoint?.performedAction : checkpoint?.[statusAttribute]
}${timelineStatusPostfix}`
)}
customChild={getTimelineCaptions(checkpoint,index)}
customChild={getTimelineCaptions(checkpoint,index,workflowDetails?.data?.timeline)}
/>
</React.Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ const BPADocuments = ({ t, formData, applicationData, docs, bpaActionsDetails })
}, [applicationData, bpaActionsDetails])

return (
<div>
<div style={{display:"flex", flexWrap:"wrap"}}>
{bpaTaxDocuments?.map((document, index) => {
return (
<div>
<div style={{padding:"20px",}}>
<SelectDocument
key={index}
index={index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ function DocumentsPreview({ documents, svgStyles = {}, isSendBackFlow = false, i
{isSendBackFlow ? value?.documentType?.includes("NOC") ? <p style={{ textAlign: "center" }}>{t(value?.documentType.split(".")[1])}</p> : <p style={{ textAlign: "center" }}>{t(value?.documentType)}</p> : ""}
</a>
</div>
)) : !(window.location.href.includes("citizen")) && <div><p>{t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")}</p></div>}
)) : !(window.location.href.includes("citizen")) && <div><p>{t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")}</p>

<div style={{width: "180px",}}>
<CardSubHeader style={titleStyles ? titleStyles : { marginTop: "32px", marginBottom: "8px", color: "#505A5F", fontSize: "24px" }}></CardSubHeader>
<div style={{ minWidth: "80px", marginRight: "10px", maxWidth: "100px", height: "auto", minWidth: "100px" }} key={index}>
<div style={{ display: "flex", justifyContent: "flex-start" }}>
<PDFSvg />
</div>
<p style={{ marginTop: "8px", fontWeight: "bold", textAlign: "start", color: "#505A5F" }}></p>
{isSendBackFlow ? value?.documentType?.includes("NOC") ? <p style={{ textAlign: "center" }}></p> : <p style={{ textAlign: "center" }}></p> : ""}
</div>
</div>
</div>}
</div>
{isHrLine && documents?.length != index + 1 ? <hr style={{ color: "#D6D5D4", backgroundColor: "#D6D5D4", height: "2px", marginTop: "20px", marginBottom: "20px" }} /> : null}
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/micro-ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@upyog/digit-ui-module-hrms": "1.7.0-beta.3",
"@upyog/digit-ui-module-mcollect": "1.7.0-beta.4",
"@upyog/digit-ui-module-commonpt":"1.7.0-beta.4",
"@upyog/digit-ui-module-obps": "1.7.0-beta.8",
"@upyog/digit-ui-module-obps": "1.7.0-beta.9",
"@upyog/digit-ui-module-noc": "1.7.0-beta.3",
"@upyog/digit-ui-module-pgr": "1.7.0-beta.6",
"@upyog/digit-ui-module-pt": "1.7.0-beta.4",
Expand Down

0 comments on commit ca4e345

Please sign in to comment.