From 35d6d4621797053d998900c7f99e7098cdbfed4f Mon Sep 17 00:00:00 2001 From: kams Date: Wed, 23 Oct 2024 12:17:03 +0530 Subject: [PATCH] changed scheduledFrom to start of the day and centered the link column in table --- .../micro-ui-internals/example/package.json | 2 +- .../Mukta/src/configs/UICustomizations.js | 4 +- .../packages/modules/Expenditure/package.json | 2 +- .../src/components/PaymentTrackerTable.js | 46 ++++++++++++++----- frontend/micro-ui/web/package.json | 2 +- 5 files changed, 39 insertions(+), 17 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index e9174a9129..804d8c826a 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -21,7 +21,7 @@ "@egovernments/digit-ui-module-estimate": "0.4.21", "@egovernments/digit-ui-module-masters": "0.4.20", "@egovernments/digit-ui-module-project": "0.4.16", - "@egovernments/digit-ui-module-expenditure": "0.4.20", + "@egovernments/digit-ui-module-expenditure": "0.4.21", "@egovernments/digit-ui-customisation-mukta": "0.2.13", "@egovernments/digit-ui-module-rate-analysis": "0.4.16", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/Mukta/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/Mukta/src/configs/UICustomizations.js index 3805b47ae9..36bb3f03a9 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/Mukta/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/Mukta/src/configs/UICustomizations.js @@ -2882,7 +2882,7 @@ export const UICustomizations = { }, ViewScheduledJobsConfig: { preProcess: (data) => { - const scheduledFrom = Digit.Utils.pt.convertDateToEpoch(data?.body?.SearchCriteria?.scheduleFrom); + const scheduledFrom = Digit.Utils.pt.convertDateToEpoch(data?.body?.SearchCriteria?.scheduleFrom, "daystart"); const scheduledTo = Digit.Utils.pt.convertDateToEpoch(data.body.SearchCriteria?.scheduleTo); const status = data.body.SearchCriteria?.status?.code; data.params = { ...data.params, tenantId: Digit.ULBService.getCurrentTenantId(), includeAncestors: true }; @@ -2960,7 +2960,7 @@ export const UICustomizations = { }, ViewScheduledJobsExcelConfig: { preProcess: (data) => { - const scheduledFrom = Digit.Utils.pt.convertDateToEpoch(data?.body?.reportSearchCriteria?.scheduledFrom); + const scheduledFrom = Digit.Utils.pt.convertDateToEpoch(data?.body?.reportSearchCriteria?.scheduledFrom, "daystart"); const scheduledTo = Digit.Utils.pt.convertDateToEpoch(data.body.reportSearchCriteria?.scheduledTo); const status = data.body.reportSearchCriteria?.status?.code; data.params = { ...data.params, tenantId: Digit.ULBService.getCurrentTenantId(), includeAncestors: true }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/Expenditure/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/Expenditure/package.json index d6fb26d8d5..73418b5200 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/Expenditure/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/Expenditure/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-expenditure", - "version": "0.4.20", + "version": "0.4.21", "description": "Expenditure Management Module UI", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/Expenditure/src/components/PaymentTrackerTable.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/Expenditure/src/components/PaymentTrackerTable.js index e2b14534c3..b434dcb2f2 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/Expenditure/src/components/PaymentTrackerTable.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/Expenditure/src/components/PaymentTrackerTable.js @@ -1,7 +1,7 @@ -import { Table, CheckBox, LinkLabel } from '@egovernments/digit-ui-react-components' +import { Table, CheckBox } from '@egovernments/digit-ui-react-components' import React, { useEffect, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' -import { useHistory } from "react-router-dom"; +import { useHistory, Link } from "react-router-dom"; const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { const { t } = useTranslation(); @@ -16,8 +16,19 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { Header: t("BILL_NUMBER"), accessor: "billNumber", Cell: ({ value, column, row }) => { - return ( - history.push(`/${window.contextPath}/employee/expenditure/purchase-bill-details?tenantId=${tenantId}&billNumber=${value}&workOrderNumber=${row.original.workOrderNumber}`)}>{String(t(value))} + return ( +
+ {value ? ( + + + {value || t("ES_COMMON_NA")} + + + ) : ( + {t("ES_COMMON_NA")} + )} +
) } }, @@ -25,7 +36,7 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { Header: t("BILL_TYPE"), accessor: "billType", Cell: ({ value, column, row }) => { - return String(t(value)); + return String(t(value || "ES_COMMON_NA")); } }, { @@ -54,8 +65,19 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { if (value === "NA") { return String(t("NA")); } - return ( - history.push(`/${window.contextPath}/employee/expenditure/view-payment?tenantId=${tenantId}&paymentNumber=${row.original.paymentNumber}`)}>{String(t(value))} + return ( +
+ {value ? ( + + + {value || t("ES_COMMON_NA")} + + + ) : ( + {t("ES_COMMON_NA")} + )} +
) } }, @@ -67,7 +89,7 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { ), accessor: "parentPi", Cell: ({ value, column, row }) => { - return String(t(value)); + return String(t(value || "ES_COMMON_NA")); } }, { @@ -78,7 +100,7 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { ), accessor: "piType", Cell: ({ value, column, row }) => { - return String(t(value)); + return String(t(value || "ES_COMMON_NA")); } }, { @@ -89,7 +111,7 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { ), accessor: "piCreationDate", Cell: ({ value, column, row }) => { - return String(t(value)); + return String(t(value || "ES_COMMON_NA")); } }, { @@ -115,7 +137,7 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { ), accessor: "piDate", Cell: ({ value, column, row }) => { - return String(t(value)); + return String(t(value || "ES_COMMON_NA")); } }, { @@ -126,7 +148,7 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => { ), accessor: "piStatus", Cell: ({ value, column, row }) => { - return String(t(value)); + return String(t(value || "ES_COMMON_NA")); } }, { diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index cf824963b1..e794443b41 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -28,7 +28,7 @@ "@egovernments/digit-ui-module-estimate": "0.4.21", "@egovernments/digit-ui-module-masters": "0.4.20", "@egovernments/digit-ui-module-project": "0.4.16", - "@egovernments/digit-ui-module-expenditure": "0.4.20", + "@egovernments/digit-ui-module-expenditure": "0.4.21", "@egovernments/digit-ui-customisation-mukta": "0.2.13", "@egovernments/digit-ui-module-rate-analysis": "0.4.16", "babel-loader": "8.1.0",