jett.admin.npmpackage 1.0.93 → 1.0.95

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.
Files changed (3) hide show
  1. package/dist/index.js +109 -62
  2. package/dist/index.mjs +112 -70
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -455,33 +455,6 @@ var navItemsConstant = [
455
455
  },
456
456
  isDropDown: false
457
457
  },
458
- {
459
- Icon: import_lucide_react4.Globe,
460
- label: "TMC Ecosystem",
461
- onClick: () => {
462
- },
463
- isDropDown: true,
464
- options: [
465
- {
466
- label: "Markets",
467
- onClick: () => {
468
- window.location.href = "/market/";
469
- }
470
- },
471
- {
472
- label: "Users",
473
- onClick: () => {
474
- window.location.href = `/users/users?role=admin&auth=${encodedAuthData}`;
475
- }
476
- },
477
- {
478
- label: "Supplier Ecosystem",
479
- onClick: () => {
480
- window.location.href = "/supplier/";
481
- }
482
- }
483
- ]
484
- },
485
458
  {
486
459
  Icon: import_lucide_react4.Building,
487
460
  label: "Consumer Ecosystem",
@@ -501,27 +474,41 @@ var navItemsConstant = [
501
474
  }
502
475
  },
503
476
  {
504
- label: "Booking History",
477
+ label: "Users",
505
478
  onClick: () => {
506
- window.location.href = "/finance/bookingHistory/";
479
+ window.location.href = "/orgselector/?path=users";
507
480
  }
508
481
  },
509
482
  {
510
- label: "Reports",
483
+ label: "Tags (Consumer Variables)",
511
484
  onClick: () => {
512
- window.open("https://viz.jett.travel", "_blank");
485
+ window.location.href = "/orgselector/?path=tag";
513
486
  }
514
487
  },
515
488
  {
516
- label: "Users",
489
+ label: "Special Request",
517
490
  onClick: () => {
518
- window.location.href = "/orgselector/?path=users";
491
+ window.location.href = "/orgselector/?path=special-requests";
519
492
  }
520
493
  },
521
494
  {
522
- label: "Tags",
495
+ label: "Support Tickets (Coming Soon)"
496
+ // onClick: () => {},
497
+ }
498
+ ],
499
+ isDropDown: true
500
+ },
501
+ {
502
+ Icon: import_lucide_react4.Banknote,
503
+ label: "Finance",
504
+ onClick: () => {
505
+ },
506
+ isDropDown: true,
507
+ options: [
508
+ {
509
+ label: "Booking History",
523
510
  onClick: () => {
524
- window.location.href = "/orgselector/?path=tag";
511
+ window.location.href = "/finance/bookingHistory/";
525
512
  }
526
513
  },
527
514
  {
@@ -529,15 +516,8 @@ var navItemsConstant = [
529
516
  onClick: () => {
530
517
  window.location.href = "/finance/paymentsLedger/";
531
518
  }
532
- },
533
- {
534
- label: "Special Request",
535
- onClick: () => {
536
- window.location.href = "/orgselector/?path=special-requests";
537
- }
538
519
  }
539
- ],
540
- isDropDown: true
520
+ ]
541
521
  },
542
522
  {
543
523
  Icon: import_lucide_react4.DollarSign,
@@ -547,7 +527,7 @@ var navItemsConstant = [
547
527
  isDropDown: true,
548
528
  options: [
549
529
  {
550
- label: "Pricing Policy",
530
+ label: "Pricing Engine",
551
531
  onClick: () => {
552
532
  window.location.href = "/orgselector/?path=pricing-policy";
553
533
  }
@@ -563,21 +543,45 @@ var navItemsConstant = [
563
543
  onClick: () => {
564
544
  window.location.href = "/orgselector/?path=voucher";
565
545
  }
566
- },
546
+ }
547
+ ]
548
+ },
549
+ {
550
+ Icon: import_lucide_react4.Handshake,
551
+ label: "Supplier Ecosystem",
552
+ onClick: () => {
553
+ },
554
+ isDropDown: true,
555
+ options: [
567
556
  {
568
- label: "Supplier Deals",
557
+ label: "Suppliers List",
569
558
  onClick: () => {
570
- window.location.href = "/supplierdeals/";
559
+ window.location.href = "/supplier/";
571
560
  }
572
561
  },
573
562
  {
574
- label: "Invoices",
563
+ label: "Supplier Deals",
575
564
  onClick: () => {
576
- window.location.href = "/finance/invoices/";
565
+ window.location.href = "/supplierdeals/";
577
566
  }
578
567
  }
579
568
  ]
580
569
  },
570
+ {
571
+ Icon: import_lucide_react4.BarChart3,
572
+ label: "Reports",
573
+ onClick: () => {
574
+ },
575
+ isDropDown: true,
576
+ options: [
577
+ {
578
+ label: "Reports (Coming Soon)"
579
+ // onClick: () => {
580
+ // window.open("https://viz.jett.travel", "_blank");
581
+ // },
582
+ }
583
+ ]
584
+ },
581
585
  {
582
586
  Icon: import_lucide_react4.Cog,
583
587
  label: "Settings",
@@ -590,6 +594,22 @@ var navItemsConstant = [
590
594
  onClick: () => {
591
595
  window.location.href = "/whitelabel/";
592
596
  }
597
+ },
598
+ {
599
+ label: "Markets",
600
+ onClick: () => {
601
+ window.location.href = "/market/";
602
+ }
603
+ },
604
+ {
605
+ label: "Users",
606
+ onClick: () => {
607
+ window.location.href = `/users/users?role=admin&auth=${encodedAuthData}`;
608
+ }
609
+ },
610
+ {
611
+ label: "Reports Configurations (Coming Soon)"
612
+ // onClick: () => {},
593
613
  }
594
614
  ]
595
615
  }
