support setting the last 1 to 3 days of the month to scheduled transaction frequency

This commit is contained in:
MaysWind
2026-04-13 00:06:45 +08:00
parent 0222f61da6
commit d7151bc7ab
26 changed files with 148 additions and 32 deletions
@@ -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(',');