diff --git a/src/Views/Home/Locations.cshtml b/src/Views/Home/Locations.cshtml
index d95bf4a..44f00f0 100644
--- a/src/Views/Home/Locations.cshtml
+++ b/src/Views/Home/Locations.cshtml
@@ -40,7 +40,7 @@
foreach (LocationTableViewModel locationTableViewModel in Model.LocationTableViewModels)
{
- | @locationTableViewModel.LocationID |
+ @locationTableViewModel.LocationID |
@locationTableViewModel.LocationName |
@locationTableViewModel.RoomNumber |
@locationTableViewModel.Seat |
@@ -234,6 +234,7 @@
const result = await response.json();
if (result) {
const btn = document.querySelector(`button[data-location-id="${data.Location}"]`);
+ const btn_del = document.querySelector(`button.btn-danger[data-location-id="${data.Location}"]`);
const row = btn.closest('tr');
let slugifiedLocationID = `${data.Description.Location}-${data.Description.RoomNumber}-${data.Description.Seat}`
.toLowerCase()
@@ -244,6 +245,10 @@
btn.setAttribute("data-location-name", data.Description.Location);
btn.setAttribute("data-room-number", data.Description.RoomNumber);
btn.setAttribute("data-seat", data.Description.Seat);
+ btn_del.setAttribute("data-location-id", slugifiedLocationID);
+ btn_del.setAttribute("data-location-name", data.Description.Location);
+ btn_del.setAttribute("data-room-number", data.Description.RoomNumber);
+ btn_del.setAttribute("data-seat", data.Description.Seat);
row.children[0].textContent = slugifiedLocationID;
row.children[1].textContent = data.Description.Location;
row.children[2].textContent = data.Description.RoomNumber;
@@ -339,7 +344,7 @@
const tbody = document.querySelector('table tbody');
const newRow = document.createElement('tr');
newRow.innerHTML = `
- ${slugifiedLocationID} |
+ ${slugifiedLocationID} |
${newLoc.Location} |
${newLoc.RoomNumber} |
${newLoc.Seat} |