+++ /dev/null
-<template>
- <teleport to="body">
- <div v-if="props.visibility" id="backdrop" @click.self="close()">
- <slot></slot>
- </div>
- </teleport>
-</template>
-
-<script setup lang="ts">
-const props = defineProps<{
- visibility: boolean
-}>()
-
-const emit = defineEmits(['close'])
-
-function close() {
- emit('close')
-}
-</script>
-
-<style>
-#backdrop {
- position: fixed;
- display: flex;
- justify-content: center;
- align-items: center;
- inset: 0;
- background-color: black;
-}
-</style>
</td>
<td class="connectors-table__column">
<Button @click="startTransaction()">Start Transaction</Button>
- <!-- <IdTagInputModal
- :visibility="state.isIdTagModalVisible"
- :id-tag="state.idTag"
- @close="hideIdTagModal()"
- @done="compose(state.transaction, hideIdTagModal)()"
- >
- Start Transaction
- </IdTagInputModal> -->
<Button @click="stopTransaction()">Stop Transaction</Button>
<Button @click="startAutomaticTransactionGenerator()">Start ATG</Button>
<Button @click="stopAutomaticTransactionGenerator()">Stop ATG</Button>
<script setup lang="ts">
import { getCurrentInstance } from 'vue'
-// import { reactive } from 'vue'
-// import IdTagInputModal from '@/components/charging-stations/IdTagInputModal.vue'
import Button from '@/components/buttons/Button.vue'
import type { ConnectorStatus, Status } from '@/types'
-// import { compose } from '@/composables'
const props = defineProps<{
hashId: string
idTag?: string
}>()
-// type State = {
-// isIdTagModalVisible: boolean
-// idTag: string
-// transaction: () => void
-// }
-
-// const state: State = reactive({
-// isIdTagModalVisible: false,
-// idTag: '',
-// transaction: startTransaction
-// })
-
-// function getIdTag(transaction: () => void): void {
-// state.transaction = transaction
-// showTagModal()
-// }
-
-// function showTagModal(): void {
-// state.isIdTagModalVisible = true
-// }
-// function hideIdTagModal(): void {
-// state.isIdTagModalVisible = false
-// }
-
const UIClient = getCurrentInstance()?.appContext.config.globalProperties.$UIClient
function startTransaction(): void {
</template>
<script setup lang="ts">
-// import { reactive } from 'vue'
import { getCurrentInstance } from 'vue'
import CSConnector from '@/components/charging-stations/CSConnector.vue'
import type { ChargingStationData, ChargingStationInfo, ConnectorStatus, Status } from '@/types'
idTag: string
}>()
-// type State = {
-// isTagModalVisible: boolean
-// idTag: string
-// }
-
-// const state: State = reactive({
-// isTagModalVisible: false,
-// idTag: ''
-// })
-
function getStarted(): string {
return props.chargingStation.started === true ? 'Yes' : 'No'
}
function deleteChargingStation(): void {
UIClient.deleteChargingStation(getHashId())
}
-// function showTagModal(): void {
-// state.isTagModalVisible = true
-// }
-// function hideTagModal(): void {
-// state.isTagModalVisible = false
-// }
</script>
<style>
+++ /dev/null
-<template>
- <Modal :visibility="props.isVisible">
- <div>vendor: {{ props.stationInfo.chargePointVendor }}</div>
- </Modal>
-</template>
-
-<script setup lang="ts">
-import type { ChargingStationInfo } from '@/types'
-import Modal from '@/components/Modal.vue'
-
-const props = defineProps<{
- stationInfo: ChargingStationInfo
- isVisible: boolean
-}>()
-</script>
+++ /dev/null
-<template>
- <Modal :visibility="props.visibility">
- <label for="idTag">IdTag</label>
- <!-- eslint-disable-next-line vue/no-mutating-props -->
- <input v-model="props.idTag" type="text" name="idTag" @keypress.enter="done()" />
- <Button @click="done()">
- <slot></slot>
- </Button>
- </Modal>
-</template>
-
-<script setup lang="ts">
-import Button from '@/components/buttons/Button.vue'
-import Modal from '@/components/Modal.vue'
-
-const props = defineProps<{
- visibility: boolean
- idTag: string
-}>()
-
-const emit = defineEmits(['done'])
-
-function done() {
- emit('done')
-}
-</script>
+++ /dev/null
-export const compose = <T>(...fns: ((arg: T) => T)[]): ((x: T) => T) => {
- return (x: T) => fns.reduceRight((y, fn) => fn(y), x)
-}
export { UIClient } from './UIClient'
-export { compose } from './Utils'
#inputs-container {
display: flex;
- justify-content: space-between;
+ flex-direction: row;
}
#reload-button {