2 <tr class="connectors-table__row">
3 <td class="connectors-table__column">{{ connectorId }}</td>
4 <td class="connectors-table__column">{{ connector.status ?? 'Ø' }}</td>
5 <td class="connectors-table__column">
6 {{ connector.transactionStarted === true ? 'Yes' : 'No' }}
8 <td class="connectors-table__column">
9 {{ atgStatus?.start === true ? 'Yes' : 'No' }}
11 <td class="connectors-table__column">
13 :id="`${hashId}-${connectorId}-start-transaction`"
18 name: 'start-transaction',
19 params: { hashId, chargingStationId, connectorId }
25 $router.push({ name: 'charging-stations' })
36 <Button @click="stopTransaction()">Stop Transaction</Button>
37 <Button @click="startAutomaticTransactionGenerator()">Start ATG</Button>
38 <Button @click="stopAutomaticTransactionGenerator()">Stop ATG</Button>
43 <script setup lang="ts">
44 import { useToast } from 'vue-toast-notification'
46 import Button from '@/components/buttons/Button.vue'
47 import ToggleButton from '@/components/buttons/ToggleButton.vue'
48 import { useUIClient } from '@/composables'
49 import type { ConnectorStatus, Status } from '@/types'
51 const props = defineProps<{
53 chargingStationId: string
55 connector: ConnectorStatus
59 const $emit = defineEmits(['need-refresh'])
61 const uiClient = useUIClient()
63 const $toast = useToast()
65 const stopTransaction = (): void => {
67 .stopTransaction(props.hashId, props.connector.transactionId)
69 $toast.success('Transaction successfully stopped')
71 .catch((error: Error) => {
72 $toast.error('Error at stopping transaction')
73 console.error('Error at stopping transaction:', error)
76 const startAutomaticTransactionGenerator = (): void => {
78 .startAutomaticTransactionGenerator(props.hashId, props.connectorId)
80 $toast.success('Automatic transaction generator successfully started')
82 .catch((error: Error) => {
83 $toast.error('Error at starting automatic transaction generator')
84 console.error('Error at starting automatic transaction generator:', error)
87 const stopAutomaticTransactionGenerator = (): void => {
89 .stopAutomaticTransactionGenerator(props.hashId, props.connectorId)
91 $toast.success('Automatic transaction generator successfully stopped')
93 .catch((error: Error) => {
94 $toast.error('Error at stopping automatic transaction generator')
95 console.error('Error at stopping automatic transaction generator:', error)