aq-fe-framework 0.1.197 → 0.1.199

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.
@@ -2,15 +2,15 @@ import {
2
2
  baseAxios_default,
3
3
  useQ_AQ_GetAQModule
4
4
  } from "./chunk-J76K4YUA.mjs";
5
+ import {
6
+ createGenericStore
7
+ } from "./chunk-Y3YGC5IH.mjs";
5
8
  import {
6
9
  utils_pdf_download
7
10
  } from "./chunk-5U2JSHSJ.mjs";
8
11
  import {
9
12
  utils_notification_show
10
13
  } from "./chunk-7ZCOFATU.mjs";
11
- import {
12
- createGenericStore
13
- } from "./chunk-Y3YGC5IH.mjs";
14
14
  import {
15
15
  __objRest,
16
16
  __spreadProps,
@@ -6949,7 +6949,9 @@ function getRightSection(status) {
6949
6949
  return /* @__PURE__ */ jsx51(Badge2, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "green", circle: true, children: "C" });
6950
6950
  return null;
6951
6951
  }
6952
- function RenderNavLinks({ items }) {
6952
+ function RenderNavLinks({
6953
+ items
6954
+ }) {
6953
6955
  const basicAppShellStore = useS_BasicAppShell();
6954
6956
  const pathName = usePathname2();
6955
6957
  return /* @__PURE__ */ jsx51(Fragment12, { children: items.map((item, index) => /* @__PURE__ */ jsx51(
@@ -6957,17 +6959,21 @@ function RenderNavLinks({ items }) {
6957
6959
  {
6958
6960
  active: item.link === pathName.split("/")[2],
6959
6961
  component: Link3,
6960
- leftSection: getRightSection(item.status),
6961
6962
  opened: basicAppShellStore.state.groupMenuOpenId.includes(item.label),
6962
6963
  href: `/${pathName.split("/")[1]}/${item.link}` || "#",
6963
- label: item.label,
6964
+ label: /* @__PURE__ */ jsxs27(MyFlexRow, { justify: "space-between", children: [
6965
+ item.label,
6966
+ " ",
6967
+ getRightSection(item.status)
6968
+ ] }),
6964
6969
  childrenOffset: 28,
6965
6970
  onClick: () => {
6966
- if (item.links) basicAppShellStore.toggleGroupMenuOpenId(item.label);
6967
- if (item.link) {
6968
- basicAppShellStore.setProperty("menuCode", item.link);
6969
- basicAppShellStore.setProperty("title", item.label);
6971
+ if (item.links) {
6972
+ basicAppShellStore.toggleGroupMenuOpenId(item.label);
6973
+ return;
6970
6974
  }
6975
+ basicAppShellStore.setProperty("menuCode", item.link);
6976
+ basicAppShellStore.setProperty("title", item.label);
6971
6977
  },
6972
6978
  children: item.links && /* @__PURE__ */ jsx51(RenderNavLinks, { items: item.links })
6973
6979
  },
@@ -6975,12 +6981,22 @@ function RenderNavLinks({ items }) {
6975
6981
  )) });
6976
6982
  }
6977
6983
  function childrenMenuToListEnumUsingPageIdAndName(children) {
6978
- return children.flatMap((item) => {
6984
+ const result = [];
6985
+ for (const item of children) {
6979
6986
  if (item.label === "Qu\u1EA3n l\xED h\u1EC7 th\u1ED1ng" || item.label === "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh") {
6980
- return [];
6987
+ continue;
6981
6988
  }
6982
- return item.links ? item.pageId ? [item, ...childrenMenuToListEnumUsingPageIdAndName(item.links)] : childrenMenuToListEnumUsingPageIdAndName(item.links) : item.pageId ? [item] : [];
6983
- });
6989
+ const hasLinks = !!item.links;
6990
+ const hasPageId = !!item.pageId;
6991
+ if (hasPageId) {
6992
+ result.push(item);
6993
+ }
6994
+ if (hasLinks) {
6995
+ const childItems = childrenMenuToListEnumUsingPageIdAndName(item.links);
6996
+ result.push(...childItems);
6997
+ }
6998
+ }
6999
+ return result;
6984
7000
  }
6985
7001
  function validateMenuItems(items) {
6986
7002
  const pageIdSet = /* @__PURE__ */ new Set();
@@ -66,11 +66,11 @@ import {
66
66
  useS_BasicAppShell,
67
67
  useS_ButtonImport,
68
68
  utils_layout_getItemsWithoutLinks
69
- } from "../chunk-GQCLEMLW.mjs";
69
+ } from "../chunk-5U42CUIR.mjs";
70
70
  import "../chunk-J76K4YUA.mjs";
71
+ import "../chunk-Y3YGC5IH.mjs";
71
72
  import "../chunk-5U2JSHSJ.mjs";
72
73
  import "../chunk-7ZCOFATU.mjs";
73
- import "../chunk-Y3YGC5IH.mjs";
74
74
  import "../chunk-FWCSY2DS.mjs";
75
75
  export {
76
76
  AQButtonCreateByImportFile,
@@ -25,12 +25,15 @@ import {
25
25
  useS_BasicAppShell,
26
26
  useS_authenticate,
27
27
  utils_layout_getItemsWithoutLinks
28
- } from "../chunk-GQCLEMLW.mjs";
28
+ } from "../chunk-5U42CUIR.mjs";
29
29
  import {
30
30
  baseAxios_default,
31
31
  useQ_AQ_GetAQModule,
32
32
  useQ_SkillCenter_GetAll
33
33
  } from "../chunk-J76K4YUA.mjs";
34
+ import {
35
+ createGenericStore
36
+ } from "../chunk-Y3YGC5IH.mjs";
34
37
  import {
35
38
  U0DateToDDMMYYYString,
36
39
  U0MyValidateEmail,
@@ -41,9 +44,6 @@ import "../chunk-5U2JSHSJ.mjs";
41
44
  import {
42
45
  utils_notification_show
43
46
  } from "../chunk-7ZCOFATU.mjs";
44
- import {
45
- createGenericStore
46
- } from "../chunk-Y3YGC5IH.mjs";
47
47
  import {
48
48
  __objRest,
49
49
  __spreadProps,
@@ -2627,7 +2627,16 @@ function F_core71678_Create() {
2627
2627
  };
2628
2628
  }),
2629
2629
  onChange: (e) => {
2630
- form.setFieldValue("userSkillCenters", e.map((item) => ({
2630
+ const z = e.map((item) => ({
2631
+ id: 0,
2632
+ code: "string",
2633
+ name: "string",
2634
+ concurrencyStamp: "string",
2635
+ isEnabled: true,
2636
+ skillCenterId: parseInt(item.toString())
2637
+ }));
2638
+ form.setFieldValue("userSkillCenters", e.map((item, idx) => ({
2639
+ idField: idx.toString(),
2631
2640
  id: 0,
2632
2641
  code: "string",
2633
2642
  name: "string",
@@ -2638,7 +2647,7 @@ function F_core71678_Create() {
2638
2647
  },
2639
2648
  value: (_b = form.getValues().userSkillCenters) == null ? void 0 : _b.map((item) => {
2640
2649
  var _a2;
2641
- return (_a2 = item.id) == null ? void 0 : _a2.toString();
2650
+ return (_a2 = item.skillCenterId) == null ? void 0 : _a2.toString();
2642
2651
  })
2643
2652
  }
2644
2653
  )
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "types": "./dist/hooks/index.d.mts"
23
23
  }
24
24
  },
25
- "version": "0.1.197",
25
+ "version": "0.1.199",
26
26
  "private": false,
27
27
  "files": [
28
28
  "dist"