Skip to content

Commit

Permalink
Citizen application time line for FSM
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmoy-eGov committed Jun 21, 2024
1 parent 5684ba2 commit dc3f252
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@egovernments/digit-ui-module-bills": "1.7.24",
"@egovernments/digit-ui-module-common": "1.7.24",
"@egovernments/digit-ui-module-engagement": "1.7.24",
"@egovernments/digit-ui-module-fsm": "1.7.29",
"@egovernments/digit-ui-module-fsm": "1.7.30",
"@egovernments/digit-ui-module-mcollect": "1.7.24",
"@egovernments/digit-ui-module-noc": "1.7.24",
"@egovernments/digit-ui-module-obps": "1.7.25",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-fsm",
"version": "1.7.29",
"version": "1.7.30",
"license": "MIT",
"main": "dist/index.js",
"description": "Digit FSM Module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import React, { Fragment, useState } from "react";
import { useTranslation } from "react-i18next";
import { Link, useHistory, useParams } from "react-router-dom";
import {
// Header,
Header,
ActionLinks,
// Card,
Card,
CardSectionHeader,
ConnectingCheckPoints,
CheckPoint,
// KeyNote,
KeyNote,
SubmitBar,
// LinkButton,
LinkButton,
Loader,
Rating,
} from "@egovernments/digit-ui-react-components";
Expand Down Expand Up @@ -85,15 +85,15 @@ export const ApplicationTimeline = (props) => {
if (checkpoint?.numberOfTrips) caption.comment = `${t("NUMBER_OF_TRIPS")}: ${checkpoint?.numberOfTrips}`;
return <TLCaption data={caption} />;
}
/* else if (checkpoint.status === "PENDING_PAYYY") {
else if (checkpoint.status === "PENDING_PAYYY") {
const caption = {
name: checkpoint?.assigner,
mobileNumber: checkpoint?.assigner?.mobileNumber,
date: `${t("CS_FSM_EXPECTED_DATE")} ${Digit.DateUtils.ConvertTimestampToDate(props.application?.possibleServiceDate)}`,
};
return <TLCaption data={caption} />; */
return <TLCaption data={caption} />;
};
// }
}

const showNextActions = (nextAction) => {
switch (nextAction?.action) {
Expand All @@ -106,7 +106,7 @@ export const ApplicationTimeline = (props) => {
state: { tenantId: props.application.tenantId },
}}
>
<SubmitBar label={t("CS_APPLICATION_DETAILS_MAKE_PAYMENT")} />
{window.location.href.includes("citizen/fsm/") && <SubmitBar label={t("CS_APPLICATION_DETAILS_MAKE_PAYMENT")} />}
</Link>
</div>
);
Expand All @@ -124,8 +124,10 @@ export const ApplicationTimeline = (props) => {
if (isLoading) {
return <Loader />;
}
const toggleTimeline=()=>{
setShowAllTimeline((prev)=>!prev);
}

/*
let deepCopy = _.cloneDeep( data )
let index1 =0
deepCopy?.timeline.map((check,index) => {
Expand All @@ -137,7 +139,7 @@ deepCopy?.timeline.map((check,index) => {
data.timeline[index].status ="ASSING_DSO_PAY"
data.timeline.splice(index, 0, obj);
}
}) */
})
return (
<React.Fragment>
{!isLoading && (
Expand All @@ -148,8 +150,7 @@ deepCopy?.timeline.map((check,index) => {
</CardSectionHeader>
)}
{data?.timeline && data?.timeline?.length === 1 ? (
<CheckPoint isCompleted={true} label={t("CS_COMMON_" + data?.timeline[0]?.status)} customChild={getTimelineCaptions(data?.timeline[0])} />

<CheckPoint isCompleted={true} label={t("CS_COMMON_FSM_" + `${data?.timeline[0]?.performedAction === "UPDATE" ? "UPDATE_" : ""}` + data?.timeline[0]?.status)} customChild={getTimelineCaptions(data?.timeline[0])} />
) : (
<ConnectingCheckPoints>
{data?.timeline &&
Expand All @@ -159,7 +160,7 @@ deepCopy?.timeline.map((check,index) => {
<CheckPoint
keyValue={index}
isCompleted={index === 0}
label={t("CS_COMMON_" + checkpoint.status)}
label={t("CS_COMMON_" + `${checkpoint?.performedAction === "UPDATE" ? "UPDATE_" : ""}` + checkpoint.status)}
customChild={getTimelineCaptions(checkpoint)}
/>
</React.Fragment>
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 @@ -18,7 +18,7 @@
"@egovernments/digit-ui-module-core": "1.7.24",
"@egovernments/digit-ui-module-engagement": "1.7.24",
"@egovernments/digit-ui-module-dss": "1.7.24",
"@egovernments/digit-ui-module-fsm": "1.7.29",
"@egovernments/digit-ui-module-fsm": "1.7.30",
"@egovernments/digit-ui-module-hrms": "1.7.24",
"@egovernments/digit-ui-module-mcollect": "1.7.24",
"@egovernments/digit-ui-module-commonpt":"1.7.24",
Expand Down

0 comments on commit dc3f252

Please sign in to comment.