From 31d0c4d0e6bbe92bdc4d8d33dbeeed9fe7ed40ba Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Sat, 24 Aug 2024 16:13:37 -0500 Subject: [PATCH] hard coding year 2025 --- src/components/AttendanceList.tsx | 5 +++-- src/components/CheckinList.tsx | 3 ++- src/components/YearPicker.tsx | 2 +- src/pages/admin/MealEdit.tsx | 5 +++-- src/pages/admin/MealList.tsx | 3 ++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/AttendanceList.tsx b/src/components/AttendanceList.tsx index b0efd3b..2bc476e 100644 --- a/src/components/AttendanceList.tsx +++ b/src/components/AttendanceList.tsx @@ -1,5 +1,5 @@ import { useNavigate } from '@solidjs/router' -import { Accessor, Component, createEffect, For, Show } from 'solid-js' +import { Accessor, Component, For, Show } from 'solid-js' import { checkAttendanceForEvent, insertAttendance, updateAttendance } from '../api/attendance' import { AttendanceTypes, AttendanceTypesType, MemberAttendance, SubTeam } from '../types/Api' import { capitalizeWord, formatUrl } from '../utilities/formatters' @@ -17,8 +17,9 @@ const AttendanceList: Component<{ type memberIdType = { memberId: number } const handleNavToMember = (data: memberIdType, event) => { event.preventDefault() + //TODO: hard coded to current year ??? if (props.clickToMember) { - navigate(formatUrl(RouteKeys.ATTENDANCE_MEMBER.nav, { mid: data.memberId }, { season: '2024' })) + navigate(formatUrl(RouteKeys.ATTENDANCE_MEMBER.nav, { mid: data.memberId }, { season: '2025' })) } } diff --git a/src/components/CheckinList.tsx b/src/components/CheckinList.tsx index 0488bb7..a73a312 100644 --- a/src/components/CheckinList.tsx +++ b/src/components/CheckinList.tsx @@ -22,7 +22,8 @@ const CheckinList: Component<{ const handleNavToMember = (data: memberIdType, event) => { event.preventDefault() if (props.clickToMember) { - navigate(formatUrl(RouteKeys.ATTENDANCE_MEMBER.nav, { mid: data.memberId }, { season: '2024' })) + //TODO: hard coded to current year ??? + navigate(formatUrl(RouteKeys.ATTENDANCE_MEMBER.nav, { mid: data.memberId }, { season: '2025' })) } } diff --git a/src/components/YearPicker.tsx b/src/components/YearPicker.tsx index 776ff00..85051d0 100644 --- a/src/components/YearPicker.tsx +++ b/src/components/YearPicker.tsx @@ -1,7 +1,7 @@ import { Accessor, Component, createSignal, For, Setter } from 'solid-js' // TODO: should get these from the db -const validYears = ['2023', '2024'] +const validYears = ['2023', '2024', '2025'] const YearPicker: Component<{ year: Accessor diff --git a/src/pages/admin/MealEdit.tsx b/src/pages/admin/MealEdit.tsx index 890379b..7a27142 100644 --- a/src/pages/admin/MealEdit.tsx +++ b/src/pages/admin/MealEdit.tsx @@ -48,8 +48,9 @@ const MealEdit: Component = () => { const [opened, setOpened] = createSignal(false) const [eventMeal] = createResource(() => parseInt(params.id), getMealByEventId) const [event] = createResource(() => parseInt(params.id), getEventById) - const [members] = createResource('2024', getMembers) - const [allParents] = createResource('2024', getAllParents) + //TODO: hard coded to current year ??? + const [members] = createResource('2025', getMembers) + const [allParents] = createResource('2025', getAllParents) const navigate = useNavigate() const createOptions = (data: Array, valueName: string) => { diff --git a/src/pages/admin/MealList.tsx b/src/pages/admin/MealList.tsx index a3d4cc1..651c33d 100644 --- a/src/pages/admin/MealList.tsx +++ b/src/pages/admin/MealList.tsx @@ -9,7 +9,8 @@ import { isEmpty } from '../../utilities/bitsAndBobs' import { formatEnumValue, formatUrl } from '../../utilities/formatters' const MealList: Component = () => { - const [year, setYear] = createSignal('2024') + //TODO: hard coded to current year ??? + const [year, setYear] = createSignal('2025') const [mealList, { refetch }] = createResource(year, getMealList) const { member } = useNoMythicUser()