mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 07:27:33 +08:00
modify style
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
import { ref, computed } from 'vue';
|
||||
|
||||
import { type WeekDayValue } from '@/core/datetime.ts';
|
||||
import { FiscalYearStart } from '@/core/fiscalyear.ts';
|
||||
import { arrangeArrayWithNewStartIndex } from '@/lib/common.ts';
|
||||
|
||||
import { useI18n } from '@/locales/helpers.ts';
|
||||
|
||||
import { useUserStore } from '@/stores/user.ts';
|
||||
|
||||
import { type WeekDayValue } from '@/core/datetime.ts';
|
||||
import { FiscalYearStart } from '@/core/fiscalyear.ts';
|
||||
import { arrangeArrayWithNewStartIndex } from '@/lib/common.ts';
|
||||
import {
|
||||
getLocalDatetimeFromUnixTime,
|
||||
getThisYearFirstUnixTime,
|
||||
getThisYearLastUnixTime
|
||||
} from '@/lib/datetime.ts';
|
||||
|
||||
export interface CommonFiscalYearStartSelectionProps {
|
||||
modelValue?: number;
|
||||
disabled?: boolean;
|
||||
@@ -79,6 +84,9 @@ export function useFiscalYearStartSelectionBase(props: CommonFiscalYearStartSele
|
||||
return formatMonthDayToLongDay(fiscalYearStart.toMonthDashDayString());
|
||||
});
|
||||
|
||||
const allowedMinDate = computed<Date>(() => getLocalDatetimeFromUnixTime(getThisYearFirstUnixTime()));
|
||||
const allowedMaxDate = computed<Date>(() => getLocalDatetimeFromUnixTime(getThisYearLastUnixTime()));
|
||||
|
||||
const firstDayOfWeek = computed<WeekDayValue>(() => userStore.currentUserFirstDayOfWeek);
|
||||
const dayNames = computed<string[]>(() => arrangeArrayWithNewStartIndex(getAllMinWeekdayNames(), firstDayOfWeek.value));
|
||||
|
||||
@@ -90,6 +98,8 @@ export function useFiscalYearStartSelectionBase(props: CommonFiscalYearStartSele
|
||||
// computed states
|
||||
selectedFiscalYearStartValue,
|
||||
displayFiscalYearStartDate,
|
||||
allowedMinDate,
|
||||
allowedMaxDate,
|
||||
firstDayOfWeek,
|
||||
dayNames
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user