Skip to content

Commit

Permalink
Merge pull request #903 from egovernments/logout-dashboard
Browse files Browse the repository at this point in the history
log out and dashboard fix
  • Loading branch information
pradeepkumarcm-egov authored Aug 12, 2024
2 parents 4731a93 + 56de9bd commit 4237740
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,46 @@ const HRMSCard = () => {
let roles = STATE_ADMIN
? { roles: "DIV_ADMIN", isStateLevelSearch: true }
: {
roles: "SYSTEM, GP_ADMIN, COLLECTION_OPERATOR, PROFILE_UPDATE, DASHBOAD_VIEWER, SARPANCH, REVENUE_COLLECTOR, SECRETARY",
isStateLevelSearch: false,
};
roles: "SYSTEM, GP_ADMIN, COLLECTION_OPERATOR, PROFILE_UPDATE, DASHBOAD_VIEWER, SARPANCH, REVENUE_COLLECTOR, SECRETARY",
isStateLevelSearch: false,
};
const { isLoading, isError, error, data, ...rest } = Digit.Hooks.hrms.useHRMSCount(tenantId, roles);

const moduleForSomeDIVAdmin =
DIV_ADMIN && MDMS_ADMIN

DIV_ADMIN && MDMS_ADMIN
? [
{
label: t("WORK_BENCH_URL_MASTER_DATA"),
link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=ws-services-calculation&masterName=WCBillingSlab`,
},
// {
// label: t("WORK_BENCH_URL_LOCALIZATION"),
// link: `${window?.location?.origin}/workbench-ui/employee/workbench/localisation-search`,
// },
]
{
label: t("WORK_BENCH_URL_MASTER_DATA"),
link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=ws-services-calculation&masterName=WCBillingSlab`,
},
// {
// label: t("WORK_BENCH_URL_LOCALIZATION"),
// link: `${window?.location?.origin}/workbench-ui/employee/workbench/localisation-search`,
// },
]
: [];

const moduleForSomeSTATEUser =
STATE_ADMIN && MDMS_ADMIN
STATE_ADMIN && MDMS_ADMIN
? [
{
label: t("WORK_BENCH_URL_VILLAGE_MASTER_DATA"),
link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=tenant&masterName=tenants`,
},
]
{
label: t("WORK_BENCH_URL_VILLAGE_MASTER_DATA"),
link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=tenant&masterName=tenants`,
},
]
: [];

const moduleForDivisionUser =
DIV_ADMIN && MDMS_ADMIN?
[
{
label: t("WORK_BENCH_URL_PENALTY_MASTER_DATA"),
link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=ws-services-calculation&masterName=Penalty`,
},
] : [];
DIV_ADMIN && MDMS_ADMIN ?
[
{
label: t("WORK_BENCH_URL_PENALTY_MASTER_DATA"),
link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=ws-services-calculation&masterName=Penalty`,

},
] : [];


const propsForModuleCard = {
Icon: <PersonIcon />,
Expand All @@ -78,7 +78,7 @@ const HRMSCard = () => {
{
label: t("HR_SEARCH_USER"),
link: `/${window?.contextPath}/employee/hrms/search-user`,
roles:["DIV_ADMIN","STATE_ADMIN"]
roles: ["DIV_ADMIN", "STATE_ADMIN"]
},
{
label: t("HR_HOME_SEARCH_RESULTS_HEADING"),
Expand All @@ -88,9 +88,9 @@ const HRMSCard = () => {
label: STATE_ADMIN ? t("HR_COMMON_CREATE_DIVISION_EMPLOYEE_HEADER") : t("HR_COMMON_CREATE_EMPLOYEE_HEADER"),
link: `/${window?.contextPath}/employee/hrms/create`,
},
DIV_ADMIN ? {}: {
DIV_ADMIN ? {} : {
label: t("HR_STATE_ REPORTS"),
link: "https://ifix-dwss.psegs.in/digit-ui/employee/dss/dashboard/ifix",
link: "https://mgramseva-dwss.punjab.gov.in/kibana/app/r/s/JNF2x?auth_provider_hint=anonymous1",
},
...moduleForSomeDIVAdmin,
...moduleForSomeSTATEUser,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ const TopBar = ({
{isOpen && (
<div className="dropdown-user-overlay">
<ul className="dropdown-user-content">
<li style={{
borderBottom:"solid 1px",
}}>
<Link className="dropdown-user-link" to="/mgramseva-web/employee/">Admin Login</Link>
<li style={{
borderBottom: "solid 1px grey",
}}>
<Link className="dropdown-user-link" to="/mgramseva-web/employee/user/login">Admin Login</Link>
</li>
<li>
<Link className="dropdown-user-link" to="/mgramseva-web/employee/">Employee Login</Link>
<Link className="dropdown-user-link" to="/mgramseva/selectLanguage">Employee Login</Link>
</li>
</ul>
</div>
Expand Down

0 comments on commit 4237740

Please sign in to comment.