feat: build UI

This commit is contained in:
Viet An
2026-04-09 17:20:47 +07:00
parent bcfda00993
commit 631527225e
36 changed files with 11305 additions and 1123 deletions

View File

@@ -5,11 +5,12 @@ import dayjs from 'dayjs';
import weekday from 'dayjs/plugin/weekday';
import weekOfYear from 'dayjs/plugin/weekOfYear';
import relativeTime from 'dayjs/plugin/relativeTime';
import localizedFormat from 'dayjs/plugin/localizedFormat'
import 'dayjs/locale/vi';
dayjs.extend(weekday);
dayjs.extend(weekOfYear);
dayjs.extend(relativeTime);
dayjs.extend(localizedFormat);
dayjs.locale('vi');
export default defineNuxtPlugin(() => {
@@ -608,6 +609,12 @@ export default defineNuxtPlugin(() => {
return `https://img.vietqr.io/image/${bankInfo.bank.code}-${bankInfo.account.number}-print.png?${params.toString()}`;
};
function shortenCurrency(amount) {
return new Intl.NumberFormat('en', { notation: 'compact' }).format(
Number(amount),
);
}
return {
provide: {
dialog,
@@ -636,6 +643,7 @@ export default defineNuxtPlugin(() => {
formatDateVN,
getFirstAndLastName,
paymentQR,
shortenCurrency
},
};
});