Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URC Changes merged in Frontend SANITATION #646

Open
wants to merge 24 commits into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
347a7f0
Added frontend URC Changes
mukund-egov Nov 21, 2024
cdeba4e
Added more URC changes
mukund-egov Dec 4, 2024
8577112
Solved fsm dashboard crash and vehicle tracking alert crash issues
mukund-egov Dec 4, 2024
0bab9f8
Changed the same urc code inside micro-ui-internals
mukund-egov Dec 4, 2024
a7f08c1
Fixed citizen-ui redirection from vehicle log in inbox
mukund-egov Dec 4, 2024
3ae1896
Last commit continued
mukund-egov Dec 4, 2024
41f13e8
Solved digit-ui-component css issue
mukund-egov Dec 4, 2024
2743dff
Solved some css issue'
mukund-egov Dec 4, 2024
cff4175
Showed correct date on alert screen
mukund-egov Dec 4, 2024
db20320
Reverted last css changes
mukund-egov Dec 5, 2024
c3727b6
Merged URC changes
mukund-egov Dec 5, 2024
fc7d056
Solved update page issue
mukund-egov Dec 6, 2024
7428e16
Solved build issue
mukund-egov Dec 6, 2024
109ed5a
Solved all problems of update page
mukund-egov Dec 6, 2024
b500c29
Solved auto population issue in GP
mukund-egov Dec 6, 2024
1157c58
Update button working
mukund-egov Dec 9, 2024
a42624d
Solved ISNE-450: Citizen UI: DSO inbox displays count of applications…
mukund-egov Dec 9, 2024
9452760
Solved date problem in all pages
mukund-egov Dec 9, 2024
b12a082
Merge pull request #647 from egovernments/ISNE-450
mukund-egov Dec 9, 2024
4c89d4b
Final URC change: update api working now
mukund-egov Dec 9, 2024
cac0ccf
Merge branch 'ISNE-426' of https://github.com/egovernments/SANITATION…
mukund-egov Dec 9, 2024
e9bb374
Solved DSO link redirection problem
mukund-egov Dec 9, 2024
c37b72f
Solved breadcrumb navigation problem
mukund-egov Dec 9, 2024
6d52766
Solved translation problem
mukund-egov Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@egovernments/digit-ui-module-fsm": "1.6.1",
"@egovernments/digit-ui-module-tqm": "1.0.2",
"@egovernments/digit-ui-module-utilities":"0.0.8",
"@egovernments/digit-ui-components": "0.0.2-beta.47",
"http-proxy-middleware": "^1.0.5",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<title>Sanitation</title>
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />

<!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css/dist/index.css"/> -->
<script src="https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsFSMpg.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module.exports = function (app) {
"/pqm-service/",
"/individual/",
"/trackingservice/",
"/fsm-calculator/v1/_advancebalancecalculate",
].forEach((location) => app.use(location, createProxy));
["/pb-egov-assets"].forEach((location) => app.use(location, assetsProxy));
};
3 changes: 2 additions & 1 deletion frontend/micro-ui/web/micro-ui-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"prettier": "2.1.2"
},
"resolutions": {
"**/styled-components": "5.0.0"
"**/styled-components": "5.0.0",
"**/@babel/traverse":"7.25.9"
},
"husky": {},
"lint-staged": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-css",
"version": "1.2.154",
"version": "1.5.9",
"license": "MIT",
"main": "dist/index.css",
"engines": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,88 +1,114 @@
import React from "react"
import useInbox from '@egovernments/digit-ui-libraries/src/hooks/useInbox';
import React from "react";
import useInbox from "@egovernments/digit-ui-libraries/src/hooks/useInbox";

