Skip to content

Commit

Permalink
Fix function setChargeMode
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett-S-OWB committed Oct 10, 2024
1 parent f46c461 commit f8b2c3e
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
color="red"
size="sm"
:model-value="selectedButton === 'Sofort'"
@click="setSelected('instant_charging')"
@click="setChargeMode(item.id, 'instant_charging')"
/>
<q-btn
flat
Expand Down Expand Up @@ -123,6 +123,8 @@ interface CarouselItem {
power: number;
}
const selectedButton = ref<string>('Stop');
// Computed property for carousel items
const carouselItems = computed<CarouselItem[]>(() => {
const chargePoints = mqttStore.getChargePointDetails;
Expand Down Expand Up @@ -159,13 +161,6 @@ const setChargeMode = (chargePointId: string, mode: string) => {
}
};
// Declare selectedButton as a reactive reference with a type string
const selectedButton = ref<string>('Stop');
const setSelected = (button: string) => {
selectedButton.value = button;
};
// Watch for changes in carouselItems and set initial slide when data becomes available
watch(
carouselItems,
Expand Down

0 comments on commit f8b2c3e

Please sign in to comment.