-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CustomErrorComponent, RoleBasedEmployeeHome, css enhancement
- Loading branch information
1 parent
202ca6e
commit ac32647
Showing
21 changed files
with
229 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
<!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css/dist/index.css"/> --> | ||
<!-- <script src="https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigs.js"></script> --> | ||
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].32/dist/index.css" /> | ||
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].34/dist/index.css" /> | ||
<script src="%REACT_APP_GLOBAL%"></script> | ||
|
||
</head> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@egovernments/digit-ui-css", | ||
"version": "1.8.2-beta.22", | ||
"version": "1.8.2-beta.24", | ||
"license": "MIT", | ||
"main": "dist/index.css", | ||
"author": "Jagankumar <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { useStore, useInitStore } from "../hooks/store"; | ||
import { useStore, useInitStore, useInitTenantConfig } from "../hooks/store"; | ||
|
||
export { useStore, useInitStore }; | ||
export { useStore, useInitStore, useInitTenantConfig }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/CustomErrorComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import { useLocation, useHistory } from "react-router-dom"; | ||
import Background from "./Background"; | ||
import { Button, Card, CardHeader, CardText } from "@egovernments/digit-ui-components"; | ||
import Header from "./Header"; | ||
|
||
const CustomErrorComponent = (props) => { | ||
const { state = {} } = useLocation(); | ||
// const module = state?.module; | ||
const { t } = useTranslation(); | ||
const stateInfo = props.stateInfo; | ||
|
||
const history = useHistory(); | ||
const ModuleBasedErrorConfig = { | ||
sandbox: { | ||
imgUrl: `https://s3.ap-south-1.amazonaws.com/egov-qa-assets/error-image.png`, | ||
infoHeader: "WRONG_TENANT_SIGN_UP", | ||
infoMessage: "WRONG_TENANT_SIGN_UP_MESSAGE", | ||
buttonInfo: "WRONG_TENANT_SIGN_UP_BUTTON", | ||
action: () => { | ||
history.push(`/${window.globalPath}/`); | ||
}, | ||
}, | ||
}; | ||
const config = ModuleBasedErrorConfig["sandbox"]; | ||
|
||
return ( | ||
<Background> | ||
<Card className={`digit-employee-card customError`}> | ||
<Header showTenant={false} /> | ||
<CardHeader className={"center"}>{t(config.infoHeader)}</CardHeader> | ||
<CardText className={"center"}>{t(config.infoMessage)}</CardText> | ||
<Button | ||
className="customErrorButton" | ||
label={t(config?.buttonInfo)} | ||
variation={"primary"} | ||
isSuffix={true} | ||
onClick={(e) => { | ||
e.preventDefault(); | ||
config?.action(); | ||
}} | ||
/> | ||
</Card> | ||
</Background> | ||
); | ||
}; | ||
|
||
export default CustomErrorComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.