From 358e35bb6a9640b066cdbfd2920bc672552ab52a Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sun, 12 Oct 2025 16:23:58 +0200 Subject: [PATCH] Fixed Group creation not updating table --- src/Views/Home/Groups.cshtml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Views/Home/Groups.cshtml b/src/Views/Home/Groups.cshtml index ba533d9..aa80e9c 100644 --- a/src/Views/Home/Groups.cshtml +++ b/src/Views/Home/Groups.cshtml @@ -281,6 +281,36 @@ if (result.success) { bootstrap.Modal.getInstance(createModalEl).hide(); createForm.reset(); + // Add the new group to the table + const tableBody = document.querySelector('tbody'); + const newRow = document.createElement('tr'); + + newRow.innerHTML = ` + ${jsonData.Cn} + ${jsonData.Permissions.includes("CanInventorize") ? "☑️" : "❌"} + ${jsonData.Permissions.includes("CanManageUsers") ? "☑️" : "❌"} + ${jsonData.Permissions.includes("CanManageLocations") ? "☑️" : "❌"} + ${jsonData.Permissions.includes("CanManageAssets") ? "☑️" : "❌"} + ${jsonData.Permissions.includes("CanManageGroups") ? "☑️" : "❌"} + +
+ + +
+ + `; + + tableBody.appendChild(newRow); showToast('@T["Group created successfully"]', 'success'); } else { let exception = result.exception;