off?: () => void
}>()
+const $emit = defineEmits(['clicked'])
+
const id = props.shared === true ? `shared-toggle-button-${props.id}` : `toggle-button-${props.id}`
const state = ref({
} else {
props.off?.()
}
+ $emit('clicked', getFromLocalStorage<boolean>(id, props.status ?? false))
}
</script>
</td>
<td class="connectors-table__column">
<ToggleButton
- :id="`${hashId}-start-transaction`"
+ :id="`${hashId}-${connectorId}-start-transaction`"
:shared="true"
:on="
() => {
$router.push({ name: 'charging-stations' })
}
"
+ @clicked="
+ () => {
+ $emit('need-refresh')
+ }
+ "
>
Start Transaction
</ToggleButton>
atgStatus?: Status
}>()
+const $emit = defineEmits(['need-refresh'])
+
const uiClient = getCurrentInstance()?.appContext.config.globalProperties.$uiClient
const $toast = useToast()
$router.push({ name: 'charging-stations' })
}
"
+ @clicked="
+ () => {
+ $emit('need-refresh')
+ }
+ "
>
Set Supervision Url
</ToggleButton>
:connector-id="index + 1"
:connector="connector"
:atg-status="getATGStatus(index + 1)"
+ @need-refresh="$emit('need-refresh')"
/>
</tbody>
</table>
chargingStation: ChargingStationData
}>()
+const $emit = defineEmits(['need-refresh'])
+
const getConnectorStatuses = (): ConnectorStatus[] => {
if (Array.isArray(props.chargingStation.evses) && props.chargingStation.evses.length > 0) {
const connectorStatuses: ConnectorStatus[] = []
v-for="chargingStation in chargingStations"
:key="chargingStation.stationInfo.hashId"
:charging-station="chargingStation"
+ @need-refresh="$emit('need-refresh')"
/>
</tbody>
</table>
defineProps<{
chargingStations: ChargingStationData[]
}>()
+
+const $emit = defineEmits(['need-refresh'])
</script>
<style>
$router.push({ name: 'charging-stations' })
}
"
+ @clicked="
+ () => {
+ state.renderChargingStations = randomUUID()
+ }
+ "
>
Add Charging Stations
</ToggleButton>
"
:key="state.renderChargingStations"
:charging-stations="app?.appContext.config.globalProperties.$chargingStations"
+ @need-refresh="
+ () => {
+ state.renderAddChargingStations = randomUUID()
+ state.renderChargingStations = randomUUID()
+ }
+ "
/>
</Container>
</template>