mirror of
https://github.com/whekin/household-bot.git
synced 2026-04-01 01:24:03 +00:00
fix(finance): prefer open cycle in dashboard
This commit is contained in:
@@ -58,7 +58,7 @@ async function getCycleByPeriodOrLatest(
|
||||
return repository.getCycleByPeriod(BillingPeriod.fromString(periodArg).toString())
|
||||
}
|
||||
|
||||
return repository.getLatestCycle()
|
||||
return (await repository.getOpenCycle()) ?? repository.getLatestCycle()
|
||||
}
|
||||
|
||||
function billingPeriodLockDate(period: BillingPeriod, day: number): Temporal.PlainDate {
|
||||
|
||||
Reference in New Issue
Block a user