aq-fe-framework 0.1.193 → 0.1.195

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 {
@@ -405,6 +405,10 @@ declare function F_core71678_Delete({ id, code }: {
405
405
  code: string;
406
406
  }): react_jsx_runtime.JSX.Element;
407
407
 
408
+ interface IUserSkillCenters extends IBaseEntity {
409
+ userId?: number;
410
+ skillCenterId?: number;
411
+ }
408
412
  interface I$5 {
409
413
  id?: number;
410
414
  userName?: string;
@@ -412,6 +416,7 @@ interface I$5 {
412
416
  fullName?: string;
413
417
  email?: string;
414
418
  phoneNumber?: string;
419
+ userSkillCenters?: IUserSkillCenters[];
415
420
  }
416
421
  declare function F_core71678_Update({ user }: {
417
422
  user: I$5;
@@ -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
  });
@@ -2632,6 +2668,8 @@ function F_core71678_Update({ user }) {
2632
2668
  console.log(form.values);
2633
2669
  }, [form.values]);
2634
2670
  return /* @__PURE__ */ jsx50(MyActionIconUpdate, { form, onSubmit: async (values) => {
2671
+ var _a2;
2672
+ const formValues = form.getValues();
2635
2673
  return await baseAxios_default.post(
2636
2674
  "/Account/update",
2637
2675
  __spreadProps(__spreadValues({}, values), {
@@ -2640,7 +2678,15 @@ function F_core71678_Update({ user }) {
2640
2678
  concurrencyStamp: "",
2641
2679
  isBlocked: false,
2642
2680
  isEnabled: true,
2643
- workingUnitId: null
2681
+ workingUnitId: null,
2682
+ userSkillCenters: (_a2 = formValues.userSkillCenters) == null ? void 0 : _a2.map((item) => ({
2683
+ id: item.id,
2684
+ code: "string",
2685
+ name: "string",
2686
+ concurrencyStamp: "string",
2687
+ isEnabled: true,
2688
+ skillCenterId: parseInt(item.toString())
2689
+ }))
2644
2690
  })
2645
2691
  );
2646
2692
  }, children: /* @__PURE__ */ jsxs33(MyFlexColumn, { children: [
@@ -2648,7 +2694,21 @@ function F_core71678_Update({ user }) {
2648
2694
  /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ disabled: true, label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
2649
2695
  /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
2650
2696
  /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
2651
- /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber")))
2697
+ /* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
2698
+ skillCenter_getAll_query.data && /* @__PURE__ */ jsx50(
2699
+ MultiSelect2,
2700
+ {
2701
+ label: "Trung t\xE2m k\u1EF9 n\u0103ng",
2702
+ placeholder: "Ch\u1ECDn trung t\xE2m k\u1EF9 n\u0103ng",
2703
+ data: (_a = skillCenter_getAll_query.data) == null ? void 0 : _a.map((item) => {
2704
+ var _a2;
2705
+ return {
2706
+ label: item.name,
2707
+ value: (_a2 = item.id) == null ? void 0 : _a2.toString()
2708
+ };
2709
+ })
2710
+ }
2711
+ )
2652
2712
  ] }) });
2653
2713
  }
2654
2714
 
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.195",
26
26
  "private": false,
27
27
  "files": [
28
28
  "dist"