sevago-library 1.3.11 → 1.3.13

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.13
4
+
5
+ ### Patch Changes
6
+
7
+ - refactor: simplify app retrieval logic in SystemMonitorSidebarPart
8
+
9
+ ## 1.3.12
10
+
11
+ ### Patch Changes
12
+
13
+ - refactor: simplify app retrieval logic in SystemMonitorSidebarPart
14
+
3
15
  ## 1.3.11
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -579,6 +579,20 @@ const APP_OBJ = {
579
579
  group: AppGroup.MANUFACTURING,
580
580
  color: APP_GROUP_COLOR[AppGroup.MANUFACTURING]
581
581
  },
582
+ WAREHOUSE_FINISHED_GOODS: {
583
+ path: {
584
+ local: "http://localhost:12017/finished-goods",
585
+ develop: "https://dev.admin.warehouse-material.sevago.local/finished-goods",
586
+ staging: "https://sta.admin.warehouse-material.sevago.local/finished-goods",
587
+ production: "https://admin.warehouse-material.sevago.local/finished-goods",
588
+ production_vps: ""
589
+ },
590
+ icon: ICONS.iconWarehouseMaterialCcdc,
591
+ content: "Kho thành phẩm",
592
+ title: "Sevago Finished Goods",
593
+ group: AppGroup.MANUFACTURING,
594
+ color: APP_GROUP_COLOR[AppGroup.MANUFACTURING]
595
+ },
582
596
  MANUFACTURING_PLAN: {
583
597
  path: {
584
598
  local: "http://localhost:12019",
@@ -78289,9 +78303,12 @@ const SystemMonitorSidebarPart = ({
78289
78303
  isLongSubDomain = false
78290
78304
  }) => {
78291
78305
  const [open2, setOpen] = React.useState(false);
78292
- const app = React.useMemo(() => {
78293
- return Object.values(APP_OBJ).find((e) => window.location.href.startsWith(e.path[env])) || APP_OBJ.MASTER_DATA;
78294
- }, [window.location.href]);
78306
+ const app = Object.values(APP_OBJ).find(
78307
+ (appInfo) => Object.values(appInfo.path).some((path) => {
78308
+ const normalizedPath = path == null ? void 0 : path.trim();
78309
+ return normalizedPath && window.location.href.startsWith(normalizedPath);
78310
+ })
78311
+ ) ?? APP_OBJ.MASTER_DATA;
78295
78312
  return /* @__PURE__ */ jsxRuntime.jsxs(StackRowAlignCenter, { children: [
78296
78313
  /* @__PURE__ */ jsxRuntime.jsx(ImageElement, { url: ICONS.iconApps, onClick: () => setOpen(true), sizeType: "SQUARE" }),
78297
78314
  /* @__PURE__ */ jsxRuntime.jsx(