fix: timing
This commit is contained in:
@@ -101,8 +101,8 @@
|
||||
return fullDayOfWeek.map((day) => ({
|
||||
study_space_id: studySpaceId,
|
||||
day_of_week: day,
|
||||
opens_at: allDays.open_today_status == null ? allDays.opens_at : "00:00",
|
||||
closes_at: allDays.open_today_status == null ? allDays.closes_at : "00:00",
|
||||
opens_at: allDays.open_today_status !== null ? allDays.opens_at : "00:00",
|
||||
closes_at: allDays.open_today_status !== null ? allDays.closes_at : "00:01",
|
||||
open_today_status: allDays.open_today_status
|
||||
}));
|
||||
}
|
||||
@@ -114,16 +114,16 @@
|
||||
.map((h) => ({
|
||||
study_space_id: studySpaceId,
|
||||
day_of_week: h.day_of_week,
|
||||
opens_at: h.opens_at,
|
||||
closes_at: h.closes_at,
|
||||
opens_at: h.open_today_status === null ? h.opens_at : "00:00",
|
||||
closes_at: h.open_today_status === null ? h.closes_at : "00:01",
|
||||
open_today_status: h.open_today_status
|
||||
}))
|
||||
.concat(
|
||||
nonDefinedDays.map((day) => ({
|
||||
study_space_id: studySpaceId,
|
||||
day_of_week: day,
|
||||
opens_at: allDays.opens_at,
|
||||
closes_at: allDays.closes_at,
|
||||
opens_at: allDays.open_today_status === null ? allDays.opens_at : "00:00",
|
||||
closes_at: allDays.open_today_status === null ? allDays.closes_at : "00:01",
|
||||
open_today_status: allDays.open_today_status
|
||||
}))
|
||||
);
|
||||
@@ -134,10 +134,8 @@
|
||||
if (!spaceImgs || spaceImgs.length < 1) return alert("Please select an image file.");
|
||||
if (!studySpaceData.building_location) return alert("Please select a building location.");
|
||||
|
||||
const { opening_times, ...spacePayload } = studySpaceData;
|
||||
|
||||
// explicitly mark opening_times as used to avoid unused warning
|
||||
void opening_times;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { opening_times: _, ...spacePayload } = studySpaceData;
|
||||
|
||||
const { data: studySpaceInsert, error: studySpaceError } = await supabase
|
||||
.from("study_spaces")
|
||||
|
||||
Reference in New Issue
Block a user