aq-fe-framework 0.1.193 → 0.1.194

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.
@@ -36,7 +36,21 @@ function useQ_AQ_GetAQModule() {
36
36
  return query;
37
37
  }
38
38
 
39
+ // src/hooks/query/SkillCenter/useQ_SkillCenter_GetAll.ts
40
+ import { useQuery as useQuery2 } from "@tanstack/react-query";
41
+ function useQ_SkillCenter_GetAll() {
42
+ const query = useQuery2({
43
+ queryKey: [],
44
+ queryFn: async () => {
45
+ const res = await baseAxios_default.get("/SkillCenter/GetAll");
46
+ return res.data.data;
47
+ }
48
+ });
49
+ return query;
50
+ }
51
+
39
52
  export {
40
53
  baseAxios_default,
41
- useQ_AQ_GetAQModule
54
+ useQ_AQ_GetAQModule,
55
+ useQ_SkillCenter_GetAll
42
56
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  baseAxios_default,
3
3
  useQ_AQ_GetAQModule
4
- } from "./chunk-PPIWRJB2.mjs";
4
+ } from "./chunk-J76K4YUA.mjs";
5
5
  import {
6
6
  createGenericStore
7
7
  } from "./chunk-Y3YGC5IH.mjs";
@@ -66,8 +66,8 @@ import {
66
66
  useS_BasicAppShell,
67
67
  useS_ButtonImport,
68
68
  utils_layout_getItemsWithoutLinks
69
- } from "../chunk-OXDO4ODE.mjs";
70
- import "../chunk-PPIWRJB2.mjs";
69
+ } from "../chunk-M3DNEQXS.mjs";
70
+ import "../chunk-J76K4YUA.mjs";
71
71
  import "../chunk-Y3YGC5IH.mjs";
72
72
  import "../chunk-5U2JSHSJ.mjs";
73
73
  import "../chunk-7ZCOFATU.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useQ_AQ_GetAQModule
3
- } from "../chunk-PPIWRJB2.mjs";
3
+ } from "../chunk-J76K4YUA.mjs";
4
4
  import "../chunk-7ZCOFATU.mjs";
5
5
  import "../chunk-FWCSY2DS.mjs";
6
6
  export {
@@ -25,11 +25,12 @@ import {
25
25
  useS_BasicAppShell,
26
26
  useS_authenticate,
27
27
  utils_layout_getItemsWithoutLinks
28
- } from "../chunk-OXDO4ODE.mjs";
28
+ } from "../chunk-M3DNEQXS.mjs";
29
29
  import {
30
30
  baseAxios_default,
31
- useQ_AQ_GetAQModule
32
- } from "../chunk-PPIWRJB2.mjs";
31
+ useQ_AQ_GetAQModule,
32
+ useQ_SkillCenter_GetAll
33
+ } from "../chunk-J76K4YUA.mjs";
33
34
  import {
34
35
  createGenericStore
35
36
  } from "../chunk-Y3YGC5IH.mjs";
@@ -2568,10 +2569,13 @@ function F_core71678_ChangePermission({ user }) {
2568
2569
  }
2569
2570
 
2570
2571
  // src/modules-features/admin/core/core71678/F_core71678_Create.tsx
2572
+ import { MultiSelect } from "@mantine/core";
2571
2573
  import { useForm as useForm16 } from "@mantine/form";
2572
2574
  import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
2573
2575
  var ENDPOINT2 = "/Account/create";
