jett.admin.npmpackage 1.0.28 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -22
- package/dist/index.mjs +5 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -497,7 +497,7 @@ var navItemsConstant = [
|
|
|
497
497
|
{
|
|
498
498
|
label: "Tags",
|
|
499
499
|
onClick: () => {
|
|
500
|
-
window.location.href = "/
|
|
500
|
+
window.location.href = "/orgselector/?path=tag" + encodedAuthData;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
],
|
|
@@ -544,23 +544,23 @@ var navItemsConstant = [
|
|
|
544
544
|
isDropDown: true,
|
|
545
545
|
options: [
|
|
546
546
|
{ label: "Pricing Policy", onClick: () => {
|
|
547
|
-
window.location.href = "/
|
|
547
|
+
window.location.href = "/orgselector/?path=pricing-policy" + encodedAuthData;
|
|
548
548
|
} },
|
|
549
549
|
{ label: "Travel Policy", onClick: () => {
|
|
550
|
-
window.location.href = "/
|
|
550
|
+
window.location.href = "/orgselector/?path=travel-policy" + encodedAuthData;
|
|
551
551
|
} }
|
|
552
552
|
]
|
|
553
553
|
},
|
|
554
554
|
{
|
|
555
555
|
label: "Offers",
|
|
556
556
|
onClick: () => {
|
|
557
|
-
window.location.href = "/
|
|
557
|
+
window.location.href = "/orgselector/?path=offer" + encodedAuthData;
|
|
558
558
|
}
|
|
559
559
|
},
|
|
560
560
|
{
|
|
561
561
|
label: "Vouchers",
|
|
562
562
|
onClick: () => {
|
|
563
|
-
window.location.href = "
|
|
563
|
+
window.location.href = "/orgselector/?path=voucher" + encodedAuthData;
|
|
564
564
|
}
|
|
565
565
|
},
|
|
566
566
|
{
|
|
@@ -650,23 +650,6 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
650
650
|
optionsContainer.classList.add("max-h-0");
|
|
651
651
|
}
|
|
652
652
|
};
|
|
653
|
-
const checkForAuthData = () => {
|
|
654
|
-
const params = new URLSearchParams(window.location.search);
|
|
655
|
-
let authData2 = params.get("authData");
|
|
656
|
-
if (authData2) {
|
|
657
|
-
localStorage.setItem("encodedAuthData", authData2);
|
|
658
|
-
authData2 = atob(authData2);
|
|
659
|
-
localStorage.setItem("authData", authData2);
|
|
660
|
-
const parsedAuthData = JSON.parse(authData2);
|
|
661
|
-
setAuthData(parsedAuthData);
|
|
662
|
-
params.delete("authData");
|
|
663
|
-
const newUrl = window.location.pathname + (params.toString() ? "?" + params.toString() : "");
|
|
664
|
-
window.history.replaceState({}, document.title, newUrl);
|
|
665
|
-
}
|
|
666
|
-
};
|
|
667
|
-
(0, import_react11.useEffect)(() => {
|
|
668
|
-
checkForAuthData();
|
|
669
|
-
}, []);
|
|
670
653
|
(0, import_react11.useEffect)(() => {
|
|
671
654
|
const storedAuthData = localStorage.getItem("authData");
|
|
672
655
|
if (storedAuthData) {
|
package/dist/index.mjs
CHANGED
|
@@ -449,7 +449,7 @@ var navItemsConstant = [
|
|
|
449
449
|
{
|
|
450
450
|
label: "Tags",
|
|
451
451
|
onClick: () => {
|
|
452
|
-
window.location.href = "/
|
|
452
|
+
window.location.href = "/orgselector/?path=tag" + encodedAuthData;
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
],
|
|
@@ -496,23 +496,23 @@ var navItemsConstant = [
|
|
|
496
496
|
isDropDown: true,
|
|
497
497
|
options: [
|
|
498
498
|
{ label: "Pricing Policy", onClick: () => {
|
|
499
|
-
window.location.href = "/
|
|
499
|
+
window.location.href = "/orgselector/?path=pricing-policy" + encodedAuthData;
|
|
500
500
|
} },
|
|
501
501
|
{ label: "Travel Policy", onClick: () => {
|
|
502
|
-
window.location.href = "/
|
|
502
|
+
window.location.href = "/orgselector/?path=travel-policy" + encodedAuthData;
|
|
503
503
|
} }
|
|
504
504
|
]
|
|
505
505
|
},
|
|
506
506
|
{
|
|
507
507
|
label: "Offers",
|
|
508
508
|
onClick: () => {
|
|
509
|
-
window.location.href = "/
|
|
509
|
+
window.location.href = "/orgselector/?path=offer" + encodedAuthData;
|
|
510
510
|
}
|
|
511
511
|
},
|
|
512
512
|
{
|
|
513
513
|
label: "Vouchers",
|
|
514
514
|
onClick: () => {
|
|
515
|
-
window.location.href = "
|
|
515
|
+
window.location.href = "/orgselector/?path=voucher" + encodedAuthData;
|
|
516
516
|
}
|
|
517
517
|
},
|
|
518
518
|
{
|
|
@@ -602,23 +602,6 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
602
602
|
optionsContainer.classList.add("max-h-0");
|
|
603
603
|
}
|
|
604
604
|
};
|
|
605
|
-
const checkForAuthData = () => {
|
|
606
|
-
const params = new URLSearchParams(window.location.search);
|
|
607
|
-
let authData2 = params.get("authData");
|
|
608
|
-
if (authData2) {
|
|
609
|
-
localStorage.setItem("encodedAuthData", authData2);
|
|
610
|
-
authData2 = atob(authData2);
|
|
611
|
-
localStorage.setItem("authData", authData2);
|
|
612
|
-
const parsedAuthData = JSON.parse(authData2);
|
|
613
|
-
setAuthData(parsedAuthData);
|
|
614
|
-
params.delete("authData");
|
|
615
|
-
const newUrl = window.location.pathname + (params.toString() ? "?" + params.toString() : "");
|
|
616
|
-
window.history.replaceState({}, document.title, newUrl);
|
|
617
|
-
}
|
|
618
|
-
};
|
|
619
|
-
useEffect(() => {
|
|
620
|
-
checkForAuthData();
|
|
621
|
-
}, []);
|
|
622
605
|
useEffect(() => {
|
|
623
606
|
const storedAuthData = localStorage.getItem("authData");
|
|
624
607
|
if (storedAuthData) {
|