@@ -836,19 +856,6 @@ var AppSideBar = ({
836
856
  if (!menuUrlData || !currentPath) return false;
837
857
  const normalizedMenuPath = menuUrlData.pathname.replace(/\/$/, "") || "/";
838
858
  const normalizedCurrentPath = currentPath.replace(/\/$/, "") || "/";
839
- if (normalizedMenuPath === "/orgselector" && normalizedCurrentPath === "/orgselector") {
840
- const menuPathParam = new URLSearchParams(menuUrlData.search).get("path");
841
- const currentPathParam = new URLSearchParams(currentSearch).get("path");
842
- if (menuPathParam && currentPathParam) {
843
- return menuPathParam === currentPathParam;
844
- }
845
- if (menuPathParam && !currentPathParam) {
846
- return false;
847
- }
848
- if (!menuPathParam && currentPathParam) {
849
- return false;
850
- }
851
- }
852
859
  if (normalizedMenuPath === "/users/users" && normalizedCurrentPath === "/users/users") {
853
860
  const menuParams = new URLSearchParams(menuUrlData.search);
854
861
  const currentParams = new URLSearchParams(currentSearch);
@@ -862,6 +869,46 @@ var AppSideBar = ({
862
869
  }
863
870
  return true;
864
871
  }
872
+ if (normalizedMenuPath === "/corporate" && normalizedCurrentPath.startsWith("/org/organizations")) {
873
+ return true;
874
+ }
875
+ if (normalizedMenuPath === "/trips") {
876
+ if (normalizedCurrentPath.startsWith("/tripdetails") || normalizedCurrentPath.startsWith("/offline")) {
877
+ return true;
878
+ }
879
+ }
880
+ if (normalizedMenuPath === "/orgselector" && menuUrlData.search) {
881
+ const menuPathParam = new URLSearchParams(menuUrlData.search).get("path");
882
+ if (menuPathParam) {
883
+ const pathRouteMap = {
884
+ "offer": "/offer/offer",
885
+ "voucher": "/voucher/voucher",
886
+ "tag": "/tags/tags",
887
+ "special-requests": "/corporate/special-requests",
888
+ "pricing-policy": "/policies/pricing-policy",
889
+ "users": "/users/users"
890
+ // Consumer Ecosystem Users (no role param)
891
+ };
892
+ const expectedRoute = pathRouteMap[menuPathParam];
893
+ if (expectedRoute) {
894
+ if (normalizedCurrentPath === expectedRoute || normalizedCurrentPath.startsWith(expectedRoute + "/")) {
895
+ if (menuPathParam === "users") {
896
+ const currentParams = new URLSearchParams(currentSearch);
897
+ const currentRole = currentParams.get("role");
898
+ return currentRole !== "admin";
899
+ }
900
+ return true;
901
+ }
902
+ }
903
+ }
904
+ if (normalizedCurrentPath === "/orgselector") {
905
+ const menuPathParam2 = new URLSearchParams(menuUrlData.search).get("path");
906
+ const currentPathParam = new URLSearchParams(currentSearch).get("path");
907
+ if (menuPathParam2 && currentPathParam) {
908
+ return menuPathParam2 === currentPathParam;
909
+ }
910
+ }
911
+ }
865
912
  if (normalizedMenuPath === normalizedCurrentPath) {
866
913
  if (menuUrlData.search) {
867
914
  const menuParams = new URLSearchParams(menuUrlData.search);
package/dist/index.mjs CHANGED
@@ -393,7 +393,7 @@ var CustomUpload = ({
393
393
  // src/sideBar/SideBar.jsx
394
394
  import {
395
395
  ChevronDown as ChevronDown3,
396
- Globe as Globe2,
396
+ Globe,
397
397
  LogOut,
398
398
  Menu,
399
399
  X
@@ -403,18 +403,13 @@ import React12, { useEffect, useState as useState3, useCallback } from "react";
403
403
  // ConstantUI.js
404
404
  import {
405
405
  Home,
406
- BaggageClaim,
407
- Users,
408
406
  Banknote,
409
- Globe,
410
- TrendingUp,
411
- FileText,
412
- FileKey2,
413
407
  LifeBuoy,
414
408
  Cog,
415
409
  Building,
416
410
  Handshake,
417
- DollarSign
411
+ DollarSign,
412
+ BarChart3
418
413
  } from "lucide-react";
419
414
  var encodedAuthData = localStorage.getItem("encodedAuthData");
420
415
  var navItemsConstant = [
@@ -426,33 +421,6 @@ var navItemsConstant = [
426
421
  },
427
422
  isDropDown: false
428
423
  },
429
- {
430
- Icon: Globe,
431
- label: "TMC Ecosystem",
432
- onClick: () => {
433
- },
434
- isDropDown: true,
435
- options: [
436
- {
437
- label: "Markets",
438
- onClick: () => {
439
- window.location.href = "/market/";
440
- }
441
- },
442
- {
443
- label: "Users",
444
- onClick: () => {
445
- window.location.href = `/users/users?role=admin&auth=${encodedAuthData}`;
446
- }
447
- },
448
- {
449
- label: "Supplier Ecosystem",
450
- onClick: () => {
451
- window.location.href = "/supplier/";
452
- }
453
- }
454
- ]
455
- },
456
424
  {
457
425
  Icon: Building,
458
426
  label: "Consumer Ecosystem",
@@ -472,27 +440,41 @@ var navItemsConstant = [
472
440
  }
473
441
  },
474
442
  {
475
- label: "Booking History",
443
+ label: "Users",
476
444
  onClick: () => {
477
- window.location.href = "/finance/bookingHistory/";
445
+ window.location.href = "/orgselector/?path=users";
478
446
  }
479
447
  },
480
448
  {
481
- label: "Reports",
449
+ label: "Tags (Consumer Variables)",
482
450
  onClick: () => {
483
- window.open("https://viz.jett.travel", "_blank");
451
+ window.location.href = "/orgselector/?path=tag";
484
452
  }
485
453
  },
486
454
  {
487
- label: "Users",
455
+ label: "Special Request",
488
456
  onClick: () => {
489
- window.location.href = "/orgselector/?path=users";
457
+ window.location.href = "/orgselector/?path=special-requests";
490
458
  }
491
459
  },
492
460
  {
493
- label: "Tags",
461
+ label: "Support Tickets (Coming Soon)"
462
+ // onClick: () => {},
463
+ }
464
+ ],
465
+ isDropDown: true
466
+ },
467
+ {
468
+ Icon: Banknote,
469
+ label: "Finance",
470
+ onClick: () => {
471
+ },
472
+ isDropDown: true,
473
+ options: [
474
+ {
475
+ label: "Booking History",
494
476
  onClick: () => {
495
- window.location.href = "/orgselector/?path=tag";
477
+ window.location.href = "/finance/bookingHistory/";
496
478
  }
497
479
  },
498
480
  {
@@ -500,15 +482,8 @@ var navItemsConstant = [
500
482
  onClick: () => {
501
483
  window.location.href = "/finance/paymentsLedger/";
502
484
  }
503
- },
504
- {
505
- label: "Special Request",
506
- onClick: () => {
507
- window.location.href = "/orgselector/?path=special-requests";
508
- }
509
485
  }
510
- ],
511
- isDropDown: true
486
+ ]
512
487
  },
513
488
  {
514
489
  Icon: DollarSign,
@@ -518,7 +493,7 @@ var navItemsConstant = [
518
493
  isDropDown: true,
519
494
  options: [
520
495
  {
521
- label: "Pricing Policy",
496
+ label: "Pricing Engine",
522
497
  onClick: () => {
523
498
  window.location.href = "/orgselector/?path=pricing-policy";
524
499
  }
@@ -534,21 +509,45 @@ var navItemsConstant = [
534
509
  onClick: () => {
535
510
  window.location.href = "/orgselector/?path=voucher";
536
511
  }
537
- },
512
+ }
513
+ ]
514
+ },
515
+ {
516
+ Icon: Handshake,
517
+ label: "Supplier Ecosystem",
518
+ onClick: () => {
519
+ },
520
+ isDropDown: true,
521
+ options: [
538
522
  {
539
- label: "Supplier Deals",
523
+ label: "Suppliers List",
540
524
  onClick: () => {
541
- window.location.href = "/supplierdeals/";
525
+ window.location.href = "/supplier/";
542
526
  }
543
527
  },
544
528
  {
545
- label: "Invoices",
529
+ label: "Supplier Deals",
546
530
  onClick: () => {
547
- window.location.href = "/finance/invoices/";
531
+ window.location.href = "/supplierdeals/";
548
532
  }
549
533
  }
550
534
  ]
551
535
  },
536
+ {
537
+ Icon: BarChart3,
538
+ label: "Reports",
539
+ onClick: () => {
540
+ },
541
+ isDropDown: true,
542
+ options: [
543
+ {
544
+ label: "Reports (Coming Soon)"
545
+ // onClick: () => {
546
+ // window.open("https://viz.jett.travel", "_blank");
547
+ // },
548
+ }
549
+ ]
550
+ },
552
551
  {
553
552
  Icon: Cog,
554
553
  label: "Settings",
@@ -561,6 +560,22 @@ var navItemsConstant = [
561
560
  onClick: () => {
562
561
  window.location.href = "/whitelabel/";
563
562
  }
563
+ },
564
+ {
565
+ label: "Markets",
566
+ onClick: () => {
567
+ window.location.href = "/market/";
568
+ }
569
+ },
570
+ {
571
+ label: "Users",
572
+ onClick: () => {
573
+ window.location.href = `/users/users?role=admin&auth=${encodedAuthData}`;
574
+ }
575
+ },
576
+ {
577
+ label: "Reports Configurations (Coming Soon)"
578
+ // onClick: () => {},
564
579
  }
565
580
  ]
566
581
  }
@@ -807,19 +822,6 @@ var AppSideBar = ({
807
822
  if (!menuUrlData || !currentPath) return false;
808
823
  const normalizedMenuPath = menuUrlData.pathname.replace(/\/$/, "") || "/";
809
824
  const normalizedCurrentPath = currentPath.replace(/\/$/, "") || "/";
810
- if (normalizedMenuPath === "/orgselector" && normalizedCurrentPath === "/orgselector") {
811
- const menuPathParam = new URLSearchParams(menuUrlData.search).get("path");
812
- const currentPathParam = new URLSearchParams(currentSearch).get("path");
813
- if (menuPathParam && currentPathParam) {
814
- return menuPathParam === currentPathParam;
815
- }
816
- if (menuPathParam && !currentPathParam) {
817
- return false;
818
- }
819
- if (!menuPathParam && currentPathParam) {
820
- return false;
821
- }
822
- }
823
825
  if (normalizedMenuPath === "/users/users" && normalizedCurrentPath === "/users/users") {
824
826
  const menuParams = new URLSearchParams(menuUrlData.search);
825
827
  const currentParams = new URLSearchParams(currentSearch);
@@ -833,6 +835,46 @@ var AppSideBar = ({
833
835
  }
834
836
  return true;
835
837
  }
838
+ if (normalizedMenuPath === "/corporate" && normalizedCurrentPath.startsWith("/org/organizations")) {
839
+ return true;
840
+ }
841
+ if (normalizedMenuPath === "/trips") {
842
+ if (normalizedCurrentPath.startsWith("/tripdetails") || normalizedCurrentPath.startsWith("/offline")) {
843
+ return true;
844
+ }
845
+ }
846
+ if (normalizedMenuPath === "/orgselector" && menuUrlData.search) {
847
+ const menuPathParam = new URLSearchParams(menuUrlData.search).get("path");
848
+ if (menuPathParam) {
849
+ const pathRouteMap = {
850
+ "offer": "/offer/offer",
851
+ "voucher": "/voucher/voucher",
852
+ "tag": "/tags/tags",
853
+ "special-requests": "/corporate/special-requests",
854
+ "pricing-policy": "/policies/pricing-policy",
855
+ "users": "/users/users"
856
+ // Consumer Ecosystem Users (no role param)
857
+ };
858
+ const expectedRoute = pathRouteMap[menuPathParam];
859
+ if (expectedRoute) {
860
+ if (normalizedCurrentPath === expectedRoute || normalizedCurrentPath.startsWith(expectedRoute + "/")) {
861
+ if (menuPathParam === "users") {
862
+ const currentParams = new URLSearchParams(currentSearch);
863
+ const currentRole = currentParams.get("role");
864
+ return currentRole !== "admin";
865
+ }
866
+ return true;
867
+ }
868
+ }
869
+ }
870
+ if (normalizedCurrentPath === "/orgselector") {
871
+ const menuPathParam2 = new URLSearchParams(menuUrlData.search).get("path");
872
+ const currentPathParam = new URLSearchParams(currentSearch).get("path");
873
+ if (menuPathParam2 && currentPathParam) {
874
+ return menuPathParam2 === currentPathParam;
875
+ }
876
+ }
877
+ }
836
878
  if (normalizedMenuPath === normalizedCurrentPath) {
837
879
  if (menuUrlData.search) {
838
880
  const menuParams = new URLSearchParams(menuUrlData.search);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jett.admin.npmpackage",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "exports": {