aq-fe-framework 0.1.532 → 0.1.534

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.
@@ -216,7 +216,8 @@ function MyButtonCreateUpdate({
216
216
  children,
217
217
  disclosure: externalDisclosure,
218
218
  isUpdate = false,
219
- scrollAreaAutosizeProps
219
+ scrollAreaAutosizeProps,
220
+ formId
220
221
  }) {
221
222
  const theme = useMantineColorScheme3();
222
223
  const defaultDisclosure = useDisclosure();
@@ -229,8 +230,6 @@ function MyButtonCreateUpdate({
229
230
  options: {
230
231
  onSuccess: (...args) => {
231
232
  if (!ignoreDefaultOnSuccess) {
232
- queryClient.invalidateQueries();
233
- utils_notification_show({ crudType: isUpdate ? "update" : "create" });
234
233
  if (closeModalWhenSubmit) disclosure[1].close();
235
234
  if (resetFormWhenSubmit) form.reset();
236
235
  }
@@ -277,6 +276,7 @@ function MyButtonCreateUpdate({
277
276
  children: /* @__PURE__ */ jsxs(
278
277
  "form",
279
278
  {
279
+ id: formId,
280
280
  onSubmit: form.onSubmit((values) => {
281
281
  const result = onSubmit(values);
282
282
  let axiosPromise;
@@ -293,8 +293,9 @@ function MyButtonCreateUpdate({
293
293
  headers: {},
294
294
  config: {}
295
295
  });
296
+ } else {
297
+ axiosPromise = result;
296
298
  }
297
- axiosPromise = result;
298
299
  mutation.mutate(axiosPromise);
299
300
  }),
300
301
  children: [
@@ -307,7 +308,7 @@ function MyButtonCreateUpdate({
307
308
  })
308
309
  ),
309
310
  /* @__PURE__ */ jsx4(Space, {}),
310
- /* @__PURE__ */ jsx4(MyButton, { fullWidth: true, actionType: "save" })
311
+ /* @__PURE__ */ jsx4(MyButton, { form: formId, fullWidth: true, actionType: "save" })
311
312
  ]
312
313
  }
313
314
  )
@@ -41,8 +41,9 @@ interface CoreButtonCreateUpdateProps<IReq, IRes> {
41
41
  resetFormWhenSubmit?: boolean;
42
42
  disclosure?: ReturnType<typeof useDisclosure>;
43
43
  children?: ReactNode;
44
+ formId?: string;
44
45
  }
45
- declare function MyButtonCreateUpdate<IReq, IRes>({ modalProps, actionIconProps, buttonProps, form, onSubmit, onSuccess, onError, ignoreDefaultOnError, ignoreDefaultOnSuccess, closeModalWhenSubmit, resetFormWhenSubmit, children, disclosure: externalDisclosure, isUpdate, scrollAreaAutosizeProps }: CoreButtonCreateUpdateProps<IReq, IRes>): react_jsx_runtime.JSX.Element;
46
+ declare function MyButtonCreateUpdate<IReq, IRes>({ modalProps, actionIconProps, buttonProps, form, onSubmit, onSuccess, onError, ignoreDefaultOnError, ignoreDefaultOnSuccess, closeModalWhenSubmit, resetFormWhenSubmit, children, disclosure: externalDisclosure, isUpdate, scrollAreaAutosizeProps, formId }: CoreButtonCreateUpdateProps<IReq, IRes>): react_jsx_runtime.JSX.Element;
46
47
 
47
48
  interface IFieldStructure {
48
49
  fieldCode?: string;
@@ -18,7 +18,7 @@ import {
18
18
  MyStatsCard,
19
19
  MyTextInput,
20
20
  MyWeeklySessionSchedulerPicker
21
- } from "../chunk-IMBXTNPQ.mjs";
21
+ } from "../chunk-LI4VLIEK.mjs";
22
22
  import "../chunk-GFEMKKFH.mjs";
23
23
  import {
24
24
  MyModalDelete
@@ -16,7 +16,7 @@ import {
16
16
  MyButton as MyButton2,
17
17
  MyDataTableSelectOne,
18
18
  MyTextInput as MyTextInput2
19
- } from "../chunk-IMBXTNPQ.mjs";
19
+ } from "../chunk-LI4VLIEK.mjs";
20
20
  import {
21
21
  const_object_documentTypes
22
22
  } from "../chunk-GFEMKKFH.mjs";
package/package.json CHANGED
@@ -46,7 +46,7 @@
46
46
  "types": "./dist/coreService/index.d.mts"
47
47
  }
48
48
  },
49
- "version": "0.1.532",
49
+ "version": "0.1.534",
50
50
  "private": false,
51
51
  "files": [
52
52
  "dist"