@finema/core 1.4.45 → 1.4.47
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.
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -119,12 +119,12 @@ export const apiFetchHelper = async (state, onUpdateStatus, onUpdateOptions, onU
|
|
|
119
119
|
...opts.fetch?.getRequestOptions?.(page, query, opts) ?? {}
|
|
120
120
|
};
|
|
121
121
|
const limit = reqOptions.params?.limit || config.limit_per_page;
|
|
122
|
+
reqOptions.params = ParamHelper.getParams(opts, reqOptions);
|
|
122
123
|
reqOptions.params = {
|
|
123
124
|
limit,
|
|
124
125
|
page,
|
|
125
126
|
q: (query || "").trim()
|
|
126
127
|
};
|
|
127
|
-
reqOptions.params = ParamHelper.getParams(opts, reqOptions);
|
|
128
128
|
try {
|
|
129
129
|
if (opts.isMock) {
|
|
130
130
|
await new Promise((resolve) => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { addHours, format, formatISO, isDate, isValid, parse, subHours, addYears } from "date-fns";
|
|
2
2
|
import { useCoreConfig } from "#core/composables/useConfig";
|
|
3
|
-
import { th } from "date-fns/locale/index.js";
|
|
4
3
|
const dateFormat = useCoreConfig().date_format;
|
|
5
4
|
const dateTimeFormat = useCoreConfig().date_time_format;
|
|
6
5
|
const timeFormat = useCoreConfig().time_format;
|
|
@@ -14,7 +13,7 @@ export class TimeHelper {
|
|
|
14
13
|
newDateStr = addYears(dateStr, 543);
|
|
15
14
|
}
|
|
16
15
|
if (isThaiMonth) {
|
|
17
|
-
options.locale = th;
|
|
16
|
+
options.locale = import("date-fns/locale/th");
|
|
18
17
|
}
|
|
19
18
|
return format(newDateStr, formatStr, options);
|
|
20
19
|
};
|