Skip to content

Commit

Permalink
Merge pull request #1327 from sriranjan-s/Dev-2.0
Browse files Browse the repository at this point in the history
added comments fix and published changes
  • Loading branch information
sriranjan-s authored Sep 4, 2024
2 parents fd0117a + 16b5594 commit 186f02a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 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/[email protected]
RUN yarn add @upyog/[email protected]
RUN yarn add @upyog/[email protected]
RUN yarn add @upyog/[email protected]
RUN yarn add @upyog/[email protected].10
RUN yarn add @upyog/[email protected].12
RUN yarn add @upyog/[email protected]
RUN yarn add @upyog/[email protected]
RUN yarn add @upyog/[email protected]
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.10",
"@upyog/digit-ui-module-obps":"1.7.0-beta.12",
"@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.10",
"@upyog/digit-ui-module-obps": "1.7.0-beta.12",
"@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.10",
"version": "1.7.0-beta.12",
"description": "",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ const BPAApplicationTimeline = (props) => {
window.open(thumbnailsToShow?.fullImage?.[0],"_blank");
}
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} />;

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 All @@ -48,7 +49,7 @@ const BPAApplicationTimeline = (props) => {
<CheckPoint
isCompleted={true}
label={t((data?.timeline[0]?.state && `WF_${businessService}_${data.timeline[0].state}`) || "NA")}
customChild={getTimelineCaptions(data?.timeline[0])}
customChild={getTimelineCaptions(data?.timeline[0],0,data.timeline)}
/>
) : (
<ConnectingCheckPoints>
Expand All @@ -69,7 +70,7 @@ const BPAApplicationTimeline = (props) => {
keyValue={index}
isCompleted={index === 0}
label={checkpoint.state ? t(`WF_${businessService}_${checkpoint.state}${timelineStatusPostfix}`) : "NA"}
customChild={getTimelineCaptions(checkpoint,index,data.timeline)}
customChild={getTimelineCaptions(checkpoint,index,data?.timeline)}
/>
</React.Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const BPACaption = ({ data,OpenImage }) => {
const [viewMore, setviewMore] = useState(false);
return (
<div>
{data.date && <p>{data.date}</p>}
<p>{data.name}</p>
{data.mobileNumber && <TelePhone mobile={data.mobileNumber} />}
{data.source && <p>{t("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_" + data.source.toUpperCase())}</p>}
{data?.date && <p>{data?.date}</p>}
<p>{data?.name}</p>
{data?.mobileNumber && <TelePhone mobile={data?.mobileNumber} />}
{data?.source && <p>{t("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_" + data?.source?.toUpperCase())}</p>}
{/* //TODO: please find a better way to display in checkpoints */}
{data.comment && <BPAReason otherComment={data?.otherComment} headComment={data?.comment}></BPAReason>}
{data?.comment && <BPAReason otherComment={data?.otherComment} headComment={data?.comment}></BPAReason>}
{data?.wfComment ? <div>{data?.wfComment?.map( e =>
<div className="TLComments">
<h3>{t("WF_COMMON_COMMENTS")}</h3>
Expand Down Expand Up @@ -49,7 +49,7 @@ const BPACaption = ({ data,OpenImage }) => {
)}</div> : null}
{data?.thumbnailsToShow?.thumbs?.length > 0 ? <div className="TLComments">
<h3>{t("CS_COMMON_ATTACHMENTS")}</h3>
<DisplayPhotos srcs={data?.thumbnailsToShow.thumbs} onClick={(src, index) => {OpenImage(src, index,data?.thumbnailsToShow)}} />
<DisplayPhotos srcs={data?.thumbnailsToShow?.thumbs} onClick={(src, index) => {OpenImage(src, index,data?.thumbnailsToShow)}} />
</div> : null}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ console.log("appl", applicationDetails)
const caption = {
date: convertEpochToDateDMY(applicationData?.auditDetails?.lastModifiedTime),
name: checkpoint?.assignes?.[0]?.name,
wfComment: previousComment || checkpoint?.wfComment,
wfComment: checkpoint?.wfComment,
mobileNumber: checkpoint?.assignes?.[0]?.mobileNumber,
};

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 @@ -29,7 +29,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.10",
"@upyog/digit-ui-module-obps": "1.7.0-beta.12",
"@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 186f02a

Please sign in to comment.