sevago-library 1.3.10 → 1.3.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # sevago-library
2
2
 
3
+ ## 1.3.12
4
+
5
+ ### Patch Changes
6
+
7
+ - refactor: simplify app retrieval logic in SystemMonitorSidebarPart
8
+
9
+ ## 1.3.11
10
+
11
+ ### Patch Changes
12
+
13
+ - feat: add SYSTEM app configuration and update APP_BLACK_LIST
14
+
3
15
  ## 1.3.10
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -411,6 +411,20 @@ const APP_OBJ = {
411
411
  group: AppGroup.WORKFLOW_ENGINE,
412
412
  color: APP_GROUP_COLOR[AppGroup.WORKFLOW_ENGINE]
413
413
  },
414
+ SYSTEM: {
415
+ path: {
416
+ local: "http://localhost:12003/system",
417
+ develop: "https://dev.admin.office.sevago.local/system",
418
+ staging: "https://sta.admin.office.sevago.local/system",
419
+ production: "https://admin.office.sevago.local/system",
420
+ production_vps: "https://admin.office.sevago.com.vn/system"
421
+ },
422
+ icon: ICONS.iconDefault,
423
+ content: "Phân Quyền",
424
+ title: "Sevago System",
425
+ group: AppGroup.OTHER,
426
+ color: APP_GROUP_COLOR[AppGroup.WORKFLOW_ENGINE]
427
+ },
414
428
  // OTHER
415
429
  LANDING_PAGE: {
416
430
  path: {
@@ -541,7 +555,7 @@ const APP_OBJ = {
541
555
  path: {
542
556
  local: "http://localhost:12017/internal",
543
557
  develop: "https://dev.admin.warehouse-material.sevago.local/internal",
544
- staging: "https://sta.admin.warehouse-material.sevago.local/internal",
558
+ staging: "https://sta.admin.warehouse-material.sevago.local/",
545
559
  production: "https://admin.warehouse-material.sevago.local/internal",
546
560
  production_vps: ""
547
561
  },
@@ -669,6 +683,7 @@ const APP_BLACK_LIST = {
669
683
  // 'REQUEST',
670
684
  "TRACKING",
671
685
  "PROCESS",
686
+ // 'SYSTEM',
672
687
  // 'LANDING_PAGE',
673
688
  "FORMULA_PRICE",
674
689
  "E_CATALOGUE",
@@ -699,6 +714,7 @@ const APP_BLACK_LIST = {
699
714
  // 'REQUEST',
700
715
  "TRACKING",
701
716
  "PROCESS",
717
+ // 'SYSTEM',
702
718
  // 'LANDING_PAGE',
703
719
  "FORMULA_PRICE",
704
720
  "E_CATALOGUE",
@@ -720,25 +736,27 @@ const APP_BLACK_LIST = {
720
736
  // 'E_HIRING',
721
737
  // 'HR',
722
738
  // 'ORG',
723
- // 'CHAT',
724
- // 'TRAINING',
725
- // 'FORM',
726
- // 'INSIDE',
727
- // 'BOOKING',
728
- // 'PROJECT',
739
+ "CHAT",
740
+ "TRAINING",
741
+ "FORM",
742
+ "INSIDE",
743
+ "BOOKING",
744
+ "PROJECT",
729
745
  // 'REQUEST',
730
- // 'TRACKING',
731
- // 'PROCESS',
746
+ "TRACKING",
747
+ "PROCESS",
748
+ // 'SYSTEM',
732
749
  // 'LANDING_PAGE',
733
750
  // 'FORMULA_PRICE',
734
751
  // 'E_CATALOGUE',
735
752
  // 'PAYROLL',
736
- // 'TIMEKEEPING',
737
- // 'MEAL',
738
- // 'LEAVE',
753
+ "TIMEKEEPING",
754
+ "MEAL",
755
+ "LEAVE"
739
756
  // 'PURCHASE',
740
757
  // 'WAREHOUSE_MATERIAL',
741
758
  // 'MANUFACTURING_PLAN',
759
+ // 'MANUFACTURING_EXECUTION_OLD',
742
760
  // 'MANUFACTURING_EXECUTION',
743
761
  // 'MATERIAL_CONTROL',
744
762
  // 'PRODUCT_MANAGEMENT',
@@ -758,6 +776,7 @@ const APP_BLACK_LIST = {
758
776
  // 'REQUEST',
759
777
  // 'TRACKING',
760
778
  // 'PROCESS',
779
+ // 'SYSTEM',
761
780
  // 'LANDING_PAGE',
762
781
  // 'FORMULA_PRICE',
763
782
  // 'E_CATALOGUE',
@@ -78270,9 +78289,12 @@ const SystemMonitorSidebarPart = ({
78270
78289
  isLongSubDomain = false
78271
78290
  }) => {
78272
78291
  const [open2, setOpen] = React.useState(false);
78273
- const app = React.useMemo(() => {
78274
- return Object.values(APP_OBJ).find((e) => window.location.href.startsWith(e.path[env])) || APP_OBJ.MASTER_DATA;
78275
- }, [window.location.href]);
78292
+ const app = Object.values(APP_OBJ).find(
78293
+ (appInfo) => Object.values(appInfo.path).some((path) => {
78294
+ const normalizedPath = path == null ? void 0 : path.trim();
78295
+ return normalizedPath && window.location.href.startsWith(normalizedPath);
78296
+ })
78297
+ ) ?? APP_OBJ.MASTER_DATA;
78276
78298
  return /* @__PURE__ */ jsxRuntime.jsxs(StackRowAlignCenter, { children: [
78277
78299
  /* @__PURE__ */ jsxRuntime.jsx(ImageElement, { url: ICONS.iconApps, onClick: () => setOpen(true), sizeType: "SQUARE" }),
78278
78300
  /* @__PURE__ */ jsxRuntime.jsx(