เช็คเวลาต้องลงเวลาเข้าหรือออกงาน (USER)

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-15 18:08:42 +07:00
parent 3083ea8dcb
commit 07b02a7818
4 changed files with 128 additions and 22 deletions

View file

@ -1,5 +1,6 @@
import { defineStore } from 'pinia'
import CustomComponent from '@/components/CustomDialog.vue'
import { Loading, QSpinnerCube } from "quasar";
export const useCounterMixin = defineStore('mixin', () => {
function date2Thai(srcDate: Date, isFullMonth = false, isTime = false) {
@ -70,6 +71,19 @@ export const useCounterMixin = defineStore('mixin', () => {
)
}
const showLoader = () => {
Loading.show({
spinner: QSpinnerCube,
spinnerSize: 140,
spinnerColor: "primary",
backgroundColor: "white",
});
};
const hideLoader = () => {
Loading.hide();
};
function covertDateObject(date: string) {
if (date) {
const dateParts = date.split('/')
@ -116,6 +130,8 @@ export const useCounterMixin = defineStore('mixin', () => {
return {
date2Thai,
showLoader,
hideLoader,
covertDateObject,
dialogConfirm,
}