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

Added PGR code from OSS (Urban) #431

Merged
merged 6 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion micro-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "workbench-ui",
"version": "1.0.0"
"version": "1.8.0"
}
5 changes: 4 additions & 1 deletion micro-ui/web/core/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { DigitUI } from "@egovernments/digit-ui-module-core";
import { UICustomizations } from "./Customisations/UICustomizations";
import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench";
import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities";
import { initPGRComponents,PGRReducers } from "@egovernments/digit-ui-module-pgr";

window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH");

const enabledModules = [
Expand All @@ -15,7 +17,7 @@ const enabledModules = [
];

const moduleReducers = (initData) => ({
initData,
initData, pgr: PGRReducers(initData),
});

const initDigitUI = () => {
Expand All @@ -26,6 +28,7 @@ const initDigitUI = () => {
};
initUtilitiesComponents();
initWorkbenchComponents();
initPGRComponents();
};

initLibraries().then(() => {
Expand Down
2 changes: 2 additions & 0 deletions micro-ui/web/core/inter-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"dev:example": "cd example && yarn start",
"dev:core": "cd packages/modules/core && yarn start",
"dev:dss": "cd packages/modules/dss && yarn start",
"dev:pgr": "cd packages/modules/pgr && yarn start",
"dev:hrms": "cd packages/modules/hrms && yarn start",
"devD:common": "cd packages/modules/common && yarn start",
"devD:utilities": "cd packages/modules/utilities && yarn start",
Expand All @@ -36,6 +37,7 @@
"build:svgcomponents": "cd packages/svg-components && yarn build",
"buildD:dss": "cd packages/modules/dss && yarn build",
"buildD:core": "cd packages/modules/core && yarn build",
"buildD:pgr": "cd packages/modules/pgr && yarn build",
"buildD:hrms": "cd packages/modules/hrms && yarn build",
"buildD:common": "cd packages/modules/common && yarn build",
"buildD:utilities": "cd packages/modules/utilities && yarn build",
Expand Down
3 changes: 2 additions & 1 deletion micro-ui/web/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"dependencies": {
"@egovernments/digit-ui-libraries": "1.8.0",
"@egovernments/digit-ui-module-workbench": "1.0.1",
"@egovernments/digit-ui-module-core": "1.8.0",
"@egovernments/digit-ui-module-core": "1.8.1",
"@egovernments/digit-ui-module-pgr": "1.8.0",
"@egovernments/digit-ui-react-components": "1.8.0",
"@egovernments/digit-ui-module-utilities": "1.0.0",
"babel-loader": "8.1.0",
Expand Down
3 changes: 2 additions & 1 deletion micro-ui/web/micro-ui-internals/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"@egovernments/digit-ui-libraries": "1.8.0",
"@egovernments/digit-ui-module-workbench": "1.0.1",
"@egovernments/digit-ui-module-dss": "1.8.0",
"@egovernments/digit-ui-module-core": "1.8.0",
"@egovernments/digit-ui-module-core": "1.8.1",
"@egovernments/digit-ui-module-common": "1.8.0",
"@egovernments/digit-ui-module-pgr": "1.8.0",
"@egovernments/digit-ui-module-hrms": "1.8.0",
"@egovernments/digit-ui-module-utilities": "1.0.0",
"@egovernments/digit-ui-module-engagement": "1.8.0",
Expand Down
8 changes: 6 additions & 2 deletions micro-ui/web/micro-ui-internals/example/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { initEngagementComponents } from "@egovernments/digit-ui-module-engageme
import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms";
// import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities";
import {initWorkbenchComponents} from "@egovernments/digit-ui-module-workbench";
import { PGRReducers , initPGRComponents} from "@egovernments/digit-ui-module-pgr";

import "@egovernments/digit-ui-css/example/index.css";

Expand All @@ -19,6 +20,7 @@ var Digit = window.Digit || {};

const enabledModules = [ "DSS", "HRMS",
"Workbench"
,"PGR"
// "Engagement", "NDSS","QuickPayLinks", "Payment",
// "Utilities",
//added to check fsm
Expand Down Expand Up @@ -68,10 +70,12 @@ const initDigitUI = () => {
initEngagementComponents();
// initUtilitiesComponents();
initWorkbenchComponents();
initPGRComponents();


const moduleReducers = (initData) => initData;

const moduleReducers = (initData) => ({
pgr: PGRReducers(initData),
});

const stateCode = window?.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || "pb";
initTokens(stateCode);
Expand Down
2 changes: 2 additions & 0 deletions micro-ui/web/micro-ui-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"dev:components": "cd packages/react-components && yarn start",
"dev:example": "cd example && yarn start",
"dev:core": "cd packages/modules/core && yarn start",
"dev:pgr": "cd packages/modules/pgr && yarn start",
"dev:dss": "cd packages/modules/dss && yarn start",
"dev:hrms": "cd packages/modules/hrms && yarn start",
"devD:common": "cd packages/modules/common && yarn start",
Expand All @@ -39,6 +40,7 @@
"build:dss": "cd packages/modules/dss && yarn build",
"build:core": "cd packages/modules/core && yarn build",
"build:hrms": "cd packages/modules/hrms && yarn build",
"build:pgr": "cd packages/modules/pgr && yarn build",
"build:common": "cd packages/modules/common && yarn build",
"build:utilities": "cd packages/modules/utilities && yarn build",
"build:engagement": "cd packages/modules/engagement && yarn build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ with
### Changelog

```bash
1.8.1 sidebar null check fixes
1.8.0 workbench v1.0
1.8.0-beta.5 fix for login screen alignments
1.8.0-beta.4 made the default localisation in globalconfig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-core",
"version": "1.8.0",
"version": "1.8.1",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ const EmployeeSideBar = () => {
}
mergeObjects(obj1[key], obj2[key]);
} else {
if (obj1[key]) {
if (!Array.isArray(obj1[key])) {
obj1[key] = [obj1[key]];
}
obj1[key].push(obj2[key]);
} else {
if (!obj1[key]) {
obj1[key] = obj2[key];
}
}
Expand Down Expand Up @@ -96,14 +91,18 @@ const EmployeeSideBar = () => {
const objectArray = Object.entries(configEmployeeSideBar);

// Sort the array based on the 'orderNumber' or the length of the object if 'orderNumber' is not present
// sort logic updated to sort the parent item by alphabetical
objectArray.sort((a, b) => {
const orderNumberA = a[1].item
? a[1].item.orderNumber || Object.keys(configEmployeeSideBar).length + 1
: Object.keys(configEmployeeSideBar).length + 1;
const orderNumberB = b[1].item
? b[1].item.orderNumber || Object.keys(configEmployeeSideBar).length + 1
: Object.keys(configEmployeeSideBar).length + 1;
return orderNumberA - orderNumberB;
if (a[0] < b[0]) { return -1; }
if (a[0] > b[0]) { return 1; }
return 0;
// const orderNumberA = a[1].item
// ? a[1].item.orderNumber || Object.keys(configEmployeeSideBar).length + 1
// : Object.keys(configEmployeeSideBar).length + 1;
// const orderNumberB = b[1].item
// ? b[1].item.orderNumber || Object.keys(configEmployeeSideBar).length + 1
// : Object.keys(configEmployeeSideBar).length + 1;
// return orderNumberA - orderNumberB;
});
const sortedObject = Object.fromEntries(objectArray);
configEmployeeSideBar = sortedObject;
Expand Down
Loading