From 3d59a2e5cd0405a42b6c7ee5104b4493dfd1d7c4 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sat, 7 Feb 2026 17:32:43 -0800 Subject: [PATCH] Fix service point delete using wrong ID field The API returns ServicePointID but portal.js was using sp.ID which was undefined. Changed all sp.ID references to sp.ServicePointID. Co-Authored-By: Claude Opus 4.5 --- portal/portal.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/portal/portal.js b/portal/portal.js index 63bdb9e..468ffd3 100644 --- a/portal/portal.js +++ b/portal/portal.js @@ -1680,8 +1680,8 @@ const Portal = {
${this.escapeHtml(sp.Name)}
- - + +
`).join(''); @@ -1945,7 +1945,7 @@ const Portal = { const assignedSPIds = new Set(this.assignments.map(a => a.ServicePointID)); const availableBeacons = this.beacons.filter(b => b.IsActive && !assignedBeaconIds.has(b.BeaconID)); - const availableSPs = this.servicePoints.filter(sp => !assignedSPIds.has(sp.ID)); + const availableSPs = this.servicePoints.filter(sp => !assignedSPIds.has(sp.ServicePointID)); if (availableBeacons.length === 0) { this.toast('No unassigned beacons available', 'warning'); @@ -1970,7 +1970,7 @@ const Portal = {