Skip to content

Commit

Permalink
User Token cache remove for multiroottenant and css fix (#1506)
Browse files Browse the repository at this point in the history
* remove localStorage for multiroottenant and CSS fixes

* css version update

* clear console

---------

Co-authored-by: NabeelAyubee <nayubi7@gmail.com>
  • Loading branch information
nabeelmd-eGov and NabeelAyubee authored Oct 11, 2024
1 parent 28d9df2 commit f24226a
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 5 deletions.
2 changes: 1 addition & 1 deletion micro-ui/web/micro-ui-internals/packages/css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-css",
"version": "1.8.2-beta.40",
"version": "1.8.2-beta.41",
"license": "MIT",
"main": "dist/index.css",
"author": "Jagankumar <jagan.kumar@egov.org.in>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@
margin-left: 0 !important;
}
}

.digit-page-based-input-wrapper {
.digit-page-based-submit-bar {
@apply hidden;
}
.digit-submit-bar-container {
z-index: 60;
@apply p-sm fixed w-full bottom-0 left-0 text-right bg-white;
}
}
@screen dt {
.digit-page-based-input-wrapper {
.digit-submit-bar-container {
@apply hidden;
}
}
.PageBasedInputWrapper {
.SubmitBar {
@apply hidden;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,28 @@
.citizen-card-input.citizen-card-input--front {
margin-bottom: 0;
}
.digit-app-container {
.digit-back-link {
margin-bottom: 1rem !important;
}
.digit-card-component {
.digit-card-header {
font-size: 2rem !important;
font-weight: 700 !important;
}
}
}
}
.selection-card-wrapper {
.digit-page-based-input-wrapper {
.digit-card-component {
.digit-card-header {
font-size: 2rem;
font-weight: 700;
}
}
}
}

.action-bar-wrap {
.menu-wrap {
p {
Expand Down Expand Up @@ -742,3 +762,42 @@ digit-card-text.center {
.sandbox-step.sandbox-visible svg {
opacity: 1;
}
.digit-card-component.digit-landing-page-card {
max-width: 30rem !important;
}
.digit-msb-sidebar-children.expanded {
margin-left: 1.5rem !important;
border-left: 0.031rem solid #c5c5c5 !important;
}
@media (max-width: 768px) {
.homeWrapper > :last-child {
margin-left: 1rem !important;
}
.digit-landing-page-wrapper {
margin-left: 1rem !important;
}
}

.RightMostTopBarOptions {
.digit-dropdown-employee-select-wrap.language-dropdown {
.header-dropdown-label {
.cp {
color: #fff !important;
}
.header-dropdown-arrow {
path {
fill: #fff !important;
}
}
}
.header-dropdown-menu {
right: 1rem !important;
}
}
.select-wrap {
margin-bottom: unset !important;
svg {
fill: theme(colors.white) !important;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const DEFAULT_REDIRECT_URL = `/${window?.contextPath}/citizen`;

/* set citizen details to enable backward compatiable */
const setCitizenDetail = (userObject, token, tenantId) => {
if (Digit.Utils.getMultiRootTenant()) {
return;
}
let locale = JSON.parse(sessionStorage.getItem("Digit.initData"))?.value?.selectedLanguage;
localStorage.setItem("Citizen.tenant-id", tenantId);
localStorage.setItem("tenant-id", tenantId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import Header from "../../../components/Header";

/* set employee details to enable backward compatiable */
const setEmployeeDetail = (userObject, token) => {
if (Digit.Utils.getMultiRootTenant()) {
return;
}
let locale = JSON.parse(sessionStorage.getItem("Digit.locale"))?.value || Digit.Utils.getDefaultLanguage();
localStorage.setItem("Employee.tenant-id", userObject?.tenantId);
localStorage.setItem("tenant-id", userObject?.tenantId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import { useEffect } from "react";

/* set employee details to enable backward compatiable */
const setEmployeeDetail = (userObject, token) => {
if (Digit.Utils.getMultiRootTenant()) {
return;
}
let locale = JSON.parse(sessionStorage.getItem("Digit.locale"))?.value || Digit.Utils.getDefaultLanguage();
localStorage.setItem("Employee.tenant-id", userObject?.tenantId);
localStorage.setItem("tenant-id", userObject?.tenantId);
Expand Down Expand Up @@ -115,7 +118,7 @@ const Otp = ({ isLogin = false }) => {
return (
<Background>
<div className="employeeBackbuttonAlign">
<BackLink onClick={() => window.history.back()}/>
<BackLink onClick={() => window.history.back()} />
</div>
<FormComposerV2
onSubmit={onSubmit}
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.40/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.41/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.37/dist/index.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#00bcd1" />
Expand Down

0 comments on commit f24226a

Please sign in to comment.