aq-fe-framework 0.1.403 → 0.1.405
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.
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
MyFlexColumn,
|
|
4
4
|
MyFlexRow
|
|
5
5
|
} from "./chunk-GEYCGM75.mjs";
|
|
6
|
-
import {
|
|
7
|
-
const_object_colors
|
|
8
|
-
} from "./chunk-7ORPZMGL.mjs";
|
|
9
6
|
import {
|
|
10
7
|
enum_daysOfWeek
|
|
11
8
|
} from "./chunk-K6S7R6LU.mjs";
|
|
9
|
+
import {
|
|
10
|
+
const_object_colors
|
|
11
|
+
} from "./chunk-7ORPZMGL.mjs";
|
|
12
12
|
import {
|
|
13
13
|
useMyReactMutation,
|
|
14
14
|
useMyReactQuery
|
|
@@ -226,9 +226,10 @@ function MyButtonCreateUpdate({
|
|
|
226
226
|
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
|
227
227
|
const queryClient = useQueryClient();
|
|
228
228
|
const mutation = useMyReactMutation({
|
|
229
|
-
axiosFn:
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
axiosFn: (values) => {
|
|
230
|
+
const result = onSubmit(values);
|
|
231
|
+
if (result === void 0) {
|
|
232
|
+
return Promise.resolve({
|
|
232
233
|
data: {
|
|
233
234
|
message: "T\u1EA1o th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
|
|
234
235
|
data: {},
|
|
@@ -238,22 +239,9 @@ function MyButtonCreateUpdate({
|
|
|
238
239
|
statusText: "OK",
|
|
239
240
|
headers: {},
|
|
240
241
|
config: {}
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
if (onSubmit === false) {
|
|
244
|
-
return {
|
|
245
|
-
data: {
|
|
246
|
-
message: "T\u1EA1o th\u1EA5t b\u1EA1i (gi\u1EA3 l\u1EADp)",
|
|
247
|
-
data: {},
|
|
248
|
-
isSuccess: 1
|
|
249
|
-
},
|
|
250
|
-
status: 500,
|
|
251
|
-
statusText: "OK",
|
|
252
|
-
headers: {},
|
|
253
|
-
config: {}
|
|
254
|
-
};
|
|
242
|
+
});
|
|
255
243
|
}
|
|
256
|
-
return
|
|
244
|
+
return result;
|
|
257
245
|
},
|
|
258
246
|
options: {
|
|
259
247
|
onSuccess: (...args) => {
|
|
@@ -307,6 +295,8 @@ function MyButtonCreateUpdate({
|
|
|
307
295
|
"form",
|
|
308
296
|
{
|
|
309
297
|
onSubmit: form.onSubmit((values) => {
|
|
298
|
+
const result = onSubmit(values);
|
|
299
|
+
if (result === false) return;
|
|
310
300
|
mutation.mutate(values);
|
|
311
301
|
}),
|
|
312
302
|
children: [
|
package/dist/core/index.d.mts
CHANGED
|
@@ -28,7 +28,7 @@ interface CoreButtonCreateUpdateProps<IReq, IRes> {
|
|
|
28
28
|
buttonProps?: ButtonProps;
|
|
29
29
|
scrollAreaAutosizeProps?: ScrollAreaAutosizeProps;
|
|
30
30
|
isUpdate?: boolean;
|
|
31
|
-
onSubmit: (
|
|
31
|
+
onSubmit: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>> | false;
|
|
32
32
|
onSuccess?: (...args: any[]) => void;
|
|
33
33
|
onError?: (...args: any[]) => void;
|
|
34
34
|
ignoreDefaultOnSuccess?: boolean;
|
package/dist/core/index.mjs
CHANGED
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
MyStatsCard,
|
|
14
14
|
MyTextInput,
|
|
15
15
|
MyWeeklySessionSchedulerPicker
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-QHRT22YZ.mjs";
|
|
17
17
|
import "../chunk-GEYCGM75.mjs";
|
|
18
|
-
import "../chunk-7ORPZMGL.mjs";
|
|
19
18
|
import "../chunk-K6S7R6LU.mjs";
|
|
19
|
+
import "../chunk-7ORPZMGL.mjs";
|
|
20
20
|
import "../chunk-PRN7KYPD.mjs";
|
|
21
21
|
import "../chunk-7ZCOFATU.mjs";
|
|
22
22
|
import "../chunk-FWCSY2DS.mjs";
|
|
@@ -5,6 +5,12 @@ import {
|
|
|
5
5
|
utils_converter_enumToSelectOptions,
|
|
6
6
|
utils_file_fileToAQDocumentType
|
|
7
7
|
} from "../chunk-P3IR7UL7.mjs";
|
|
8
|
+
import {
|
|
9
|
+
baseColumns
|
|
10
|
+
} from "../chunk-2SBUKAGS.mjs";
|
|
11
|
+
import {
|
|
12
|
+
U0DateToDDMMYYYString
|
|
13
|
+
} from "../chunk-I2XIN2R3.mjs";
|
|
8
14
|
import {
|
|
9
15
|
F_authenticate_Logout,
|
|
10
16
|
MyActionIconDelete,
|
|
@@ -32,32 +38,26 @@ import {
|
|
|
32
38
|
createGenericStore
|
|
33
39
|
} from "../chunk-Y3YGC5IH.mjs";
|
|
34
40
|
import "../chunk-5U2JSHSJ.mjs";
|
|
35
|
-
import {
|
|
36
|
-
baseColumns
|
|
37
|
-
} from "../chunk-2SBUKAGS.mjs";
|
|
38
|
-
import {
|
|
39
|
-
U0DateToDDMMYYYString
|
|
40
|
-
} from "../chunk-I2XIN2R3.mjs";
|
|
41
|
-
import {
|
|
42
|
-
const_object_documentTypes
|
|
43
|
-
} from "../chunk-BZMQOGL6.mjs";
|
|
44
41
|
import {
|
|
45
42
|
MyButton as MyButton2,
|
|
46
43
|
MyDataTableSelectOne,
|
|
47
44
|
MyTextInput as MyTextInput2
|
|
48
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-QHRT22YZ.mjs";
|
|
49
46
|
import {
|
|
50
47
|
MyDataTable,
|
|
51
48
|
MyFlexColumn,
|
|
52
49
|
MyFlexRow
|
|
53
50
|
} from "../chunk-GEYCGM75.mjs";
|
|
54
|
-
import {
|
|
55
|
-
const_object_colors
|
|
56
|
-
} from "../chunk-7ORPZMGL.mjs";
|
|
57
51
|
import {
|
|
58
52
|
enum_emailConfigModule
|
|
59
53
|
} from "../chunk-VH4ZAD6M.mjs";
|
|
60
54
|
import "../chunk-K6S7R6LU.mjs";
|
|
55
|
+
import {
|
|
56
|
+
const_object_documentTypes
|
|
57
|
+
} from "../chunk-BZMQOGL6.mjs";
|
|
58
|
+
import {
|
|
59
|
+
const_object_colors
|
|
60
|
+
} from "../chunk-7ORPZMGL.mjs";
|
|
61
61
|
import {
|
|
62
62
|
baseAxios_default,
|
|
63
63
|
createBaseApi,
|
package/dist/utils/index.mjs
CHANGED
|
@@ -19,15 +19,15 @@ import {
|
|
|
19
19
|
utils_time_getCurrentTimeString,
|
|
20
20
|
utils_validator_validateCode
|
|
21
21
|
} from "../chunk-P3IR7UL7.mjs";
|
|
22
|
-
import {
|
|
23
|
-
utils_pdf_download
|
|
24
|
-
} from "../chunk-5U2JSHSJ.mjs";
|
|
25
22
|
import {
|
|
26
23
|
U0DateToDDMMYYYString,
|
|
27
24
|
utils_date_dateToDDMMYYYString,
|
|
28
25
|
utils_date_formatToDateTimeStartEnd,
|
|
29
26
|
utils_date_getHHmm
|
|
30
27
|
} from "../chunk-I2XIN2R3.mjs";
|
|
28
|
+
import {
|
|
29
|
+
utils_pdf_download
|
|
30
|
+
} from "../chunk-5U2JSHSJ.mjs";
|
|
31
31
|
import {
|
|
32
32
|
utils_notification_show
|
|
33
33
|
} from "../chunk-7ZCOFATU.mjs";
|