aq-fe-framework 0.1.305 → 0.1.307

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.
@@ -135,8 +135,8 @@ import { ActionIcon } from "@mantine/core";
135
135
  import { IconDeviceFloppy, IconEdit, IconPlus, IconTrash } from "@tabler/icons-react";
136
136
  import { jsx as jsx4 } from "react/jsx-runtime";
137
137
  function MyActionIcon(_a) {
138
- var _b = _a, { children, crudType } = _b, rest = __objRest(_b, ["children", "crudType"]);
139
- if (!crudType) {
138
+ var _b = _a, { children, crudType = "default" } = _b, rest = __objRest(_b, ["children", "crudType"]);
139
+ if (crudType == "default") {
140
140
  return /* @__PURE__ */ jsx4(ActionIcon, __spreadProps(__spreadValues({ color: "indigo" }, rest), { children }));
141
141
  }
142
142
  if (crudType == "create") {
@@ -835,7 +835,7 @@ function MyButtonModal(_a) {
835
835
  "objectName"
836
836
  ]);
837
837
  const objectNameLower = objectName == null ? void 0 : objectName.toLowerCase();
838
- if (crudType = "default") {
838
+ if (crudType == "default") {
839
839
  return /* @__PURE__ */ jsxs9(Fragment6, { children: [
840
840
  /* @__PURE__ */ jsx17(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, rest), { children: label })),
841
841
  /* @__PURE__ */ jsx17(
@@ -65,7 +65,7 @@ import {
65
65
  useS_BasicAppShell,
66
66
  useS_ButtonImport,
67
67
  utils_layout_getItemsWithoutLinks
68
- } from "../chunk-ZSH3QSIH.mjs";
68
+ } from "../chunk-EVWPVCJT.mjs";
69
69
  import "../chunk-5U2JSHSJ.mjs";
70
70
  import "../chunk-NWBLJ3W3.mjs";
71
71
  import {
@@ -24,7 +24,7 @@ interface CoreButtonCreateUpdateProps<IReq, IRes> {
24
24
  actionIconProps?: ActionIconProps;
25
25
  buttonProps?: ButtonProps;
26
26
  isUpdate?: boolean;
27
- onSubmit: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>>;
27
+ onSubmit: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>> | void;
28
28
  onSuccess?: () => void;
29
29
  onError?: () => void;
30
30
  form: UseFormReturnType<IReq>;
@@ -205,7 +205,23 @@ function CoreButtonCreateUpdate({
205
205
  const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
206
206
  const queryClient = useQueryClient();
207
207
  const mutation = useMyReactMutation({
208
- axiosFn: (values) => onSubmit(values),
208
+ axiosFn: (values) => {
209
+ const result = onSubmit(values);
210
+ if (result === void 0) {
211
+ return Promise.resolve({
212
+ data: {
213
+ message: "T\u1EA1o th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
214
+ data: {},
215
+ isSuccess: 1
216
+ },
217
+ status: 200,
218
+ statusText: "OK",
219
+ headers: {},
220
+ config: {}
221
+ });
222
+ }
223
+ return result;
224
+ },
209
225
  options: __spreadValues(__spreadValues({
210
226
  onSuccess: () => {
211
227
  queryClient.invalidateQueries();
@@ -30,7 +30,7 @@ import {
30
30
  useS_BasicAppShell,
31
31
  useS_authenticate,
32
32
  utils_layout_getItemsWithoutLinks
33
- } from "../chunk-ZSH3QSIH.mjs";
33
+ } from "../chunk-EVWPVCJT.mjs";
34
34
  import "../chunk-5U2JSHSJ.mjs";
35
35
  import {
36
36
  const_object_documentTypes
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "types": "./dist/core/index.d.mts"
39
39
  }
40
40
  },
41
- "version": "0.1.305",
41
+ "version": "0.1.307",
42
42
  "private": false,
43
43
  "files": [
44
44
  "dist"