From d728c12f78da1c67d7eafb11568baec9a560232a Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 8 Jul 2024 18:18:47 +0530 Subject: [PATCH 01/17] HRMS Search change by Nipun --- .../packages/modules/hrms/src/components/hrmscard.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js index 455ddb85b..a3e960151 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js @@ -78,6 +78,7 @@ const HRMSCard = () => { { label: t("HR_SEARCH_USER"), link: `/${window?.contextPath}/employee/hrms/search-user`, + roles:["DIV_ADMIN","STATE_ADMIN"] }, { label: t("HR_HOME_SEARCH_RESULTS_HEADING"), From de2fcff75289038af52440dee64c659d1fdd6d62 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Tue, 9 Jul 2024 15:47:20 +0530 Subject: [PATCH 02/17] Dropdown City Selection is optimized --- .../modules/core/src/components/ChangeCity.js | 66 +++++++++---------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js index c41abeb61..a52ec9415 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js @@ -10,30 +10,24 @@ const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => { return str; }; - - const ChangeCity = (prop) => { const [dropDownData, setDropDownData] = useState({ label: `TENANT_TENANTS_${stringReplaceAll(Digit.SessionStorage.get("Employee.tenantId"), ".", "_")?.toUpperCase()}`, value: Digit.SessionStorage.get("Employee.tenantId"), }); const [selectCityData, setSelectCityData] = useState([]); - const [selectedCity, setSelectedCity] = useState([]); //selectedCities?.[0]?.value const history = useHistory(); const isDropdown = prop.dropdown || false; let selectedCities = []; - const uuids = [prop.userDetails?.info?.uuid]; - const { data: userData, isUserDataLoading } = Digit.Hooks.useUserSearch(Digit.ULBService.getStateId(), { uuid: uuids }, {}); - // setSelectedCity(userData?.data?.user[0]?.roles) - - - const { data: data = {}, isLoading } = + const uuids = [prop.userDetails?.info?.uuid]; + const { data: userData, isUserDataLoading } = Digit.Hooks.useUserSearch(Digit.ULBService.getStateId(), { uuid: uuids }, {}); + const { data: mdmsData = {}, isLoading: isMdmsLoading } = Digit.Hooks.hrms.useHrmsMDMS(Digit.ULBService.getCurrentTenantId(), "egov-hrms", "HRMSRolesandDesignation") || {}; const handleChangeCity = (city) => { const loggedInData = Digit.SessionStorage.get("citizen.userRequestObject"); - const filteredRoles = Digit.SessionStorage.get("citizen.userRequestObject")?.info?.roles?.filter((role) => role.tenantId === city.value); + const filteredRoles = loggedInData?.info?.roles?.filter((role) => role.tenantId === city.value); if (filteredRoles?.length > 0) { loggedInData.info.roles = filteredRoles; loggedInData.info.tenantId = city?.value; @@ -50,39 +44,40 @@ const ChangeCity = (prop) => { }; useEffect(() => { - const userloggedValues = Digit.SessionStorage.get("citizen.userRequestObject"); - let teantsArray = [],filteredArray = []; - userData?.user[0].roles?.forEach((role) => teantsArray.push(role.tenantId)); - let unique = teantsArray.filter((item, i, ar) => ar.indexOf(item) === i); - unique?.forEach((uniCode) => { + const tenantId = Digit.SessionStorage.get("Employee.tenantId"); + + if (!tenantId || !mdmsData?.MdmsRes?.["tenant"]["tenants"] || isUserDataLoading || isMdmsLoading) { + return; + } + + const tenantIds = userData?.user[0].roles?.map((role) => role.tenantId); + + const filteredArray = mdmsData.MdmsRes["tenant"]["tenants"].filter((item) => { + if (item.code !== "pb") { // Exclude "pb" tenants + return tenantIds.includes(item.code); + } else { + return item.code === tenantId; // Include "pb" tenants matching tenantId + } + }).map((item) => ({ + label: item.code !== "pb" + ? `${prop?.t(Digit.Utils.locale.convertToLocale(item?.divisionCode, "EGOV_LOCATION_DIVISION"))} - ${prop?.t( + `TENANT_TENANTS_${stringReplaceAll(item.code, ".", "_")?.toUpperCase()}` + )}` + : `TENANT_TENANTS_${stringReplaceAll(item.code, ".", "_")?.toUpperCase()}`, + value: item.code, + })); - data?.MdmsRes?.["tenant"]["tenants"]?.map((items) => { - if (items?.code !== "pb" && items?.code === uniCode) { - filteredArray.push({ - label: `${prop?.t(Digit.Utils.locale.convertToLocale(items?.divisionCode, "EGOV_LOCATION_DIVISION"))} - ${prop?.t( - `TENANT_TENANTS_${stringReplaceAll(uniCode, ".", "_")?.toUpperCase()}` - )}`, - value: uniCode, - }); - } else if (items?.code === "pb" && items?.code === uniCode) { - filteredArray.push({ - label: `TENANT_TENANTS_${stringReplaceAll(uniCode, ".", "_")?.toUpperCase()}`, - value: uniCode, - }); - } - }); - }); - selectedCities = filteredArray?.filter((select) => select.value == Digit.SessionStorage.get("Employee.tenantId")); setSelectCityData(filteredArray); + selectedCities = filteredArray.filter((select) => select.value === tenantId); - }, [dropDownData, data?.MdmsRes]); + }, [dropDownData, mdmsData?.MdmsRes, userData, isUserDataLoading, isMdmsLoading]); return (
0 ? selectCityData : [{ label: "Loading...", value: "" }]} selected={dropDownData} optionKey={"label"} select={handleChangeCity} @@ -90,7 +85,6 @@ const ChangeCity = (prop) => { />
); - }; -export default ChangeCity; \ No newline at end of file +export default ChangeCity; From e072b1893430f53ac27e619a73589e002a88b9d7 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 15 Jul 2024 15:48:31 +0530 Subject: [PATCH 03/17] ISTE-210 FIx --- .../libraries/src/services/elements/MDMS.js | 23 +++++++++++++++++++ .../src/services/molecules/Store/service.js | 15 +++--------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/MDMS.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/MDMS.js index c7d1037a8..a12327f6e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/MDMS.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/MDMS.js @@ -63,6 +63,21 @@ const initRequestBody = (tenantId) => ({ ], }, }); +const initRequestBodyWithOutTenent = (tenantId) => ({ + MdmsCriteria: { + tenantId, + moduleDetails: [ + { + moduleName: "common-masters", + masterDetails: [{ name: "Department" }, { name: "Designation" }, { name: "StateInfo" }, { name: "wfSlaConfig" }, { name: "uiHomePage" }], + }, + { + moduleName: "DIGIT-UI", + masterDetails: [{ name: "ApiCachingSettings" }], + }, + ], + }, +}); const getCriteria = (tenantId, moduleDetails) => { return { @@ -1478,6 +1493,14 @@ export const MdmsService = { useCache: true, params: { tenantId: stateCode }, }), + initWithOutTenent: (stateCode) => + ServiceRequest({ + serviceName: "mdmsInit", + url: Urls.MDMS, + data: initRequestBodyWithOutTenent(stateCode), + useCache: true, + params: { tenantId: stateCode }, + }), call: (tenantId, details) => { return new Promise((resolve, reject) => debouncedCall( diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js index 6debb8dae..fa911c4e0 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js @@ -55,9 +55,10 @@ export const StoreService = { return await Promise.all(allBoundries); }, digitInitData: async (stateCode, enabledModules) => { - const { MdmsRes } = await MdmsService.init(stateCode); + const { MdmsRes } = await MdmsService.init(stateCode); const stateInfo = MdmsRes["common-masters"]?.StateInfo?.[0] || {}; const uiHomePage = MdmsRes["common-masters"]?.uiHomePage?.[0] || {}; + const localities = {}; const revenue_localities = {}; const initData = { @@ -80,22 +81,12 @@ export const StoreService = { initData.selectedLanguage = Digit.SessionStorage.get("locale") || initData?.languages[2] ? initData?.languages[2]?.value : initData?.languages[1]?.value; - ApiCacheService.saveSetting(MdmsRes["DIGIT-UI"]?.ApiCachingSettings); - - const moduleTenants = initData?.modules - .map((module) => module.tenants) - .flat() - .reduce((unique, ele) => (unique.find((item) => item.code === ele.code) ? unique : [...unique, ele]), []); - initData.tenants = MdmsRes?.tenant?.tenants - // ?.filter((x) => x.pgrEnabled) + initData.tenants = MdmsRes?.tenant?.tenants .map((tenant) => ({ i18nKey: `TENANT_TENANTS_${tenant.code.replace(".", "_").toUpperCase()}`, ...tenant, })); - // .filter((item) => !!moduleTenants.find((mt) => mt.code === item.code)) - // .map((tenant) => ({ i18nKey: `TENANT_TENANTS_${tenant.code.replace(".", "_").toUpperCase()}`, ...tenant })); - await LocalizationService.getLocale({ modules: [`rainmaker-common`], locale: initData.selectedLanguage, From 67f7a2a1fc872d9f01e229c6d2221f1c6941300a Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 15 Jul 2024 15:55:32 +0530 Subject: [PATCH 04/17] ISTE-238 Fix --- .../packages/react-components/src/atoms/TopBar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js index c26314496..f3ffeca78 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js @@ -45,7 +45,7 @@ const TopBar = ({
{!hideNotificationIconOnSomeUrlsWhenNotLoggedIn ? changeLanguage : null} - {!hideNotificationIconOnSomeUrlsWhenNotLoggedIn ? ( + {/* {!hideNotificationIconOnSomeUrlsWhenNotLoggedIn ? (
{notificationCountLoaded && notificationCount ? ( @@ -54,7 +54,7 @@ const TopBar = ({ ) : null}
- ) : null} + ) : null} */}
From 08454d97c66beccc2c1e8b411d19396cb0855b96 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 15 Jul 2024 16:34:45 +0530 Subject: [PATCH 05/17] ISTE-239 --- .../example/src/UICustomizations.js | 18 +++++++++++++----- .../modules/payment/src/components/OpenView.js | 17 +++++++++++++---- .../payment/src/configs/UICustomizations.js | 17 +++++++++++++---- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index 4addde2b4..07152552d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -8,11 +8,19 @@ var Digit = window.Digit || {}; function anonymizeHalfString(input) { - // Calculate the midpoint of the string - const midpoint = Math.ceil(input.length / 2); - - // Replace the first 50% of the string with asterisks - const anonymized = "*".repeat(midpoint) + input.substring(midpoint); + // Initialize an empty string to store the anonymized output + let anonymized = ""; + // Loop through each character in the input string + for (let i = 0; i < input.length; i++) { + // Check if the index (i) is even (0, 2, 4, ...) + if (i % 2 === 0) { + // Append the original character (keep it) + anonymized += input[i]; + } else { + // Append an asterisk to mask the alternate character + anonymized += "*"; + } + } return anonymized; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index baafe512d..0fe64d4f3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -5,11 +5,20 @@ import { makePayment } from "../utils/payGov"; import $ from "jquery"; function anonymizeHalfString(input) { - // Calculate the midpoint of the string - const midpoint = Math.ceil(input.length / 2); + // Initialize an empty string to store the anonymized output + let anonymized = ""; - // Replace the first 50% of the string with asterisks - const anonymized = "*".repeat(midpoint) + input.substring(midpoint); + // Loop through each character in the input string + for (let i = 0; i < input.length; i++) { + // Check if the index (i) is even (0, 2, 4, ...) + if (i % 2 === 0) { + // Append the original character (keep it) + anonymized += input[i]; + } else { + // Append an asterisk to mask the alternate character + anonymized += "*"; + } + } return anonymized; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js index 2a8e0bd33..42894d61a 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js @@ -3,11 +3,20 @@ import _ from "lodash"; import React from "react"; function anonymizeHalfString(input) { - // Calculate the midpoint of the string - const midpoint = Math.ceil(input.length / 2); + // Initialize an empty string to store the anonymized output + let anonymized = ""; - // Replace the first 50% of the string with asterisks - const anonymized = "*".repeat(midpoint) + input.substring(midpoint); + // Loop through each character in the input string + for (let i = 0; i < input.length; i++) { + // Check if the index (i) is even (0, 2, 4, ...) + if (i % 2 === 0) { + // Append the original character (keep it) + anonymized += input[i]; + } else { + // Append an asterisk to mask the alternate character + anonymized += "*"; + } + } return anonymized; } From fccf62f5be16a2943d84729b64b6e24fc6aabfa5 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 15 Jul 2024 16:49:09 +0530 Subject: [PATCH 06/17] ISTE-240 -Fix --- .../payment/src/components/OpenView.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index 0fe64d4f3..d0f3432e4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -264,18 +264,15 @@ const OpenView = () => { /> )} + + + + + + + {bill ? ( - <> - {/* - */} + <> Date: Mon, 15 Jul 2024 17:39:59 +0530 Subject: [PATCH 07/17] ISTE-244-Fix --- .../packages/modules/payment/src/components/OpenView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index d0f3432e4..e1613c371 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -326,7 +326,7 @@ const OpenView = () => { {payments && payments.map((payment) => { return ( - + { {/* {displayMenu ? : null} */} - + {showToast && ( Date: Tue, 16 Jul 2024 12:29:44 +0530 Subject: [PATCH 08/17] ISTE-245 --- .../packages/css/src/pages/employee/index.scss | 16 ++++++++++++++++ .../payment/src/configs/UICustomizations.js | 8 ++++++++ .../modules/payment/src/pages/citizen/index.js | 9 ++++++--- .../react-components/src/atoms/TopBar.js | 14 +++++++++++--- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss index 5aad56dd9..bc930dd15 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss @@ -477,8 +477,24 @@ .hamburger-span { display: none; } + + } + @media (min-width: 780px) { + .city{ + object-fit: fill !important; + height: 48px !important; + width: 48px !important; + } } } + + .hambuger-back-wrapper .city{ + border-radius: 5px !important; + object-fit: contain !important; + } + + + } @screen dt { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js index 42894d61a..f9d91f8da 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js @@ -76,6 +76,14 @@ export const UICustomizations = { // delete data.params; return data; }, + MobileDetailsOnClick: (row, tenantId) => { + let link; + Object.keys(row).map((key) => { + if (key === "MASTERS_WAGESEEKER_ID") + link = `/${window.contextPath}/employee/masters/view-wageseeker?tenantId=${tenantId}&wageseekerId=${row[key]}`; + }); + return link; + }, additionalCustomizations: (row, key, column, value, t, searchResult) => { switch (key) { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/pages/citizen/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/pages/citizen/index.js index afd0a64f9..3dfd31f61 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/pages/citizen/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/pages/citizen/index.js @@ -15,10 +15,13 @@ const CitizenApp = ({ path }) => { return ( -
+ margin: "0 auto", + marginTop:"2rem", + }} + > {!excludeBackBtn?.some(url => location.pathname.includes(url)) && {t("CS_COMMON_BACK")}}
In Open Payment Module
} /> diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js index f3ffeca78..554ac6188 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js @@ -29,18 +29,26 @@ const TopBar = ({ // return ; // } // }; + + + const url = window.location.pathname; // Get the current URL pathname + const isPaymentPath = url.includes('/payment/'); // Check for payment path + + const paymentlogoUrl = isPaymentPath + ? window?.globalConfigs?.getConfig?.("LOGO_URL") // Show payment logo if path matches + : logoUrl; return (
- {isMobile && } + {isMobile && !isPaymentPath && } -

{cityOfCitizenShownBesideLogo}

+ {!isPaymentPath &&

{cityOfCitizenShownBesideLogo}

}
From 1af44f1774c2db3ba4d894409625ebade7fb72e2 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Tue, 16 Jul 2024 18:09:35 +0530 Subject: [PATCH 09/17] ISTE-241 and ISTE-240 --- .../payment/src/components/OpenView.js | 150 +++++++++++++----- 1 file changed, 111 insertions(+), 39 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index e1613c371..eafb508c4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -47,7 +47,7 @@ const OpenView = () => { const requestCriteriaForConnectionSearch = { url: "/ws-services/wc/_search?", - params: { tenantId:queryParams.tenantId,businessService:queryParams.businessService, connectionNumber: queryParams.consumerCode,isOpenPaymentSearch:true }, + params: { tenantId: queryParams.tenantId, businessService: queryParams.businessService, connectionNumber: queryParams.consumerCode, isOpenPaymentSearch: true }, body: {}, options: { userService: false, @@ -66,7 +66,7 @@ const OpenView = () => { const requestCriteriaForPayments = { url: "/collection-services/payments/WS/_search", - params: {consumerCodes:queryParams.consumerCode,tenantId:queryParams.tenantId,businessService:queryParams.businessService}, + params: { consumerCodes: queryParams.consumerCode, tenantId: queryParams.tenantId, businessService: queryParams.businessService }, body: {}, options: { userService: false, @@ -87,10 +87,41 @@ const OpenView = () => { }, }; - const { isLoading: isLoadingPayments, data: payments, isFetching: isFetchingPayments, error: isErrorPayments } = Digit.Hooks.useCustomAPIHook( - requestCriteriaForPayments + const requestCriteriaForOnlineTransactions = { + url: "/pg-service/transaction/v1/_search", + params: { consumerCodes: queryParams.consumerCode, tenantId: queryParams.tenantId, businessService: queryParams.businessService }, + body: {}, + options: { + userService: false, + auth: false, + }, + config: { + enabled: !!queryParams.consumerCode && !!queryParams.tenantId, + select: (data) => { + const onlineTransactions = data?.Transaction; + + if (!onlineTransactions) { + return null; // Handle undefined or null data gracefully + } + + // Sort onlineTransactions in descending order by createdTime + onlineTransactions.sort((a, b) => b.auditDetails.createdTime - a.auditDetails.createdTime); + + // Return the desired number of latest transactions (up to 5) + return onlineTransactions.slice(0, Math.min(onlineTransactions.length, 5)); + }, + }, + }; + + const { isLoading: isLoadingTransactions, data: onlineTransactions, isFetching: isFetchingTransactions, error: isErrorTransactions } = Digit.Hooks.useCustomAPIHook( + requestCriteriaForOnlineTransactions ); + // const { isLoading: isLoadingPayments, data: payments, isFetching: isFetchingPayments, error: isErrorPayments } = Digit.Hooks.useCustomAPIHook( + // requestCriteriaForPayments + // ); + + const arrears = bill?.billDetails ?.sort((a, b) => b.fromPeriod - a.fromPeriod) @@ -207,10 +238,41 @@ const OpenView = () => { } }; - if (isLoading || isLoadingPayments || isLoadingConnection) { + if (isLoading || isLoadingTransactions || isLoadingConnection) { return ; } + + function convertEpochToDateString(epochTime) { + const date = new Date(epochTime); + + // Extract components + const day = date.getDate(); + const month = date.getMonth() + 1; // Months are zero-indexed + const year = date.getFullYear(); + let hours = date.getHours(); + const minutes = date.getMinutes(); + const seconds = date.getSeconds(); + + // Determine AM/PM + const ampm = hours >= 12 ? 'PM' : 'AM'; + + // Convert to 12-hour format + hours = hours % 12; + hours = hours ? hours : 12; // the hour '0' should be '12' + + // Pad minutes and seconds with leading zeros + const minutesPadded = minutes < 10 ? '0' + minutes : minutes; + const secondsPadded = seconds < 10 ? '0' + seconds : seconds; + + // Format date and time + const formattedDate = `${day} July ${year} at ${hours}:${minutesPadded}:${secondsPadded} ${ampm}`; + + return formattedDate; + } + + + return ( <>
@@ -264,15 +326,19 @@ const OpenView = () => { /> )} - - + +
+ {t("ES_PAYMENT_TAXHEADS")} +
+ + + - {bill ? ( - <> + <> { )} - {payments && ( + {onlineTransactions && (
{t("OP_CONSUMER_RECEIPTS")}
)} - {payments && - payments.map((payment) => { - return ( - - - - - - {/* */} - - - ); - })} + {onlineTransactions && onlineTransactions.map((item) => { + return ( + + + + + + + + + + + + ); + }) + } {/* {displayMenu ? : null} */} - + {showToast && ( Date: Wed, 17 Jul 2024 11:36:32 +0530 Subject: [PATCH 10/17] ISTE-240 -FIX --- .../packages/css/src/pages/employee/index.scss | 10 +++++----- .../packages/react-components/src/atoms/TopBar.js | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss index bc930dd15..49985abca 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss @@ -477,20 +477,20 @@ .hamburger-span { display: none; } - - } - @media (min-width: 780px) { .city{ - object-fit: fill !important; height: 48px !important; width: 48px !important; + padding: 0px !important; } + } + } .hambuger-back-wrapper .city{ + object-fit: scale-down !important; border-radius: 5px !important; - object-fit: contain !important; + padding: 1px 15px !important; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js index 554ac6188..5e691659c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js @@ -40,7 +40,8 @@ const TopBar = ({ return (
-
+
{isMobile && !isPaymentPath && } mSeva + { isPaymentPath && } {!isPaymentPath &&

{cityOfCitizenShownBesideLogo}

}
From 611b995d5560b07b6e58fd3a17a0ccbf0591eebb Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Thu, 18 Jul 2024 13:13:04 +0530 Subject: [PATCH 11/17] ISTE-186 --- .../components/pageComponents/jurisdiction.js | 81 +++++++++++++++---- 1 file changed, 66 insertions(+), 15 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js index 0a4290de8..1474eb067 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js @@ -180,24 +180,72 @@ const Jurisdictions = ({ t, config, onSelect, userType, formData }) => { }; const handleAddUnit = () => { - setjurisdictions((prev) => [ - ...prev, - { - key: prev.length + 1, - hierarchy: null, - boundaryType: null, - boundary: null, - division: null, - divisionBoundary: [], - roles: [], - }, - ]); + if(STATE_ADMIN){ + if(!isEdit){ + setjurisdictions((prev) => [ + ...prev, + { + key: prev.length + 1, + hierarchy: null, + boundaryType: null, + boundary: null, + division: null, + divisionBoundary: [], + roles: [], + }, + ]); + setjurisdictions((prev) => prev.map((unit, index) => ({ ...unit, key: index }))); + }else{ + setJuristictionsData((prev) => [ + ...prev, + { + key: prev.length + 1, + hierarchy: null, + boundaryType: null, + boundary: null, + division: null, + divisionBoundary: [], + roles: [], + }, + ]); + setJuristictionsData((prev) => prev.map((unit, index) => ({ ...unit, key: index }))); + } + + }else{ + setjurisdictions((prev) => [ + ...prev, + { + key: prev.length + 1, + hierarchy: null, + boundaryType: null, + boundary: null, + division: null, + divisionBoundary: [], + roles: [], + }, + ]); + setjurisdictions((prev) => prev.map((unit, index) => ({ ...unit, key: index }))); + + } + + + }; const handleRemoveUnit = (unit) => { if(STATE_ADMIN){ - const updatedJurisdictionsData = jurisdictionsData.filter( - (element) => element.key !== unit.key - ); + let updatedJurisdictionsData = []; + if(!isEdit){ + updatedJurisdictionsData = jurisdictions.filter( + (element) => element.key !== unit.key + ); + } + else{ + updatedJurisdictionsData = jurisdictionsData.filter( + (element) => element.key !== unit.key + ); + } + + setJuristictionsData(updatedJurisdictionsData); setjurisdictions(updatedJurisdictionsData) if (FormData.errors?.Jurisdictions?.type == unit.key) { @@ -206,6 +254,8 @@ const Jurisdictions = ({ t, config, onSelect, userType, formData }) => { reviseIndexKeys(); } + + else{ if (unit.id) { let res = { @@ -270,6 +320,7 @@ const Jurisdictions = ({ t, config, onSelect, userType, formData }) => { if (isLoading && isUserDataLoading) { return ; } + console.log((isEdit && STATE_ADMIN),"isEdit && STATE_ADMIN"); return (
{isEdit && STATE_ADMIN ? ( From d0bc522eed09b967af740cdef8341319467ed9d6 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Thu, 18 Jul 2024 14:23:41 +0530 Subject: [PATCH 12/17] ISTE-275,246,243,ISTE-254, --- .../packages/css/src/pages/employee/index.scss | 3 +++ .../modules/payment/src/components/OpenView.js | 2 +- .../modules/payment/src/configs/OpenSearchConfig.js | 2 +- .../packages/react-components/src/atoms/TopBar.js | 13 ++++++++----- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss index 49985abca..e10cd0479 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss @@ -369,6 +369,9 @@ fill: theme(colors.white); } } + display: flex; + justify-content: center; + align-items: center; } @media (min-width: 640px) { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index eafb508c4..2a205725f 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -331,7 +331,7 @@ const OpenView = () => {
- {t("ES_PAYMENT_TAXHEADS")} + {t("ES_PAYMENT_DETAILS_HEADER")}
diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js index 628cf3cbb..f11871aae 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js @@ -180,7 +180,7 @@ export const OpenSearchConfig = { // "showActionBarMobileCard": true, // "actionButtonLabelMobileCard": "TQM_VIEW_RESULTS", "enableGlobalSearch": false, - "enableColumnSort": true, + "enableColumnSort": false, "resultsJsonPath": "WaterConnection", "tableClassName":"table pqm-table" }, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js index 5e691659c..e92ae2e43 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js @@ -37,11 +37,14 @@ const TopBar = ({ const paymentlogoUrl = isPaymentPath ? window?.globalConfigs?.getConfig?.("LOGO_URL") // Show payment logo if path matches : logoUrl; + console.log(isPaymentPath,"isPaymentPath"); return (
-
+
{isMobile && !isPaymentPath && } mSeva - { isPaymentPath && } - {!isPaymentPath &&

{cityOfCitizenShownBesideLogo}

} + {isPaymentPath && } + {!isPaymentPath &&

{cityOfCitizenShownBesideLogo}

}
- {!hideNotificationIconOnSomeUrlsWhenNotLoggedIn ? changeLanguage : null} + {!hideNotificationIconOnSomeUrlsWhenNotLoggedIn || isPaymentPath ? changeLanguage : null} {/* {!hideNotificationIconOnSomeUrlsWhenNotLoggedIn ? (
{notificationCountLoaded && notificationCount ? ( From 63542a5f22430fdd0ef9127c1ef727001bc1c02a Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Fri, 26 Jul 2024 14:07:10 +0530 Subject: [PATCH 13/17] ISTE-237 - FIX --- .../css/src/pages/employee/index.scss | 41 +++++++++++++++++ .../react-components/src/atoms/TopBar.js | 44 +++++++++++++++++-- 2 files changed, 82 insertions(+), 3 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss index e10cd0479..759978759 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss @@ -350,6 +350,47 @@ } } +.dropdown-user .dropbtn{ + color: white; + font-size: 1rem; + margin: 10px; + background-color: #efefef00; +} +.dropdown-user { + position: relative; /* Make the dropdown relative to its container */ + display: inline-block; +} + +.dropdown-user-overlay { + position: absolute; /* Position the overlay absolutely relative to the dropdown */ + top: 100%; /* Position the overlay below the button */ + left: 0; /* Align the overlay to the left of the button */ + background-color: #f1f1f1; /* Set background color */ + min-width: 160px; /* Set minimum width */ + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); /* Add shadow */ + z-index: 1; /* Set z-index to display on top of other elements */ + display: none; /* Hide by default */ +} + +.dropdown-user-content { + padding: 0; /* Remove default padding from ul */ + list-style: none; /* Remove default list style */ +} + +.dropdown-user-content li { + border-bottom: solid 1px !important; + border-color: black !important; + padding: 12px 12px; /* Add padding to list items */ +} +.dropdown-user-link { + text-decoration: none !important; /* Remove underline from links inside list items */ +} + +.dropdown-user:hover .dropdown-user-overlay { + display: block; /* Show overlay on hover */ +} + + .RightMostTopBarOptions { @apply flex; .EventNotificationWrapper { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js index e92ae2e43..0abdaeeee 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react"; import PropTypes from "prop-types"; import Hamburger from "./Hamburger"; import { NotificationBell } from "./svgindex"; -import { useLocation } from "react-router-dom"; +import { useLocation, Link } from "react-router-dom"; import BackButton from "./BackButton"; const TopBar = ({ @@ -20,6 +20,11 @@ const TopBar = ({ hideNotificationIconOnSomeUrlsWhenNotLoggedIn, changeLanguage, }) => { + const [isOpen, setIsOpen] = useState(false); + + const handleClick = () => { + setIsOpen(!isOpen); + }; const { pathname } = useLocation(); // const showHaburgerorBackButton = () => { @@ -37,7 +42,7 @@ const TopBar = ({ const paymentlogoUrl = isPaymentPath ? window?.globalConfigs?.getConfig?.("LOGO_URL") // Show payment logo if path matches : logoUrl; - console.log(isPaymentPath,"isPaymentPath"); + console.log(isPaymentPath, "isPaymentPath"); return (
@@ -57,7 +62,36 @@ const TopBar = ({
- {!hideNotificationIconOnSomeUrlsWhenNotLoggedIn || isPaymentPath ? changeLanguage : null} + +
+ + {isOpen && ( +
+
    +
  • + Admin Login +
  • +
  • + Employee Login +
  • +
+
+ )} +
+ + {!hideNotificationIconOnSomeUrlsWhenNotLoggedIn || isPaymentPath ? changeLanguage : null} + {/* {!hideNotificationIconOnSomeUrlsWhenNotLoggedIn ? (
{notificationCountLoaded && notificationCount ? ( @@ -68,6 +102,10 @@ const TopBar = ({
) : null} */} +
+ +
+
From c7f49e575b464a976908928b9fce3b2596e6c7a0 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 29 Jul 2024 14:06:18 +0530 Subject: [PATCH 14/17] ISTE -277 FIX --- .../packages/modules/payment/src/components/OpenView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index 2a205725f..0c3b1daa7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -89,7 +89,7 @@ const OpenView = () => { const requestCriteriaForOnlineTransactions = { url: "/pg-service/transaction/v1/_search", - params: { consumerCodes: queryParams.consumerCode, tenantId: queryParams.tenantId, businessService: queryParams.businessService }, + params: { consumerCode: queryParams.consumerCode, tenantId: queryParams.tenantId, businessService: queryParams.businessService }, body: {}, options: { userService: false, From 72f95784f79a572f4fe7406f549fd94c836d7c8d Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Tue, 30 Jul 2024 00:30:29 +0530 Subject: [PATCH 15/17] ISTE--282 FIX --- .../components/pageComponents/jurisdiction.js | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js index 1474eb067..5ff0f0e2f 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js @@ -231,28 +231,44 @@ const Jurisdictions = ({ t, config, onSelect, userType, formData }) => { }; + + function filterJurisdictions(unit, jurisdictions) { + const divisionBoundaryCodes = new Set(unit.divisionBoundary.map(item => item.code)); + return jurisdictions.filter(jurisdiction => { + return !divisionBoundaryCodes.has(jurisdiction.boundary.code); + }); + } const handleRemoveUnit = (unit) => { if(STATE_ADMIN){ - let updatedJurisdictionsData = []; if(!isEdit){ - updatedJurisdictionsData = jurisdictions.filter( + setjurisdictions(jurisdictions.filter( (element) => element.key !== unit.key - ); + )); + setjurisdictions((prev) => prev.map((unit, index) => ({ ...unit, key: index }))); } else{ - updatedJurisdictionsData = jurisdictionsData.filter( + setJuristictionsData(jurisdictionsData.filter( (element) => element.key !== unit.key - ); + )); + let filterJurisdictionsItems = filterJurisdictions(unit,jurisdictions); + setjurisdictions(filterJurisdictionsItems); + setjurisdictions((prev) => prev.map((unit, index) => ({ ...unit, key: index }))); } + // console.log(jurisdictions,"jurisdictions"); + // console.log(jurisdictionsData,"jurisdictionsData"); + // setJuristictionsData((pre) => pre.filter((el) => el.key !== unit.key)); + + - setJuristictionsData(updatedJurisdictionsData); - setjurisdictions(updatedJurisdictionsData) + + + // setjurisdictions(jurisdictions.filter((element) => element.key !== unit.key)); + // setjurisdictions((prev) => prev.filter((el) => el.key !== unit.key)); if (FormData.errors?.Jurisdictions?.type == unit.key) { clearErrors("Jurisdictions"); } reviseIndexKeys(); - } From d603564a444729106ae1171afe89e68106a0cb4e Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Tue, 30 Jul 2024 01:25:31 +0530 Subject: [PATCH 16/17] ISTE-189 - FIX --- frontend/mgramseva/lib/model/demand/demand_list.dart | 2 ++ frontend/mgramseva/lib/model/demand/demand_list.g.dart | 3 +++ 2 files changed, 5 insertions(+) diff --git a/frontend/mgramseva/lib/model/demand/demand_list.dart b/frontend/mgramseva/lib/model/demand/demand_list.dart index 93f894ffe..bacd07f51 100644 --- a/frontend/mgramseva/lib/model/demand/demand_list.dart +++ b/frontend/mgramseva/lib/model/demand/demand_list.dart @@ -143,6 +143,8 @@ class AggragateDemandDetails { double? currentMonthPenalty; @JsonKey(name: "currentmonthTotalDue") double? currentmonthTotalDue; + @JsonKey(name: "currentmonthRoundOff") + double? currentmonthRoundOff; @JsonKey(name: "totalAreas") double? totalAreas; @JsonKey(name: "totalAreasWithPenalty") diff --git a/frontend/mgramseva/lib/model/demand/demand_list.g.dart b/frontend/mgramseva/lib/model/demand/demand_list.g.dart index fa1596193..b94e57d19 100644 --- a/frontend/mgramseva/lib/model/demand/demand_list.g.dart +++ b/frontend/mgramseva/lib/model/demand/demand_list.g.dart @@ -142,6 +142,8 @@ AggragateDemandDetails _$AggragateDemandDetailsFromJson( ..currentMonthPenalty = (json['currentMonthPenalty'] as num?)?.toDouble() ..currentmonthTotalDue = (json['currentmonthTotalDue'] as num?)?.toDouble() + ..currentmonthRoundOff = + (json['currentmonthRoundOff'] as num?)?.toDouble() ..totalAreas = (json['totalAreas'] as num?)?.toDouble() ..totalAreasWithPenalty = (json['totalAreasWithPenalty'] as num?)?.toDouble() @@ -174,6 +176,7 @@ Map _$AggragateDemandDetailsToJson( 'currentmonthBill': instance.currentmonthBill, 'currentMonthPenalty': instance.currentMonthPenalty, 'currentmonthTotalDue': instance.currentmonthTotalDue, + 'currentmonthRoundOff': instance.currentmonthRoundOff, 'totalAreas': instance.totalAreas, 'totalAreasWithPenalty': instance.totalAreasWithPenalty, 'netdue': instance.netdue, From 67cf72bf332529c5ac9c0501ca4e6ea7facb2304 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Tue, 30 Jul 2024 01:34:10 +0530 Subject: [PATCH 17/17] ISTE-251 - FIX --- .../house_connection_and_bill/new_consumer_bill.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart b/frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart index 80fb993a6..a1db22d2b 100644 --- a/frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart +++ b/frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart @@ -243,10 +243,15 @@ class NewConsumerBillState extends State { houseHoldProvider.isfirstdemand) getLabelText( i18.common.CORE_ADVANCE_ADJUSTED, + + double.parse(CommonProvider + .getAdvanceAdjustedAmount( + widget + .demandList)) == 0 ? "₹ ${houseHoldProvider.aggDemandItems?.remainingAdvance}" : double.parse(CommonProvider .getAdvanceAdjustedAmount( widget - .demandList)) <= + .demandList)) < 0 ? "₹ ${double.parse(CommonProvider.getAdvanceAdjustedAmount(widget.demandList))}" : '- ₹${double.parse(CommonProvider.getAdvanceAdjustedAmount(widget.demandList))}',