mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 15:07:33 +08:00
support setting the last 1 to 3 days of the month to scheduled transaction frequency
This commit is contained in:
@@ -15,30 +15,18 @@ export interface CommonScheduleFrequencySelectionProps {
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export interface AvailableMonthDay {
|
||||
day: number;
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
export function useScheduleFrequencySelectionBase() {
|
||||
const { getAllWeekDays, getAllTransactionScheduledFrequencyTypes, getMonthdayShortName } = useI18n();
|
||||
const {
|
||||
getAllWeekDays,
|
||||
getAvailableMonthDays,
|
||||
getAllTransactionScheduledFrequencyTypes
|
||||
} = useI18n();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const allTransactionScheduledFrequencyTypes = computed<TypeAndDisplayName[]>(() => getAllTransactionScheduledFrequencyTypes());
|
||||
const allWeekDays = computed<TypeAndDisplayName[]>(() => getAllWeekDays(userStore.currentUserFirstDayOfWeek));
|
||||
|
||||
const allAvailableMonthDays = computed<AvailableMonthDay[]>(() => {
|
||||
const allAvailableDays = [];
|
||||
|
||||
for (let i = 1; i <= 28; i++) {
|
||||
allAvailableDays.push({
|
||||
day: i,
|
||||
displayName: getMonthdayShortName(i),
|
||||
});
|
||||
}
|
||||
|
||||
return allAvailableDays;
|
||||
});
|
||||
const allAvailableMonthDays = computed<TypeAndDisplayName[]>(() => getAvailableMonthDays(28, 3));
|
||||
|
||||
function getFrequencyValues(value: string): number[] {
|
||||
const values = value.split(',');
|
||||
|
||||
Reference in New Issue
Block a user