2574
2576
  function F_core71678_Create() {
2577
+ var _a;
2578
+ const skillCenter_getAll_query = useQ_SkillCenter_GetAll();
2575
2579
  const form = useForm16({
2576
2580
  initialValues: {
2577
2581
  fullName: "",
@@ -2586,6 +2590,8 @@ function F_core71678_Create() {
2586
2590
  }
2587
2591
  });
2588
2592
  async function handleSubmit() {
2593
+ var _a2;
2594
+ const formValues = form.getValues();
2589
2595
  return await baseAxios_default.post(ENDPOINT2, __spreadProps(__spreadValues({}, form.getValues()), {
2590
2596
  passwordHash: "",
2591
2597
  id: 0,
@@ -2594,7 +2600,20 @@ function F_core71678_Create() {
2594
2600
  isBlocked: false,
2595
2601
  isEnabled: true,
2596
2602
  workingUnitId: void 0,
2597
- AQModuleId: 1002
2603
+ AQModuleId: 1002,
2604
+ avatarFileDetail: {
2605
+ fileName: "",
2606
+ fileExtension: "",
2607
+ fileBase64String: ""
2608
+ },
2609
+ userSkillCenters: (_a2 = formValues.userSkillCenters) == null ? void 0 : _a2.map((item) => ({
2610
+ id: 0,
2611
+ code: "string",
2612
+ name: "string",
2613
+ concurrencyStamp: "string",
2614
+ isEnabled: true,
2615
+ skillCenterId: parseInt(item.toString())
2616
+ }))
2598
2617
  }));
2599
2618
  }
2600
2619
  return /* @__PURE__ */ jsxs32(MyButtonCreate, { form, onSubmit: handleSubmit, objectName: "ng\u01B0\u1EDDi d\xF9ng", children: [
@@ -2603,7 +2622,21 @@ function F_core71678_Create() {
2603
2622
  /* @__PURE__ */ jsx48(MyTextInput, __spreadValues({ label: "M\u1EADt kh\u1EA9u" }, form.getInputProps("password"))),
2604
2623
  /* @__PURE__ */ jsx48(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
2605
2624
  /* @__PURE__ */ jsx48(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
2606
- /* @__PURE__ */ jsx48(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber")))
2625
+ /* @__PURE__ */ jsx48(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
2626
+ skillCenter_getAll_query.data && /* @__PURE__ */ jsx48(
2627
+ MultiSelect,
2628
+ __spreadValues({
2629
+ label: "Trung t\xE2m k\u1EF9 n\u0103ng",
2630
+ placeholder: "Ch\u1ECDn trung t\xE2m k\u1EF9 n\u0103ng",
2631
+ data: (_a = skillCenter_getAll_query.data) == null ? void 0 : _a.map((item) => {
2632
+ var _a2;
2633
+ return {
2634
+ label: item.name,
2635
+ value: (_a2 = item.id) == null ? void 0 : _a2.toString()
2636
+ };
2637
+ })
2638
+ }, form.getInputProps("userSkillCenters"))
2639
+ )
2607
2640
  ] });
2608
2641
  }
2609
2642
 
@@ -2621,10 +2654,13 @@ function F_core71678_Delete({ id, code }) {
2621
2654
  }
2622
2655
 
2623
2656
  // src/modules-features/admin/core/core71678/F_core71678_Update.tsx
2657
+ import { MultiSelect as MultiSelect2 } from "@mantine/core";
2624
2658
  import { useForm as useForm17 } from "@mantine/form";
2625
2659
  import { useEffect as useEffect7 } from "react";
2626
2660
  import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
2627
2661
  function F_core71678_Update({ user }) {
2662
+ var _a;
2663
+ const skillCenter_getAll_query = useQ_SkillCenter_GetAll();
2628
2664
  const form = useForm17({
2629
2665
  initialValues: user
2630
2666
  });
@@ -2648,7 +2684,21 @@ function F_core71678_Update({ user }) {
2648
2684
  /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ disabled: true, label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
2649
2685
  /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
2650
2686
  /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
2651
- /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber")))
2687
+ /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
2688
+ skillCenter_getAll_query.data && /* @__PURE__ */ jsx50(
2689
+ MultiSelect2,
2690
+ {
2691
+ label: "Trung t\xE2m k\u1EF9 n\u0103ng",
2692
+ placeholder: "Ch\u1ECDn trung t\xE2m k\u1EF9 n\u0103ng",
2693
+ data: (_a = skillCenter_getAll_query.data) == null ? void 0 : _a.map((item) => {
2694
+ var _a2;
2695
+ return {
2696
+ label: item.name,
2697
+ value: (_a2 = item.id) == null ? void 0 : _a2.toString()
2698
+ };
2699
+ })
2700
+ }
2701
+ )
2652
2702
  ] }) });
2653
2703
  }
2654
2704
 
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "types": "./dist/hooks/index.d.mts"
23
23
  }
24
24
  },
25
- "version": "0.1.193",
25
+ "version": "0.1.194",
26
26
  "private": false,
27
27
  "files": [
28
28
  "dist"