Merge branch 'fix/time-filtering' into 'master'
merge: fix/time-filtering into master See merge request gk1623/drp-48!20 Co-authored-by: Caspar Jojo Asaam <caspar@dyn3155-98.wlan.ic.ac.uk>
This commit is contained in:
@@ -37,11 +37,8 @@
|
|||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (!space) return;
|
if (!space) return;
|
||||||
const { opening_times, ...rest } = space;
|
Object.assign(studySpaceData, space);
|
||||||
Object.assign(studySpaceData, rest);
|
studySpaceData.opening_times = space.opening_times ?? [];
|
||||||
if (opening_times) {
|
|
||||||
studySpaceData.opening_times = opening_times;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let scrollPosition = $state(0);
|
let scrollPosition = $state(0);
|
||||||
@@ -137,7 +134,10 @@
|
|||||||
if (!spaceImgs || spaceImgs.length < 1) return alert("Please select an image file.");
|
if (!spaceImgs || spaceImgs.length < 1) return alert("Please select an image file.");
|
||||||
if (!studySpaceData.building_location) return alert("Please select a building location.");
|
if (!studySpaceData.building_location) return alert("Please select a building location.");
|
||||||
|
|
||||||
const { ...spacePayload } = studySpaceData;
|
const { opening_times, ...spacePayload } = studySpaceData;
|
||||||
|
|
||||||
|
// explicitly mark opening_times as used to avoid unused warning
|
||||||
|
void opening_times;
|
||||||
|
|
||||||
const { data: studySpaceInsert, error: studySpaceError } = await supabase
|
const { data: studySpaceInsert, error: studySpaceError } = await supabase
|
||||||
.from("study_spaces")
|
.from("study_spaces")
|
||||||
|
|||||||
Reference in New Issue
Block a user