Skip to content

Commit

Permalink
update selection page
Browse files Browse the repository at this point in the history
  • Loading branch information
birdpump committed Apr 5, 2024
1 parent 062408f commit 5763a5d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/app/Select.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
export let placeholder;
</script>
<Select {items} bind:value clearable={false} showChevron={true} placeholder={placeholder} --item-transition="0.3s ease" inputStyles="caret-color: transparent;" --background="#17171c" --border="2px solid #005cb3" --border-hover="2px solid #577db2" --list-background="#1a3c69" --item-color="#d6d6d6" --item-hover-bg="#0084ff"/>
<Select {items} bind:value clearable={false} showChevron={true} placeholder={placeholder} --item-transition="0.3s ease" inputStyles="caret-color: transparent;" --background="#17171c" --border="2px solid #005cb3" --border-hover="2px solid #577db2" --border-focused="2px solid #577db2" --list-background="#1a3c69" --item-color="#d6d6d6" --item-hover-bg="#0084ff"/>
2 changes: 1 addition & 1 deletion src/routes/(app)/register/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { writable } from 'svelte/store';
export const pageView = writable(0)

//stores locker location that was selected in the selection component
export const selectedLocation = writable([])
export const selectedLocation = writable({})

export const registrationData = writable({});
export const studentId1 = writable();
Expand Down
23 changes: 12 additions & 11 deletions src/routes/(app)/register/views/Selection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import {writable} from "svelte/store";
import {slide} from "svelte/transition";
import {quartOut} from "svelte/easing";
import {singleLocker, studentId1, studentId2, selectedLocation} from "../store.js";
import {singleLocker, studentId1, studentId2, selectedLocation, pageView} from "../store.js";
import Select from "$lib/components/app/Select.svelte";
Expand All @@ -15,23 +15,24 @@
let data2 = ['1', '2', '3'];
let data3 = ['Top', 'Single', 'Bottom'];
let value1 = null;
let value2 = null;
let value3 = null;
let value1;
let value2;
let value3;
function next() {
// console.log(value2)
//todo ge tform feilds
selectedLocation.set({
building: value1.label,
building: value2.label,
building: value3.label,
floor: value2.label,
position: value3.label,
})
checkIDs();
// pageView.set(3);
console.log($selectedLocation)
pageView.set(2);
}
Expand All @@ -51,17 +52,17 @@

<div class="input-group">
<div class="selection-label">Building</div>
<Select items={data1} placeholder="Select Building" bind:value1/>
<Select items={data1} placeholder="Select Building" bind:value={value1}/>
</div>

<div class="input-group">
<div class="selection-label">Floor</div>
<Select items={data2} placeholder="Select Floor" bind:value2/>
<Select items={data2} placeholder="Select Floor" bind:value={value2}/>
</div>

<div class="input-group">
<div class="selection-label">Position</div>
<Select items={data3} placeholder="Select Position" bind:value3/>
<Select items={data3} placeholder="Select Position" bind:value={value3}/>
</div>

</div>
Expand Down

0 comments on commit 5763a5d

Please sign in to comment.