const useFSMInbox = (tenantId, filters, config = {}, overRideUUID = false) => {

const { applicationNos, mobileNumber, limit, offset, sortBy, sortOrder } = filters;
const {
applicationNos,
mobileNumber,
limit,
offset,
sortBy,
sortOrder,
dsoUUID,
} = filters;
const _filters = {
tenantId,
processSearchCriteria: {
businessService: ["FSM", "FSM_POST_PAY_SERVICE","PAY_LATER_SERVICE", "FSM_ADVANCE_PAY_SERVICE", "FSM_ZERO_PAY_SERVICE"],
...(filters?.applicationStatus?.length > 0 ? { status: getIds(filters.applicationStatus) } : {}),
businessService: [
"FSM",
"FSM_POST_PAY_SERVICE",
"PAY_LATER_SERVICE",
"FSM_ADVANCE_PAY_SERVICE",
"FSM_ZERO_PAY_SERVICE",
],
...(filters?.applicationStatus?.length > 0
? { status: getIds(filters.applicationStatus) }
: {}),
moduleName: "fsm",
assignee: dsoUUID,
},
moduleSearchCriteria: {
tenantId,
...(mobileNumber ? { mobileNumber } : {}),
...(applicationNos ? { applicationNos } : {}),
...(sortBy ? { sortBy } : {}),
...(sortOrder ? { sortOrder } : {}),
...(filters?.locality?.length > 0 ? { locality: filters.locality.map((item) => item.code.split("_").pop()) } : {}),
...(filters?.locality?.length > 0
? {
locality: filters.locality.map((item) =>
item.code.split("_").pop()
),
}
: {}),
},
limit,
offset,
}
};
const appList = useInbox({
tenantId, filters: _filters, config: {
tenantId,
filters: _filters,
config: {
select: (data) => ({
totalCount: data.totalCount,
nearingSlaCount: data.nearingSlaCount,
statuses: data.statusMap,
table: tableData(data)
table: tableData(data),
}),
...config
}
})
...config,
},
});

if (filters?.uuid?.code === "ASSIGNED_TO_ME" && !overRideUUID) {
return {
data: {
totalCount: 0,
statuses: [],
table: []
table: [],
},
isLoading: false
}
isLoading: false,
};
}
return { ...appList }
}
return { ...appList };
};

const getIds = (status) => {
let ids = []
let ids = [];
status?.map((data) => {
let temp = data.id.split(',')
ids.push(...temp)
})
return ids
}
let temp = data.id.split(",");
ids.push(...temp);
});
return ids;
};

const tableData = (data) => {
let result = [];
if (data && data.items && data.items.length) {
data.items.map((application) => {
result.push({
tenantId: application?.businessObject?.tenantId || '',
totalCount: application?.businessObject?.totalCount || '',
applicationNo: application?.businessObject?.applicationNo || '',
tenantId: application?.businessObject?.tenantId || "",
totalCount: application?.businessObject?.totalCount || "",
applicationNo: application?.businessObject?.applicationNo || "",
createdTime: application?.businessObject?.auditDetails?.createdTime
? new Date(application.businessObject.auditDetails.createdTime)
: new Date(),
locality: application?.businessObject?.address?.locality?.code || '',
status: application?.businessObject?.applicationStatus || '',
locality: application?.businessObject?.address?.locality?.code || "",
status: application?.businessObject?.applicationStatus || "",
citizen: {
name: application?.ProcessInstance?.assigner?.name || '',
mobileNumber: application?.ProcessInstance?.assigner?.mobileNumber || ''
name: application?.ProcessInstance?.assigner?.name || "",
mobileNumber:
application?.ProcessInstance?.assigner?.mobileNumber || "",
},
propertyUsage: application?.businessObject?.propertyUsage || '',
propertyUsage: application?.businessObject?.propertyUsage || "",
sla:
Math.round(
application?.ProcessInstance?.businesssServiceSla /
(24 * 60 * 60 * 1000)
(24 * 60 * 60 * 1000)
) || "-",
mathsla: application?.ProcessInstance?.businesssServiceSla || ''
mathsla: application?.ProcessInstance?.businesssServiceSla || "",
});
});
}
return result;
};

