aq-fe-framework 0.1.413 → 0.1.415

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.
@@ -227,21 +227,7 @@ function MyButtonCreateUpdate({
227
227
  const queryClient = useQueryClient();
228
228
  const mutation = useMyReactMutation({
229
229
  axiosFn: (values) => {
230
- const result = onSubmit(values);
231
- if (result === void 0) {
232
- return Promise.resolve({
233
- data: {
234
- message: "T\u1EA1o th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
235
- data: {},
236
- isSuccess: 1
237
- },
238
- status: 200,
239
- statusText: "OK",
240
- headers: {},
241
- config: {}
242
- });
243
- }
244
- return result;
230
+ return values;
245
231
  },
246
232
  options: {
247
233
  onSuccess: (...args) => {
@@ -276,7 +262,7 @@ function MyButtonCreateUpdate({
276
262
  onClick: disclosure[1].open,
277
263
  leftSection: /* @__PURE__ */ jsx4(IconPlus3, {})
278
264
  }, buttonProps), {
279
- children: "Th\xEAm"
265
+ children: (buttonProps == null ? void 0 : buttonProps.children) || "Th\xEAm"
280
266
  })
281
267
  ),
282
268
  /* @__PURE__ */ jsx4(
@@ -296,8 +282,23 @@ function MyButtonCreateUpdate({
296
282
  {
297
283
  onSubmit: form.onSubmit((values) => {
298
284
  const result = onSubmit(values);
285
+ let axiosPromise;
299
286
  if (result == false) return;
300
- mutation.mutate(values);
287
+ if (result == void 0) {
288
+ axiosPromise = Promise.resolve({
289
+ data: {
290
+ message: "T\u1EA1o th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
291
+ data: {},
292
+ isSuccess: 1
293
+ },
294
+ status: 200,
295
+ statusText: "OK",
296
+ headers: {},
297
+ config: {}
298
+ });
299
+ }
300
+ axiosPromise = result;
301
+ mutation.mutate(axiosPromise);
301
302
  }),
302
303
  children: [
303
304
  /* @__PURE__ */ jsx4(
@@ -16,11 +16,11 @@ interface CoreActionIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButton
16
16
  }
17
17
  declare function MyActionIcon({ children, actionType, ...rest }: CoreActionIconProps): react_jsx_runtime.JSX.Element;
18
18
 
19
- interface CoreButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
19
+ interface MyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
20
20
  actionType?: type_action;
21
21
  children?: ReactNode;
22
22
  }
23
- declare function MyButton({ children, actionType, ...rest }: CoreButtonProps): react_jsx_runtime.JSX.Element;
23
+ declare function MyButton({ children, actionType, ...rest }: MyButtonProps): react_jsx_runtime.JSX.Element;
24
24
 
25
25
  interface CoreButtonCreateUpdateProps<IReq, IRes> {
26
26
  modalProps?: Omit<ModalProps, "opened" | "onClose">;
@@ -13,7 +13,7 @@ import {
13
13
  MyStatsCard,
14
14
  MyTextInput,
15
15
  MyWeeklySessionSchedulerPicker
16
- } from "../chunk-H77TNPK6.mjs";
16
+ } from "../chunk-WJ5H73YW.mjs";
17
17
  import "../chunk-GEYCGM75.mjs";
18
18
  import "../chunk-GFEMKKFH.mjs";
19
19
  import "../chunk-OMJJAHOC.mjs";
@@ -42,7 +42,7 @@ import {
42
42
  MyButton as MyButton2,
43
43
  MyDataTableSelectOne,
44
44
  MyTextInput as MyTextInput2
45
- } from "../chunk-H77TNPK6.mjs";
45
+ } from "../chunk-WJ5H73YW.mjs";
46
46
  import {
47
47
  MyDataTable,
48
48
  MyFlexColumn,
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.413",
45
+ "version": "0.1.415",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"