Skip to content

Commit

Permalink
patch for selector
Browse files Browse the repository at this point in the history
  • Loading branch information
cweitat committed Aug 2, 2023
1 parent bb96d16 commit 0c18cb0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/TypeSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,22 @@ async function submitForm() {
if (typeSelectorStore.checkInStations.length < 1) {
// means station not created
await createStation(payload)
} else {
// set first station as selected
console.log(typeSelectorStore.checkInStations)
selectedStation.value.id = typeSelectorStore.checkInStations[0].id
selectedStation.value.name = typeSelectorStore.checkInStations[0].name
}
}
if (selectedType.value.id === 'checkout') {
if (typeSelectorStore.checkOutStations.length < 1) {
// means station not created
await createStation(payload)
} else {
// set first station as selected
selectedStation.value.id = typeSelectorStore.checkOutStations[0].id
selectedStation.value.name = typeSelectorStore.checkOutStations[0].name
}
}
router.push({
Expand Down

0 comments on commit 0c18cb0

Please sign in to comment.