From: Jérôme Benoit
Date: Fri, 3 Apr 2026 21:43:43 +0000 (+0200)
Subject: fix(ui): enable authorize for all OCPP versions in StartTransaction
X-Git-Tag: ocpp-server@v4.3.0~5
X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=92059c8a0f87183ad4f3084db67dbc1c126ff913;p=e-mobility-charging-stations-simulator.git
fix(ui): enable authorize for all OCPP versions in StartTransaction
The OCPP 2.0.x authorize restriction was a UI-only limitation — the
simulator stack already handles Authorize for both 1.6 and 2.0.x.
Remove the isOCPP20x guard so the checkbox is available for all versions.
---
diff --git a/ui/web/src/components/actions/StartTransaction.vue b/ui/web/src/components/actions/StartTransaction.vue
index 896641ff..62a7d8f7 100644
--- a/ui/web/src/components/actions/StartTransaction.vue
+++ b/ui/web/src/components/actions/StartTransaction.vue
@@ -20,7 +20,7 @@
type="text"
>
-
+
Authorize RFID tag:
$route.query.evseId != null ? Number($route.query.evseId) : undefined
)
const ocppVersion = computed(() => $route.query.ocppVersion as OCPPVersion | undefined)
-const isOCPP20x = computed(() => UIClient.isOCPP20x(ocppVersion.value))
const state = ref<{ authorizeIdTag: boolean; idTag: string }>({
authorizeIdTag: false,
@@ -81,7 +74,7 @@ const toggleButtonId = computed(
const handleStartTransaction = async (): Promise => {
const idTag = state.value.idTag.length > 0 ? state.value.idTag : undefined
- if (!isOCPP20x.value && state.value.authorizeIdTag) {
+ if (state.value.authorizeIdTag) {
if (idTag == null) {
$toast.error('Please provide an RFID tag to authorize')
return
diff --git a/ui/web/tests/unit/StartTransaction.test.ts b/ui/web/tests/unit/StartTransaction.test.ts
index 4f00c97b..750f24c7 100644
--- a/ui/web/tests/unit/StartTransaction.test.ts
+++ b/ui/web/tests/unit/StartTransaction.test.ts
@@ -93,9 +93,9 @@ describe('StartTransaction', () => {
expect(wrapper.find('[type="checkbox"]').exists()).toBe(true)
})
- it('should hide authorize checkbox for OCPP 2.0.x', () => {
+ it('should show authorize checkbox for OCPP 2.0.x', () => {
const wrapper = mountComponent({ ocppVersion: OCPPVersion.VERSION_20 })
- expect(wrapper.find('[type="checkbox"]').exists()).toBe(false)
+ expect(wrapper.find('[type="checkbox"]').exists()).toBe(true)
})
})