</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>
</template>
<script setup lang="ts">
-import { getCurrentInstance } from 'vue'
import { useToast } from 'vue-toast-notification'
+
import Button from '@/components/buttons/Button.vue'
-import type { ConnectorStatus, Status } from '@/types'
import ToggleButton from '@/components/buttons/ToggleButton.vue'
+import { useUIClient } from '@/composables'
+import type { ConnectorStatus, Status } from '@/types'
const props = defineProps<{
hashId: string
atgStatus?: Status
}>()
-const uiClient = getCurrentInstance()?.appContext.config.globalProperties.$uiClient
+const $emit = defineEmits(['need-refresh'])
+
+const uiClient = useUIClient()
const $toast = useToast()