repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor(ui): use watchers to refresh display
[e-mobility-charging-stations-simulator.git]
/
ui
/
web
/
src
/
components
/
actions
/
SetSupervisionUrl.vue
diff --git
a/ui/web/src/components/actions/SetSupervisionUrl.vue
b/ui/web/src/components/actions/SetSupervisionUrl.vue
index 06f7be294d4a776796992fb5ffb6237cc3d4c44b..887b1d4ce42bee2b0a0dd86e910fc4c455081c76 100644
(file)
--- a/
ui/web/src/components/actions/SetSupervisionUrl.vue
+++ b/
ui/web/src/components/actions/SetSupervisionUrl.vue
@@
-1,6
+1,6
@@
<template>
<template>
- <h
2>Action Set Supervision Url</h2
>
- <h
3>Charging Station {{ chargingStationId }}</h3
>
+ <h
1 id="action">Set Supervision Url</h1
>
+ <h
2>{{ chargingStationId }}</h2
>
<p>Supervision Url:</p>
<input
id="supervision-url"
<p>Supervision Url:</p>
<input
id="supervision-url"
@@
-11,10
+11,11
@@
/>
<br />
<Button
/>
<br />
<Button
+ id="action-button"
@click="
() => {
@click="
() => {
- uiClient
- .setSupervisionUrl(
props.
hashId, state.supervisionUrl)
+
$
uiClient
+ .setSupervisionUrl(hashId, state.supervisionUrl)
.then(() => {
$toast.success('Supervision url successfully set')
})
.then(() => {
$toast.success('Supervision url successfully set')
})
@@
-27,25
+28,23
@@
})
}
"
})
}
"
- >Set Supervision Url</Button
>
>
- <Button @click="$router.push({ name: 'charging-stations' })">Cancel</Button>
+ Set Supervision Url
+ </Button>
</template>
<script setup lang="ts">
</template>
<script setup lang="ts">
-import {
getCurrentInstance, reactive
} from 'vue'
+import {
ref
} from 'vue'
import Button from '@/components/buttons/Button.vue'
import Button from '@/components/buttons/Button.vue'
-
const props =
defineProps<{
+defineProps<{
hashId: string
chargingStationId: string
}>()
hashId: string
chargingStationId: string
}>()
-const state = re
active
({
+const state = re
f<{ supervisionUrl: string }>
({
supervisionUrl: ''
})
supervisionUrl: ''
})
-
-const uiClient = getCurrentInstance()?.appContext.config.globalProperties.$uiClient
</script>
<style>
</script>
<style>