-// function getIdTag(transaction: () => void): void {
-// state.transaction = transaction;
-// showTagModal();
-// }
-
-// function showTagModal(): void {
-// state.isIdTagModalVisible = true;
-// }
-// function hideIdTagModal(): void {
-// state.isIdTagModalVisible = false;
-// }
-
-function startChargingStation(): void {
- UIClient.getInstance().startChargingStation(props.hashId);
-}
-function stopChargingStation(): void {
- UIClient.getInstance().stopChargingStation(props.hashId);
-}
-function openConnection(): void {
- UIClient.getInstance().openConnection(props.hashId);
-}
-function closeConnection(): void {
- UIClient.getInstance().closeConnection(props.hashId);
-}
-function startTransaction(): void {
- UIClient.getInstance().startTransaction(props.hashId, props.connectorId, props.idTag);
-}
-function stopTransaction(): void {
- UIClient.getInstance().stopTransaction(props.hashId, props.transactionId);
+const stopTransaction = (): void => {
+ uiClient
+ .stopTransaction(props.hashId, props.connector.transactionId)
+ .then(() => {
+ $toast.success('Transaction successfully stopped')
+ })
+ .catch((error: Error) => {
+ $toast.error('Error at stopping transaction')
+ console.error('Error at stopping transaction:', error)
+ })