Skip to content

Commit

Permalink
hard coding year 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Ward committed Aug 24, 2024
1 parent 0b7784c commit 31d0c4d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/components/AttendanceList.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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' }))
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/components/CheckinList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' }))
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/YearPicker.tsx
Original file line number Diff line number Diff line change
@@ -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<string>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/admin/MealEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>, valueName: string) => {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/admin/MealList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 31d0c4d

Please sign in to comment.