diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 1f903f2bde4..50ad45ff778 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.2-beta.5", "@egovernments/digit-ui-module-workbench": "1.0.2-beta.3", - "@egovernments/digit-ui-components": "0.0.2-beta.18", + "@egovernments/digit-ui-components": "0.0.2-beta.19", "@egovernments/digit-ui-module-core": "1.8.2-beta.8", "@egovernments/digit-ui-module-utilities": "1.0.1-beta.30", "@egovernments/digit-ui-react-components": "1.8.2-beta.11", diff --git a/micro-ui/web/micro-ui-internals/example/public/index.html b/micro-ui/web/micro-ui-internals/example/public/index.html index 5ace6d5947a..a69003b67f2 100644 --- a/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/micro-ui/web/micro-ui-internals/example/public/index.html @@ -17,7 +17,7 @@ - + diff --git a/micro-ui/web/micro-ui-internals/package.json b/micro-ui/web/micro-ui-internals/package.json index dec069e5b22..e11402fb30b 100644 --- a/micro-ui/web/micro-ui-internals/package.json +++ b/micro-ui/web/micro-ui-internals/package.json @@ -46,7 +46,7 @@ "lodash": "4.17.21", "microbundle-crl": "0.13.11", "@egovernments/digit-ui-react-components": "1.8.2-beta.11", - "@egovernments/digit-ui-components": "0.0.2-beta.18", + "@egovernments/digit-ui-components": "0.0.2-beta.19", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/micro-ui-internals/packages/css/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json index a105cd9f97c..43066db29bc 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.0.63-campaign", + "version": "1.0.64-campaign", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss index 4cc371900f3..4c10120e551 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss @@ -121,3 +121,8 @@ display: flex; justify-content: space-between; } +.upcoming-timeline{ + .timeline-label{ + color: #b1b4b6; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json index 505fdeb2edf..d66e1f825f0 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "@egovernments/digit-ui-react-components": "1.8.2-beta.11", - "@egovernments/digit-ui-components": "0.0.2-beta.18", + "@egovernments/digit-ui-components": "0.0.2-beta.19", "@rjsf/core": "5.10.0", "@rjsf/utils": "5.10.0", "@rjsf/validator-ajv8": "5.10.0", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js index c17e2fed55a..6d84785a754 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js @@ -221,7 +221,7 @@ const CampaignSummary = (props) => { const cycleData = reverseDeliveryRemap(target, t); return { cards: [ - isPreview + isPreview === "true" ? { name: "timeline", sections: [ diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/TimelineComponent.js b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/TimelineComponent.js index f6ca3957669..741cf1852b5 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/TimelineComponent.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/TimelineComponent.js @@ -40,6 +40,7 @@ const TimelineComponent = ({campaignId, resourceId}) => { const { data: baseTimeOut } = Digit.Hooks.useCustomMDMS(tenantId, "HCM-ADMIN-CONSOLE", [{ name: "baseTimeOut" }]); const formatLabel = (label) => { + if(!label) return null; return `HCM_${label.replace(/-/g, "_").toUpperCase()}`; }; @@ -83,7 +84,7 @@ const TimelineComponent = ({campaignId, resourceId}) => { const { data: progessTrack , refetch} = Digit.Hooks.useCustomAPIHook(reqCriteria); const lastCompletedProcess = progessTrack?.processTrack - .filter((process) => process.status === "completed") + .filter((process) => process.status === "completed" && process.showInUi === true) .reduce((latestProcess, currentProcess) => { if (!latestProcess || currentProcess.lastModifiedTime > latestProcess.lastModifiedTime) { return currentProcess; @@ -109,29 +110,29 @@ const TimelineComponent = ({campaignId, resourceId}) => { const completedProcesses = progessTrack?.processTrack - .filter(process => process.status === 'completed') + .filter(process => process.status === 'completed' && process.showInUi === true) .sort((a, b) => b.lastModifiedTime - a.lastModifiedTime) .map(process => ({ type: process.type, lastModifiedTime: process.lastModifiedTime })); const completedTimelines = completedProcesses?.map(process => ({ - label: t(formatLabel(process.type)), + label: t(formatLabel(process?.type)), subElements: [epochToDateTime(process.lastModifiedTime)], })); const inprogressProcesses = progessTrack?.processTrack - .filter(process => process.status === 'inprogress') + .filter(process => process.status === 'inprogress' && process.showInUi === true) .map(process => ({ type: process.type, lastModifiedTime: process.lastModifiedTime })); const subElements = inprogressProcesses?.length > 0 - ? inprogressProcesses.map(process => `${t(formatLabel(process.type))} , ${epochToDateTime(process.lastModifiedTime)}`) + ? inprogressProcesses.map(process => `${t(formatLabel(process?.type))} , ${epochToDateTime(process.lastModifiedTime)}`) : []; const upcomingProcesses = progessTrack?.processTrack - .filter(process => process.status === "toBeCompleted") + .filter(process => process.status === "toBeCompleted" && process.showInUi === true) .map(process => ({ type: process.type, lastModifiedTime: process.lastModifiedTime })); const subElements2 = upcomingProcesses?.length > 0 - ? upcomingProcesses.map(process => `${t(formatLabel(process.type))} , ${epochToDateTime(process.lastModifiedTime)}`) + ? upcomingProcesses.map(process => `${t(formatLabel(process?.type))} , ${epochToDateTime(process.lastModifiedTime)}`) : []; // useEffect(()=>{ @@ -183,7 +184,9 @@ const TimelineComponent = ({campaignId, resourceId}) => { + { ) } - {userCredential && ( + {userCredential && lastCompletedProcess?.type === "campaign-creation" && (