export default useFSMInbox
export default useFSMInbox;
Original file line number Diff line number Diff line change
Expand Up @@ -5,90 +5,175 @@ const useMDMS = (tenantId, moduleCode, type, config = {}, payload = []) => {
const queryConfig = { staleTime: Infinity, ...config };

const useSanitationType = () => {
return useQuery("FSM_SANITATION_TYPE", () => MdmsService.getSanitationType(tenantId, moduleCode), queryConfig);
return useQuery(
"FSM_SANITATION_TYPE",
() => MdmsService.getSanitationType(tenantId, moduleCode),
queryConfig
);
};

const usePitType = () => {
return useQuery("FSM_PIT_TYPE", () => MdmsService.getPitType(tenantId, moduleCode, queryConfig));
return useQuery("FSM_PIT_TYPE", () =>
MdmsService.getPitType(tenantId, moduleCode, queryConfig)
);
};

const useApplicationChannel = () => {
return useQuery("FSM_APPLICATION_NEW_APPLICATION_CHANNEL", () => MdmsService.getApplicationChannel(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_APPLICATION_NEW_APPLICATION_CHANNEL",
() => MdmsService.getApplicationChannel(tenantId, moduleCode, type),
queryConfig
);
};

const useEmployeeApplicationChannel = () => {
async function onlyEmployeeChannels() {
const allApplicationChannels = await MdmsService.getApplicationChannel(tenantId, moduleCode, type);
const allApplicationChannels = await MdmsService.getApplicationChannel(
tenantId,
moduleCode,
type
);
return allApplicationChannels.filter((type) => !type.citizenOnly);
}
return useQuery("FSM_APPLICATION_EDIT_APPLICATION_CHANNEL", () => onlyEmployeeChannels(), queryConfig);
return useQuery(
"FSM_APPLICATION_EDIT_APPLICATION_CHANNEL",
() => onlyEmployeeChannels(),
queryConfig
);
};

const usePropertyType = () => {
return useQuery("FSM_PROPERTY_TYPE", () => MdmsService.getPropertyType(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_PROPERTY_TYPE",
() => MdmsService.getPropertyType(tenantId, moduleCode, type),
queryConfig
);
};

const usePropertySubType = () => {
return useQuery("FSM_PROPERTY_SUBTYPE", () => MdmsService.getPropertyType(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_PROPERTY_SUBTYPE",
() => MdmsService.getPropertyType(tenantId, moduleCode, type),
queryConfig
);
};

const useChecklist = () => {
return useQuery("FSM_CHECKLIST", () => MdmsService.getChecklist(tenantId, moduleCode), queryConfig);
return useQuery(
"FSM_CHECKLIST",
() => MdmsService.getChecklist(tenantId, moduleCode),
queryConfig
);
};

const useVehicleType = () => {
return useQuery("FSM_VEHICLE_TYPE", () => MdmsService.getVehicleType(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_VEHICLE_TYPE",
() => MdmsService.getVehicleType(tenantId, moduleCode, type),
queryConfig
);
};

const useSlumLocality = () => {
return useQuery(["SLUM_LOCALITY_MAPPING", tenantId, moduleCode], () => MdmsService.getSlumLocalityMapping(tenantId, moduleCode, type), queryConfig);
return useQuery(
["SLUM_LOCALITY_MAPPING", tenantId, moduleCode],
() => MdmsService.getSlumLocalityMapping(tenantId, moduleCode, type),
queryConfig
);
};

const useReason = () => {
return useQuery("CANCELLATION_REASON", () => MdmsService.getReason(tenantId, moduleCode, type, payload), queryConfig);
return useQuery(
"CANCELLATION_REASON",
() => MdmsService.getReason(tenantId, moduleCode, type, payload),
queryConfig
);
};

const useRoleStatusMapping = () => {
return useQuery("ROLE_STATUS_MAPPING", () => MdmsService.getRoleStatus(tenantId, moduleCode, type));
return useQuery("ROLE_STATUS_MAPPING", () =>
MdmsService.getRoleStatus(tenantId, moduleCode, type)
);
};
const useCommonFieldsConfig = () => {
return useQuery("COMMON_FIELDS", () => MdmsService.getCommonFieldsConfig(tenantId, moduleCode, type, payload));
return useQuery("COMMON_FIELDS", () =>
MdmsService.getCommonFieldsConfig(tenantId, moduleCode, type, payload)
);
};

const usePreFieldsConfig = () => {
return useQuery("PRE_FIELDS", () => MdmsService.getPreFieldsConfig(tenantId, moduleCode, type, payload));
return useQuery("PRE_FIELDS", () =>
MdmsService.getPreFieldsConfig(tenantId, moduleCode, type, payload)
);
};

const usePostFieldsConfig = () => {
return useQuery("POST_FIELDS", () => MdmsService.getPostFieldsConfig(tenantId, moduleCode, type, payload));
return useQuery("POST_FIELDS", () =>
MdmsService.getPostFieldsConfig(tenantId, moduleCode, type, payload)
);
};

const useGenderDetails = () => {
return useQuery("FSM_GENDER_DETAILS", () => MdmsService.getFSMGenderType(tenantId, moduleCode, type), config);
return useQuery(
"FSM_GENDER_DETAILS",
() => MdmsService.getFSMGenderType(tenantId, moduleCode, type),
config
);
};
const useUrcConfig = () => {
return useQuery(
"FSM_APPLICATION_NEW_URC_CONFIG",
() => MdmsService.getUrcConfig(tenantId, moduleCode, type),
queryConfig
);
};

const useFSTPORejectionReason = () => {
return useQuery("FSM_FSTPO_REJECTION", () => MdmsService.getFSTPORejectionReason(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_FSTPO_REJECTION",
() => MdmsService.getFSTPORejectionReason(tenantId, moduleCode, type),
queryConfig
);
};

const usePaymentType = () => {
return useQuery("FSM_PAYMENT_TYPE", () => MdmsService.getFSMPaymentType(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_PAYMENT_TYPE",
() => MdmsService.getFSMPaymentType(tenantId, moduleCode, type),
queryConfig
);
};

const useTripNumber = () => {
return useQuery("FSM_TRIP_NUMBER", () => MdmsService.getFSMTripNumber(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_TRIP_NUMBER",
() => MdmsService.getFSMTripNumber(tenantId, moduleCode, type),
queryConfig
);
};

const useReceivedPaymentType = () => {
return useQuery("FSM_RECEIVED_PAYMENT_TYPE", () => MdmsService.getFSMReceivedPaymentType(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_RECEIVED_PAYMENT_TYPE",
() => MdmsService.getFSMReceivedPaymentType(tenantId, moduleCode, type),
queryConfig
);
};

const useWSTaxHeadMaster = () => {
return useQuery("FSM_RECEIVED_PAYMENT_TYPE", () => MdmsService.getWSTaxHeadMaster(tenantId, moduleCode, type), queryConfig);
return useQuery(
"FSM_RECEIVED_PAYMENT_TYPE",
() => MdmsService.getWSTaxHeadMaster(tenantId, moduleCode, type),
queryConfig
);
};

const useCheckVehicleTracking = () => {
return useQuery(["VEHICLE_TRACKING_CHECK", tenantId, moduleCode], () => MdmsService.getVehicleTrackingCheck(tenantId, moduleCode, type), queryConfig);
return useQuery(
["VEHICLE_TRACKING_CHECK", tenantId, moduleCode],
() => MdmsService.getVehicleTrackingCheck(tenantId, moduleCode, type),
queryConfig
);
};

switch (type) {
Expand Down Expand Up @@ -148,6 +233,8 @@ const useMDMS = (tenantId, moduleCode, type, config = {}, payload = []) => {
return useWSTaxHeadMaster();
case "VehicleTracking":
return useCheckVehicleTracking();
case "UrcConfig":
return useUrcConfig();
default:
return null;
}
Expand Down
Loading