Skip to content

Commit

Permalink
core-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunarora-eGov committed Feb 29, 2024
1 parent 4069eec commit cdf5d83
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 5 deletions.
10 changes: 5 additions & 5 deletions micro-ui/web/packages/core/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ registerRemotes(queryClient)


const App = () => {
const { login, history, isSignedIn$, logout } = useAuth();
// const { login, history, isSignedIn$, logout } = useAuth();
const { navigate } = useRouter();
const enabledModules = ["PT", "HRMS", "Workbench", "DSS", "Measurement", "PGR"];

const moduleReducers = (initData) => initData;

const stateCode = window?.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || "pb";

console.log("stateCode",stateCode);

return (
<div>
Expand Down Expand Up @@ -109,11 +109,11 @@ const initDigitUI = () => {
});

// initHRMSComponents();
const enabledModules = ["PT"];
// const enabledModules = ["PT"];

const moduleReducers = (initData) => initData;
// const moduleReducers = (initData) => initData;

const stateCode = window?.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || "pb";
// const stateCode = window?.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || "pb";
// initTokens(stateCode);

// return (<DigitUI stateCode={stateCode} enabledModules={enabledModules} defaultLanding="employee" moduleReducers={moduleReducers} />);
Expand Down
2 changes: 2 additions & 0 deletions micro-ui/web/packages/core/src/Module.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { ReactQueryDevtools } from 'react-query/devtools';
//here add react-query dev tools

const DigitUIWrapper = ({ stateCode, enabledModules, moduleReducers,defaultLanding }) => {
// debugger
const { isLoading, data: initData } = Digit.Hooks.useInitStore(stateCode, enabledModules);
if (isLoading) {
return <Loader page={true} />;
Expand All @@ -39,6 +40,7 @@ const DigitUIWrapper = ({ stateCode, enabledModules, moduleReducers,defaultLandi
};

export const DigitUI = ({ stateCode, registry, enabledModules, moduleReducers ,defaultLanding,queryClient}) => {
// debugger
const [privacy, setPrivacy] = useState(Digit.Utils.getPrivacyObject() || {});
const userType = Digit.UserService.getType();
// const queryClient = new QueryClient({
Expand Down
1 change: 1 addition & 0 deletions micro-ui/web/packages/core/src/components/AppModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const getTenants = (codes, tenants) => {
};

export const AppModules = ({ stateCode, userType, modules, appTenants }) => {
// debugger
const ComponentProvider = Digit.Contexts.ComponentProvider;
const { path } = useRouteMatch();
const location = useLocation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const CitizenApp = ({
sourceUrl,
pathname,
}) => {
// debugger
const { t } = useTranslation();

return <AppModules stateCode={stateCode} userType="citizen" modules={modules} appTenants={appTenants} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
"L+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";

const UserProfile = ({ stateCode, userType, cityDetails }) => {
// debugger
const history = useHistory();
const { t } = useTranslation();
const url = window.location.href;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const getFromLocation = (state, searchParams) => {
};

const Login = ({ stateCode, isUserRegistered = true }) => {
// debugger
const { t } = useTranslation();
const location = useLocation();
const { path, url } = useRouteMatch();
Expand Down
1 change: 1 addition & 0 deletions micro-ui/web/packages/core/src/pages/citizen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const Home = ({
pathname,
initData,
}) => {
// debugger
const { isLoading: islinkDataLoading, data: linkData, isFetched: isLinkDataFetched } = Digit.Hooks.useCustomMDMS(
Digit.ULBService.getStateId(),
"ACCESSCONTROL-ACTIONS-TEST",
Expand Down
1 change: 1 addition & 0 deletions micro-ui/web/packages/core/src/pages/employee/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const EmployeeApp = ({
pathname,
initData,
}) => {
// debugger
const history = useHistory();
const { t } = useTranslation();
const { path } = useRouteMatch();
Expand Down
1 change: 1 addition & 0 deletions micro-ui/web/packages/core/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import CitizenApp from "./citizen";
import EmployeeApp from "./employee";

export const DigitApp = ({ stateCode, modules, appTenants, logoUrl, initData ,defaultLanding="citizen"}) => {
// debugger
const history = useHistory();
const { pathname } = useLocation();
const innerWidth = window.innerWidth;
Expand Down

0 comments on commit cdf5d83

Please sign in to comment.