BroadcastChannelResponsePayload,
MessageEvent,
} from '../types/WorkerBroadcastChannel';
-import { ResponseStatus } from '../ui/web/src/type/UIProtocol';
+import { ResponseStatus } from '../ui/web/src/types/UIProtocol';
import logger from '../utils/Logger';
import type ChargingStation from './ChargingStation';
import WorkerBroadcastChannel from './WorkerBroadcastChannel';
-import type { BaseConfig } from '@/type/ConfigurationType';
+import type { BaseConfig } from '@/types/ConfigurationType';
const config: BaseConfig = {
emobility: {
import Button from '../buttons/Button.vue';
// import { reactive } from 'vue';
-import UIClient from '@/composable/UIClient';
-import type { ConnectorStatus } from '@/type/ChargingStationType';
-// import Utils from '@/composable/Utils';
+import UIClient from '@/composables/UIClient';
+import type { ConnectorStatus } from '@/types/ChargingStationType';
+// import Utils from '@/composables/Utils';
const props = defineProps<{
hashId: string;
// }
function startChargingStation(): void {
- UIClient.instance.startChargingStation(props.hashId);
+ UIClient.getInstance().startChargingStation(props.hashId);
}
function stopChargingStation(): void {
- UIClient.instance.stopChargingStation(props.hashId);
+ UIClient.getInstance().stopChargingStation(props.hashId);
}
function openConnection(): void {
- UIClient.instance.openConnection(props.hashId);
+ UIClient.getInstance().openConnection(props.hashId);
}
function closeConnection(): void {
- UIClient.instance.closeConnection(props.hashId);
+ UIClient.getInstance().closeConnection(props.hashId);
}
function startTransaction(): void {
- UIClient.instance.startTransaction(props.hashId, props.connectorId, props.idTag);
+ UIClient.getInstance().startTransaction(props.hashId, props.connectorId, props.idTag);
}
function stopTransaction(): void {
- UIClient.instance.stopTransaction(props.hashId, props.transactionId);
+ UIClient.getInstance().stopTransaction(props.hashId, props.transactionId);
}
</script>
import CSConnector from './CSConnector.vue';
// import { reactive } from 'vue';
-import Utils from '@/composable/Utils';
+import Utils from '@/composables/Utils';
import type {
ChargingStationData,
ChargingStationInfo,
ConnectorStatus,
-} from '@/type/ChargingStationType';
+} from '@/types/ChargingStationType';
const props = defineProps<{
chargingStation: ChargingStationData;
<script setup lang="ts">
import Modal from '@/components/Modal.vue';
-import type { ChargingStationInfo } from '@/type/ChargingStationType';
+import type { ChargingStationInfo } from '@/types/ChargingStationType';
const props = defineProps<{
isVisible: boolean;
<script setup lang="ts">
import CSData from './CSData.vue';
-import type { ChargingStationData } from '@/type/ChargingStationType';
+import type { ChargingStationData } from '@/types/ChargingStationType';
const props = defineProps<{
chargingStations: Record<string, ChargingStationData>;
-import type { JsonType } from '@/type/JsonType';
-import { ProcedureName, ResponseStatus } from '@/type/UIProtocol';
-import type { ProtocolResponse, ResponsePayload } from '@/type/UIProtocol';
+import type { JsonType } from '@/types/JsonType';
+import { ProcedureName, ResponseStatus } from '@/types/UIProtocol';
+import type { ProtocolResponse, ResponsePayload } from '@/types/UIProtocol';
import Utils from './Utils';
import config from '@/assets/config';
this._responseHandlers = new Map<string, ResponseHandler>();
}
- public static get instance() {
+ public static getInstance() {
if (UIClient._instance === null) {
UIClient._instance = new UIClient();
}
import CSTable from '@/components/charging-stations/CSTable.vue';
import { onMounted, reactive } from 'vue';
-import UIClient from '@/composable/UIClient';
-import type { ChargingStationData } from '@/type/ChargingStationType';
+import UIClient from '@/composables/UIClient';
+import type { ChargingStationData } from '@/types/ChargingStationType';
-const UIClientInstance = UIClient.instance;
+const UIClientInstance = UIClient.getInstance();
onMounted(() => {
UIClientInstance.registerWSonOpenListener(load);
import { expect } from 'chai';
import { shallowMount } from '@vue/test-utils';
import CSTable from '@/components/charging-stations/CSTable.vue';
-import type { ChargingStationData } from '@/type/ChargingStationType';
+import type { ChargingStationData } from '@/types/ChargingStationType';
describe('CSTable.vue', () => {
it('renders CS table columns name', () => {