Skip to content

Commit

Permalink
FEATURE/HCMPRE-1852 : POC for single landing ui for users
Browse files Browse the repository at this point in the history
  • Loading branch information
jagankumar-egov committed Feb 3, 2025
1 parent d1f8ecd commit c679afd
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion micro-ui/web/micro-ui-internals/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@egovernments/digit-ui-module-workbench": "1.0.14",
"@egovernments/digit-ui-module-pgr": "1.8.10",
"@egovernments/digit-ui-module-dss": "1.8.10",
"@egovernments/digit-ui-module-core": "1.8.22",
"@egovernments/digit-ui-module-core": "1.8.23",
"@egovernments/digit-ui-module-common": "1.8.10",
"@egovernments/digit-ui-module-hrms": "1.8.10",
"@egovernments/digit-ui-module-utilities": "1.0.10",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [1.8.23] [3-Feb-2025]
- FEATURE/HCMPRE-1852 : POC for single landing ui for users added extra route for no-top-bar/employee

## [1.8.22] [3-Feb-2025]
- FEATURE/HCMPRE-2208 : Fixed some loader component issue
- added new prop called allowedUserTypes to restrict any user type if needed
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.22",
"version": "1.8.23",
"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 @@ -70,7 +70,6 @@ export const DigitApp = ({ stateCode, modules, appTenants, logoUrl, logoUrlWhite
pathname,
initData,
};

return (
<Switch>
{allowedUserTypes?.some(userType=>userType=="employee")&& <Route path={`/${window?.contextPath}/employee`}>
Expand All @@ -79,6 +78,9 @@ export const DigitApp = ({ stateCode, modules, appTenants, logoUrl, logoUrlWhite
{allowedUserTypes?.some(userType=>userType=="citizen")&& <Route path={`/${window?.contextPath}/citizen`}>
<CitizenApp {...commonProps} />
</Route>}
{allowedUserTypes?.some(userType=>userType=="employee")&& <Route path={`/${window?.contextPath}/no-top-bar/employee`}>
<EmployeeApp {...commonProps} noTopBar={true} />
</Route>}
<Route>
<Redirect to={`/${window?.contextPath}/${defaultLanding}`} />
</Route>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ const EmployeeApp = ({
sourceUrl,
pathname,
initData,
noTopBar=false
}) => {


const history = useHistory();
const { t } = useTranslation();
const { path } = useRouteMatch();
Expand Down Expand Up @@ -119,9 +122,9 @@ const EmployeeApp = ({
</Route>
</Switch>
</div>
</Route>
<Route>
<TopBarSideBar
</Route>
<Route>
{!noTopBar&&<TopBarSideBar
t={t}
stateInfo={stateInfo}
userDetails={userDetails}
Expand All @@ -132,8 +135,8 @@ const EmployeeApp = ({
logoUrl={logoUrl}
logoUrlWhite={logoUrlWhite}
modules={modules}
/>
<div className={`main ${DSO ? "m-auto" : ""} digit-home-main`}>
/>}
<div className={!noTopBar?`main ${DSO ? "m-auto" : ""} digit-home-main`:""}>
<div className="employee-app-wrapper digit-home-app-wrapper">
<ErrorBoundary initData={initData}>
<AppModules
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@egovernments/digit-ui-module-workbench": "1.0.14",
"@egovernments/digit-ui-module-pgr": "1.8.10",
"@egovernments/digit-ui-module-dss": "1.8.10",
"@egovernments/digit-ui-module-core": "1.8.22",
"@egovernments/digit-ui-module-core": "1.8.23",
"@egovernments/digit-ui-module-common": "1.8.10",
"@egovernments/digit-ui-module-hrms": "1.8.10",
"@egovernments/digit-ui-module-utilities": "1.0.10",
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@egovernments/digit-ui-module-workbench": "1.0.14",
"@egovernments/digit-ui-module-pgr": "1.8.10",
"@egovernments/digit-ui-module-dss": "1.8.10",
"@egovernments/digit-ui-module-core": "1.8.22",
"@egovernments/digit-ui-module-core": "1.8.23",
"@egovernments/digit-ui-module-common": "1.8.10",
"@egovernments/digit-ui-module-hrms": "1.8.10",
"@egovernments/digit-ui-module-utilities": "1.0.10",
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@egovernments/digit-ui-libraries": "1.8.2-beta.8",
"@egovernments/digit-ui-module-workbench": "1.0.2-beta.10",
"@egovernments/digit-ui-components":"0.0.2-beta.65",
"@egovernments/digit-ui-module-core": "1.8.22",
"@egovernments/digit-ui-module-core": "1.8.23",
"@egovernments/digit-ui-module-utilities": "1.0.1-beta.41",
"@egovernments/digit-ui-react-components": "1.8.16",
"babel-loader": "8.1.0",
Expand Down

0 comments on commit c679afd

Please sign in to comment.