Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rontend into patch_fix_2
  • Loading branch information
rachana-egov committed Nov 22, 2024
2 parents 985df47 + 6a31fcb commit e42dcb4
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@egovernments/digit-ui-libraries": "1.8.4",
"@egovernments/digit-ui-module-workbench": "1.0.10",
"@egovernments/digit-ui-module-workbench": "1.0.11",
"@egovernments/digit-ui-components": "0.0.2-beta.49",
"@egovernments/digit-ui-module-core": "1.8.2-beta.25",
"@egovernments/digit-ui-module-utilities": "1.0.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, Fragment } from "react";
import React, { useState, Fragment , useEffect} from "react";
import { Link, useHistory, useLocation } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { } from "@egovernments/digit-ui-react-components";
Expand All @@ -20,6 +20,16 @@ const Response = () => {

};

useEffect(() => {
if (state?.actionLabel === "HCM_CONFIGURE_APP_RESPONSE_ACTION" && queryStrings?.isSuccess === "true") {
const timer = setTimeout(() => {
navigate(state?.actionLink || `/${window.contextPath}/employee/`);
}, 2000);

return () => clearTimeout(timer);
}
}, [state?.actionLabel, state?.actionLink]);

const children = [
<div style={{ display: "flex" }} key="response-text">
{state?.boldText ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ const TimelinePopUpWrapper = ({ onClose, businessId, heading,labelPrefix="" }) =
useEffect(() => {
if (workflowData && workflowData.ProcessInstances) {


// Map API response to timeline steps
const steps = workflowData.ProcessInstances.map((instance, index) => ({
label: t(`${labelPrefix}${instance?.action}`),
variant: 'completed',
subElements: [Digit.Utils.microplanv1.epochToDateTime(instance?.auditDetails?.lastModifiedTime),
instance?.assigner &&
`${instance.assigner?.name} - ${instance.assigner?.roles?.[0]?.name || 'NA'}`,
`${instance.assigner?.name} - ${instance.assigner?.roles?.[0]?.code ? t(Digit.Utils.locale.getTransformedLocale(`MP_ROLE_${instance.assigner?.roles?.[0]?.code}`)) : t('NA')}`,
instance.comment && `${t('COMMENT_PREFIX')} "${instance.comment}"`
],
showConnector: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const FacilityCatchmentMapping = () => {
//role and name of User extracted

const roles=Digit.UserService.getUser().info.roles;
const userName=Digit.UserService.getUser().info.userName;
const userName=Digit.UserService.getUser().info.name;
let userRole = "";

roles.forEach(role => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,24 @@ const PlanInbox = () => {
sortable: true,
width: "180px",
},
{
name: t("INBOX_STATUSLOGS"),
cell: (row, index, column, id) => (
<Button
label={t(`VIEW_LOGS`)}
onClick={() => {
setSelectedBusinessId(row?.original?.id); // Set the row.id to state
setSelectedBoundaryCode(row.boundaryCode);
setShowTimelinePopup(true);
}}
variation="link"
style={{}}
size={"medium"}
/>
),
sortable: false,
width: "180px",
},
{
name: t("INBOX_ASSIGNEE"),
selector: (row, index) => employeeNameMap?.[row?.original?.assignee] || t("ES_COMMON_NA"),
Expand Down Expand Up @@ -560,24 +578,6 @@ const PlanInbox = () => {
...getSecurityDetailsColumns(),
...getAdditionalFieldsColumns(),
...getResourceColumns(),
{
name: t("INBOX_STATUSLOGS"),
cell: (row, index, column, id) => (
<Button
label={t(`VIEW_LOGS`)}
onClick={() => {
setSelectedBusinessId(row?.original?.id); // Set the row.id to state
setSelectedBoundaryCode(row.boundaryCode);
setShowTimelinePopup(true);
}}
variation="link"
style={{}}
size={"medium"}
/>
),
sortable: false,
width: "180px",
},
// {
// name: t(`TOTAL_POPULATION`),
// cell: (row) => t(row?.totalPop) || "NA",
Expand Down Expand Up @@ -684,7 +684,7 @@ const PlanInbox = () => {
//role and name of User extracted

const roles=Digit.UserService.getUser().info.roles;
const userName=Digit.UserService.getUser().info.userName;
const userName=Digit.UserService.getUser().info.name;
let userRole = "";

roles.forEach(role => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ const PopInbox = () => {
}

const roles = Digit.UserService.getUser().info.roles;
const userName = Digit.UserService.getUser().info.userName;
const userName = Digit.UserService.getUser().info.name;
let userRole = "";

roles.forEach(role => {
Expand Down
2 changes: 1 addition & 1 deletion health/micro-ui/web/workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"homepage": "/workbench-ui",
"dependencies": {
"@egovernments/digit-ui-libraries": "1.8.4",
"@egovernments/digit-ui-module-workbench": "1.0.10",
"@egovernments/digit-ui-module-workbench": "1.0.11",
"@egovernments/digit-ui-module-core": "1.8.10",
"@egovernments/digit-ui-module-utilities": "1.0.10",
"@egovernments/digit-ui-components":"0.0.2-beta.54",
Expand Down

0 comments on commit e42dcb4

Please sign in to comment.