Skip to content

Commit

Permalink
stablize develop branch
Browse files Browse the repository at this point in the history
Users can run only the modules they want
  • Loading branch information
nipunarora-eGov committed Jan 21, 2025
1 parent 9a44df1 commit 056a3cc
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 341 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

33 changes: 1 addition & 32 deletions micro-ui/web/micro-ui-internals/example/src/fsm.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
const fsmCustomizations = {
getEmployeeApplicationCustomization: (config, t) => {
const employeeConfig = [
{
name: "applicationDetails",
// fields: ["sanitationType", "applicationChannel"],
// fieldsOrder: {sanitationType: 0, applicationChannel: 1}, // TODO
allFields: true, // for example: If in applicationDetails you have 10 fields and in fieldsOrder you only enter 3 fields name then on browser you will only see 3 fields in that order but if you want to see rest of 7 fields at the bottom.
// removeFields: ["applicantName"], // type the name of the field in camelCase to remove it
addFields: [
// by default all the custom fields will add at the bottom, you can add "field name" to "fieldsOrder" if you want them in your custom order.
{
name: "example",
label: t("EXAMPLE"),
type: "text",
isMandatory: true,
populators: {
name: "example",
validation: {
required: true,
pattern: /[A-Za-z]/,
},
},
},
],
},
];

return {
config: employeeConfig,
defaultConfig: true, // You want to use defaultConfig and you only want to update one field section. The above employeeConfig is also an order for all the field section. So if defaultConfig is false then on browser you will only see those field section who are inside employeeConfig
};
},

};

const fsmComponents = {};
Expand Down
43 changes: 22 additions & 21 deletions micro-ui/web/micro-ui-internals/example/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { PGRReducers } from "@egovernments/digit-ui-module-pgr";
import { initLibraries } from "@egovernments/digit-ui-libraries";
// import { paymentConfigs, PaymentLinks, PaymentModule } from "@egovernments/digit-ui-module-common";
import { DigitUI, initCoreComponents } from "@egovernments/digit-ui-module-core";
import { initDSSComponents } from "@egovernments/digit-ui-module-dss";
import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement";
import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms";
import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities";
// import { initDSSComponents } from "@egovernments/digit-ui-module-dss";
// import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement";
// 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 { initPGRComponents } from "@egovernments/digit-ui-module-pgr";
import { initOpenPaymentComponents } from "@egovernments/digit-ui-module-open-payment";
import { initSandboxComponents } from "@egovernments/digit-ui-module-sandbox";
// import { initPGRComponents } from "@egovernments/digit-ui-module-pgr";
// import { initOpenPaymentComponents } from "@egovernments/digit-ui-module-open-payment";
// import { initSandboxComponents } from "@egovernments/digit-ui-module-sandbox";

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

Expand All @@ -21,16 +21,17 @@ import { UICustomizations } from "./UICustomizations";
var Digit = window.Digit || {};

const enabledModules = [
"DSS",
"HRMS",
// "DSS",
// "HRMS",
"Workbench",
// "Engagement", "NDSS","QuickPayLinks", "Payment",
"Utilities",
"PGR",
// "Engagement",
// "NDSS","QuickPayLinks", "Payment",
// "Utilities",
// "PGR",
//added to check fsm
// "FSM"
"Sandbox",
"OpenPayment",
// "Sandbox",
// "OpenPayment",
];

const initTokens = (stateCode) => {
Expand Down Expand Up @@ -80,7 +81,7 @@ const initDigitUI = () => {
PGR: pgrCustomizations,
commonUiConfig: UICustomizations,
};
initEngagementComponents();
// initEngagementComponents();

window?.Digit.ComponentRegistryService.setupRegistry({
...overrideComponents,
Expand All @@ -89,13 +90,13 @@ const initDigitUI = () => {
// PaymentLinks,
});
initCoreComponents();
initDSSComponents();
initHRMSComponents();
initUtilitiesComponents();
// initDSSComponents();
// initHRMSComponents();
// initUtilitiesComponents();
initWorkbenchComponents();
initPGRComponents();
initOpenPaymentComponents();
initSandboxComponents();
// initPGRComponents();
// initOpenPaymentComponents();
// initSandboxComponents();

const moduleReducers = (initData) => ({
pgr: PGRReducers(initData),
Expand Down
Loading

0 comments on commit 056a3cc

Please sign in to comment.