uses the periods that are actually used.

This commit is contained in:
2024-12-12 09:49:52 -08:00
parent ef7c127cd5
commit b7826ad6ce
3 changed files with 54 additions and 3 deletions

View File

@@ -52,9 +52,15 @@
:content [:div.flex.flex.gap-2
(inputs/calendar-input- {:placeholder "12/21/2020" :x-model "source_date"})
[:div.flex.flex-col.gap-2
(buttons/a-button- {"@click" "periods=getFourWeekPeriodsPeriods(source_date)"} "13 periods")
(buttons/a-button- {"@click" "periods=[calendarYearPeriod(source_date)]"} "Calendar year")
(buttons/a-button- {"@click" "periods=getFourWeekPeriodsPeriods(source_date)"} [:span "13 periods, ending "
[:span {:x-text "source_date"}]])
(buttons/a-button- {"@click" "periods=[calendarYearPeriod(source_date)]"} [:span "Calendar year ("
[:span {:x-text "parseMMDDYYYY(source_date).getFullYear()"}]
")"])
[:hr {:class "h-px my-1 bg-gray-200 border-0 dark:bg-gray-700"} ]
(buttons/a-button- {"@click" "periods=getLastMonthPeriods()"} "Last Month")
(buttons/a-button- {"@click" "periods=getMonthToDatePeriods()"} "Month to date")
(buttons/a-button- {"@click" "periods=getYearToDatePeriods()"} "Year to date")
(buttons/a-button- {"@click" "periods=[]"} "Clear")]]}
{:name "Advanced"
:content [:div.flex.gap-4 {:class "overflow-hidden max-h-[300px]"