Skip to content

Commit

Permalink
cleanup Selection.svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
birdpump committed May 22, 2024
1 parent e9b0020 commit 2e614e5
Showing 1 changed file with 3 additions and 30 deletions.
33 changes: 3 additions & 30 deletions src/routes/(app)/register/views/Selection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,9 @@
let value2;
let value3;
let lab1;
let lab2;
let lab3;
// $: if(!load1 && !load2 && !load3){
// console.log("loading")
// console.log($editMode);
// if ($editMode) {
// console.log(value1);
// value1.label = selectedLocation.building;
// value2.label = selectedLocation.floor;
// value3.label = selectedLocation.level;
// }
// }
async function fetchData() {
areas = await fetchAvailableLockers();
// Update data1 based on fetched areas
data1 = Object.keys(areas);
// console.log($editMode);
// if ($editMode) {
// console.log($selectedLocation)
// value1.value = $selectedLocation.building.toString();
// value2.value = $selectedLocation.floor.toString();
// value3.value = $selectedLocation.level.toString();
// }
}
async function next() {
Expand All @@ -93,10 +67,6 @@
}
onMount(async () => {
await fetchData();
});
// Watch for changes in value1 and update data2 accordingly
$: {
if (value1 && areas[value1.value]) {
Expand All @@ -122,6 +92,9 @@
if (number === 2) value3 = null;
}
onMount(async () => {
await fetchData();
});
</script>

<style>
Expand Down

0 comments on commit 2e614e5

Please sign in to comment.