From b683803a5918f07a781b39b9cd5892848babc020 Mon Sep 17 00:00:00 2001 From: Topvennie Date: Fri, 23 Aug 2024 00:56:21 +0200 Subject: [PATCH] vinvoor: highlight mondays --- vingo/handlers/days.go | 4 ++-- vinvoor/src/settings/admin/days/DaysAdd.tsx | 4 ++-- vinvoor/src/settings/admin/days/DaysTableBody.tsx | 10 +++++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/vingo/handlers/days.go b/vingo/handlers/days.go index 2b0eba8..d0b8a8b 100644 --- a/vingo/handlers/days.go +++ b/vingo/handlers/days.go @@ -10,8 +10,8 @@ import ( type Days struct{} type DaysBody struct { - StartDate time.Time `json:"startDate"` - EndDate time.Time `json:"endDate"` + StartDate time.Time `json:"start_date"` + EndDate time.Time `json:"end_date"` } func (Days) CreateMultiple(c *fiber.Ctx) error { diff --git a/vinvoor/src/settings/admin/days/DaysAdd.tsx b/vinvoor/src/settings/admin/days/DaysAdd.tsx index 4ebeda1..32e97b2 100644 --- a/vinvoor/src/settings/admin/days/DaysAdd.tsx +++ b/vinvoor/src/settings/admin/days/DaysAdd.tsx @@ -31,8 +31,8 @@ export const DaysAdd: FC = ({ reloadDays }) => { } postApi("admin/days", { - startDate: startDate.toISOString(), - endDate: endDate.toISOString(), + start_date: startDate.format("YYYY-MM-DDTHH:mm:ssZ"), + end_date: endDate.format("YYYY-MM-DDTHH:mm:ssZ"), }) .then(() => { enqueueSnackbar("successfully saved days", { diff --git a/vinvoor/src/settings/admin/days/DaysTableBody.tsx b/vinvoor/src/settings/admin/days/DaysTableBody.tsx index d8f807d..0a70b98 100644 --- a/vinvoor/src/settings/admin/days/DaysTableBody.tsx +++ b/vinvoor/src/settings/admin/days/DaysTableBody.tsx @@ -49,7 +49,15 @@ export const DaysTableBody: FC = ({ return ( {rows.map(day => ( - + theme.palette.action.hover, + }), + }} + > handleSelect(day.id)}>