Skip to content

Commit

Permalink
CSS Issue fix, locaisation/mdms cache issue fix (#1418)
Browse files Browse the repository at this point in the history
* added fixes

* css version

* fix caching issue

* localization fixes

---------

Co-authored-by: aaradhya-egov <[email protected]>
  • Loading branch information
nabeelmd-eGov and aaradhya-egov authored Sep 23, 2024
1 parent 999c855 commit 15a5fbb
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 82 deletions.
2 changes: 1 addition & 1 deletion micro-ui/web/micro-ui-internals/packages/css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-css",
"version": "1.8.2-beta.25",
"version": "1.8.2-beta.26",
"license": "MIT",
"main": "dist/index.css",
"author": "Jagankumar <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,25 @@ digit-card-text.center {
}
}
}
.homeWrapper{
.digit-card-component{
.digit-card-header{
color: #0b4b66 !important;
font-size: 1.87rem !important;
text-align: center;
font-weight: 700;
}
}
}

.homeWrapper{
.digit-card-component{
.digit-card-text{
font-size: 1rem !important;
font-weight: 700;
}
}
}
.homeWrapper{
.digit-employee-card{
.digit-card-text{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ const LocalizationStore = {
get: (locale, modules) => {
const storedModules = LocalizationStore.getList(locale);
const newModules = modules.filter((module) => !storedModules.includes(module));
if(Digit.Utils.getMultiRootTenant()){
newModules.push("digit-tenants")
}
const messages = [];
storedModules.forEach((module) => {
messages.push(...LocalizationStore.getCaheData(LOCALE_MODULE(locale, module)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ const getBillsGenieKey = (tenantId, moduleCode) => ({
masterDetails: [{ name: "tenants" }, { name: "citymodule" }],
},
{
moduleName: "common-masters",
masterDetails: [{name: "uiCommonPay"}]
moduleName: "common-masters",
masterDetails: [{ name: "uiCommonPay" }]
}
],
},
Expand Down Expand Up @@ -638,32 +638,32 @@ const getGenderTypeList = (tenantId, moduleCode, type) => ({
});

const getMeterStatusTypeList = (tenantId) => ({
moduleDetails: [
{
moduleName: "ws-services-calculation",
masterDetails: [
{
name: "MeterStatus",
filter: `$.*.name`
},
],
},
],
moduleDetails: [
{
moduleName: "ws-services-calculation",
masterDetails: [
{
name: "MeterStatus",
filter: `$.*.name`
},
],
},
],

});

const getBillingPeriodValidation = (tenantId) => ({
moduleDetails: [
{
moduleName: "ws-services-masters",
masterDetails: [
{
name: "billingPeriod",
filter: "*"
},
],
},
],
moduleDetails: [
{
moduleName: "ws-services-masters",
masterDetails: [
{
name: "billingPeriod",
filter: "*"
},
],
},
],
});

const getDssDashboardCriteria = (tenantId, moduleCode) => ({
Expand Down Expand Up @@ -915,53 +915,53 @@ const getWSTaxHeadMasterCritera = (tenantId, moduleCode, type) => ({
});

const getHowItWorksJSON = (tenantId) => ({
moduleDetails: [
{
moduleName: "common-masters",
masterDetails: [
{
name: "howItWorks",
},
],
},
],
moduleDetails: [
{
moduleName: "common-masters",
masterDetails: [
{
name: "howItWorks",
},
],
},
],
});

const getFAQsJSON = (tenantId) => ({
moduleDetails: [
{
moduleName: "common-masters",
masterDetails: [
{
name: "faqs",
},
],
},
],
{
moduleName: "common-masters",
masterDetails: [
{
name: "faqs",
},
],
},
],
});
const getDSSFAQsJSON = (tenantId) => ({
moduleDetails: [
{
moduleName: "dss-dashboard",
masterDetails: [
{
name: "FAQs",
},
],
},
],
{
moduleName: "dss-dashboard",
masterDetails: [
{
name: "FAQs",
},
],
},
],
});
const getDSSAboutJSON = (tenantId) => ({
moduleDetails: [
{
moduleName: "dss-dashboard",
masterDetails: [
{
name: "About",
},
],
},
],
{
moduleName: "dss-dashboard",
masterDetails: [
{
name: "About",
},
],
},
],
});

const getStaticData = () => ({
Expand Down Expand Up @@ -1028,30 +1028,30 @@ const GetVehicleMakeModel = (MdmsRes) =>
...vehicleDetails,
i18nKey: `COMMON_MASTER_VEHICLE_${vehicleDetails.code}`,
};
});
});

const GetSlumLocalityMapping = (MdmsRes, tenantId) =>
MdmsRes["FSM"].Slum.filter((type) => type.active).reduce((prev, curr) => {
return prev[curr.locality]
? {
...prev,
[curr.locality]: [
...prev[curr.locality],
{
...curr,
i18nKey: `${tenantId.toUpperCase().replace(".", "_")}_${curr.locality}_${curr.code}`,
},
],
}
...prev,
[curr.locality]: [
...prev[curr.locality],
{
...curr,
i18nKey: `${tenantId.toUpperCase().replace(".", "_")}_${curr.locality}_${curr.code}`,
},
],
}
: {
...prev,
[curr.locality]: [
{
...curr,
i18nKey: `${tenantId.toUpperCase().replace(".", "_")}_${curr.locality}_${curr.code}`,
},
],
};
...prev,
[curr.locality]: [
{
...curr,
i18nKey: `${tenantId.toUpperCase().replace(".", "_")}_${curr.locality}_${curr.code}`,
},
],
};
}, {});

const GetPropertyOwnerShipCategory = (MdmsRes) =>
Expand Down Expand Up @@ -1503,7 +1503,7 @@ export const MdmsService = {
const { MdmsRes } = await MdmsService.call(tenantId, mdmsDetails.details);
const responseValue = transformResponse(mdmsDetails.type, MdmsRes, moduleCode.toUpperCase(), tenantId);
const cacheSetting = getCacheSetting(mdmsDetails.details.moduleDetails[0].moduleName);
PersistantStorage.set(key, responseValue, cacheSetting.cacheTimeInSecs);
PersistantStorage.set(key, responseValue, Digit.Utils.getMultiRootTenant() ? 0 : cacheSetting.cacheTimeInSecs);
return responseValue;
},
getServiceDefs: (tenantId, moduleCode) => {
Expand Down Expand Up @@ -1720,7 +1720,7 @@ export const MdmsService = {
getDSSFAQsJSONData: (tenantId) => {
return MdmsService.call(tenantId, getDSSFAQsJSON(tenantId));
},

getDSSAboutJSONData: (tenantId) => {
return MdmsService.call(tenantId, getDSSAboutJSON(tenantId));
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ const SetupMaster = () => {
config: {
enabled: Boolean(filters),
select: (data) => {
if (_.isEmpty(data?.MdmsRes)) {
return false
}
const resp = data?.MdmsRes;
const checkMasterDataCompleteness = Object.values(resp).every((category) =>
Object.values(category).every((items) => items.every((item) => parseInt(item.count) > 0))
Expand Down

0 comments on commit 15a5fbb

Please sign in to comment.