fix:add function calculateFiscalYear

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-02 13:13:53 +07:00
parent 4cc8fb0c1c
commit c966e1d961
3 changed files with 14 additions and 2 deletions

View file

@ -2,13 +2,14 @@ import { defineStore } from 'pinia'
import { ref } from 'vue'
import type { FormData, Datalist } from '@/interface/response/checkin'
import { useCounterMixin } from '@/stores/mixin'
import { calculateFiscalYear } from '@/utils/function'
const mixin = useCounterMixin()
const { date2Thai } = mixin
/** store for checkin history*/
export const useChekIn = defineStore('checkin', () => {
const year = ref<number>(new Date().getFullYear())
const year = ref<number>(calculateFiscalYear(new Date())) //ปีงบประมาณ
const rows = ref<Datalist[]>([])
const tab = ref<string>('history')