aq-fe-framework 0.1.144 → 0.1.145
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.
@@ -22,6 +22,13 @@ function utils_converter_enumToSelectOptions(enumObject) {
|
|
22
22
|
return result;
|
23
23
|
}
|
24
24
|
|
25
|
+
// src/utils/utils_currency.ts
|
26
|
+
function utils_currency_formatWithSuffix(amount, includeCurrency = true, suffix = "") {
|
27
|
+
const formatter = new Intl.NumberFormat("vi-VN");
|
28
|
+
const formattedAmount = formatter.format(amount);
|
29
|
+
return includeCurrency ? `${formattedAmount} ${suffix}` : `${formattedAmount}${suffix}`;
|
30
|
+
}
|
31
|
+
|
25
32
|
// src/utils/utils_date.ts
|
26
33
|
function U0DateToDDMMYYYString(date) {
|
27
34
|
if (!(date instanceof Date) || isNaN(date.getTime())) return "";
|
@@ -211,6 +218,7 @@ export {
|
|
211
218
|
utils_converter_getLabelByValue,
|
212
219
|
utils_converter_getKeyByValue,
|
213
220
|
utils_converter_enumToSelectOptions,
|
221
|
+
utils_currency_formatWithSuffix,
|
214
222
|
utils_excel_exportExcel,
|
215
223
|
utils_excel_download,
|
216
224
|
utils_time_convertTimeStringToSeconds,
|
package/dist/utils/index.d.mts
CHANGED
@@ -14,6 +14,8 @@ declare function utils_converter_enumToSelectOptions<T extends Record<string, st
|
|
14
14
|
label: string;
|
15
15
|
}>;
|
16
16
|
|
17
|
+
declare function utils_currency_formatWithSuffix(amount: number, includeCurrency?: boolean, suffix?: string): string;
|
18
|
+
|
17
19
|
declare function U0DateToDDMMYYYString(date: Date): string;
|
18
20
|
declare function utils_date_dateToDDMMYYYString(date: Date): string;
|
19
21
|
declare function utils_date_formatToDateTimeStartEnd(startDate: Date, endDate: Date): string;
|
@@ -33,4 +35,4 @@ declare const utils_time_getCurrentTimeString: () => string;
|
|
33
35
|
declare function U0MyValidateEmpty(message?: string): (value: unknown) => React.ReactNode;
|
34
36
|
declare function U0MyValidateEmail(value?: string): "Email không đúng định dạng" | null;
|
35
37
|
|
36
|
-
export { U0DateToDDMMYYYString, U0MyValidateEmail, U0MyValidateEmpty, utils_converter_enumToSelectOptions, utils_converter_getKeyByValue, utils_converter_getLabelByValue, utils_date_dateToDDMMYYYString, utils_date_formatToDateTimeStartEnd, utils_notification_show, utils_pdf_download, utils_time_convertTimeStringToSeconds, utils_time_getCurrentTimeString };
|
38
|
+
export { U0DateToDDMMYYYString, U0MyValidateEmail, U0MyValidateEmpty, utils_converter_enumToSelectOptions, utils_converter_getKeyByValue, utils_converter_getLabelByValue, utils_currency_formatWithSuffix, utils_date_dateToDDMMYYYString, utils_date_formatToDateTimeStartEnd, utils_notification_show, utils_pdf_download, utils_time_convertTimeStringToSeconds, utils_time_getCurrentTimeString };
|
package/dist/utils/index.mjs
CHANGED
@@ -5,6 +5,7 @@ import {
|
|
5
5
|
utils_converter_enumToSelectOptions,
|
6
6
|
utils_converter_getKeyByValue,
|
7
7
|
utils_converter_getLabelByValue,
|
8
|
+
utils_currency_formatWithSuffix,
|
8
9
|
utils_date_dateToDDMMYYYString,
|
9
10
|
utils_date_formatToDateTimeStartEnd,
|
10
11
|
utils_excel_download,
|
@@ -13,7 +14,7 @@ import {
|
|
13
14
|
utils_file_fileToAQDocumentType,
|
14
15
|
utils_time_convertTimeStringToSeconds,
|
15
16
|
utils_time_getCurrentTimeString
|
16
|
-
} from "../chunk-
|
17
|
+
} from "../chunk-RHR4AQ6N.mjs";
|
17
18
|
import {
|
18
19
|
utils_pdf_download
|
19
20
|
} from "../chunk-5U2JSHSJ.mjs";
|
@@ -28,6 +29,7 @@ export {
|
|
28
29
|
utils_converter_enumToSelectOptions,
|
29
30
|
utils_converter_getKeyByValue,
|
30
31
|
utils_converter_getLabelByValue,
|
32
|
+
utils_currency_formatWithSuffix,
|
31
33
|
utils_date_dateToDDMMYYYString,
|
32
34
|
utils_date_formatToDateTimeStartEnd,
|
33
35
|
utils_excel_download,
|