Skip to content

Commit

Permalink
Merge pull request #753 from odisha-muktasoft/UCEM-843-7-UAT
Browse files Browse the repository at this point in the history
changed scheduledFrom to start of the day and centered the link colum…
  • Loading branch information
Tulika-eGov authored Oct 23, 2024
2 parents ea3849d + 35d6d46 commit 6a1bc68
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -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 };
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -16,16 +16,27 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => {
Header: t("BILL_NUMBER"),
accessor: "billNumber",
Cell: ({ value, column, row }) => {
return (
<LinkLabel onClick={() => history.push(`/${window.contextPath}/employee/expenditure/purchase-bill-details?tenantId=${tenantId}&billNumber=${value}&workOrderNumber=${row.original.workOrderNumber}`)}>{String(t(value))}</LinkLabel>
return (
<div>
{value ? (
<span className={"link"}>
<Link
to={`/${window.contextPath}/employee/expenditure/purchase-bill-details?tenantId=${tenantId}&billNumber=${value}&workOrderNumber=${row.original.workOrderNumber}`}>
{value || t("ES_COMMON_NA")}
</Link>
</span>
) : (
<span>{t("ES_COMMON_NA")}</span>
)}
</div>
)
}
},
{
Header: t("BILL_TYPE"),
accessor: "billType",
Cell: ({ value, column, row }) => {
return String(t(value));
return String(t(value || "ES_COMMON_NA"));
}
},
{
Expand Down Expand Up @@ -54,8 +65,19 @@ const PaymentTrackerTable = ({excludeFailed, setExcludeFailed, ...props}) => {
if (value === "NA") {
return String(t("NA"));
}
return (
<LinkLabel onClick={() => history.push(`/${window.contextPath}/employee/expenditure/view-payment?tenantId=${tenantId}&paymentNumber=${row.original.paymentNumber}`)}>{String(t(value))}</LinkLabel>
return (
<div>
{value ? (
<span className={"link"}>
<Link
to={`/${window.contextPath}/employee/expenditure/view-payment?tenantId=${tenantId}&paymentNumber=${row.original.paymentNumber}`}>
{value || t("ES_COMMON_NA")}
</Link>
</span>
) : (
<span>{t("ES_COMMON_NA")}</span>
)}
</div>
)
}
},
Expand All @@ -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"));
}
},
{
Expand All @@ -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"));
}
},
{
Expand All @@ -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"));
}
},
{
Expand All @@ -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"));
}
},
{
Expand All @@ -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"));
}
},
{
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 @@ -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",
Expand Down

0 comments on commit 6a1bc68

Please sign in to comment.