diff --git a/src/Resources/Views.Home.Inventory.de.resx b/src/Resources/Views.Home.Inventory.de.resx
index 4d6ef1f..280983c 100644
--- a/src/Resources/Views.Home.Inventory.de.resx
+++ b/src/Resources/Views.Home.Inventory.de.resx
@@ -138,4 +138,10 @@
Asset wurde erfolgreich angepasst
+
+ Benutzer auswählen
+
+
+ Ort auswählen
+
diff --git a/src/Resources/Views.Shared._Layout.de.resx b/src/Resources/Views.Shared._Layout.de.resx
index 0ed21de..54a4121 100644
--- a/src/Resources/Views.Shared._Layout.de.resx
+++ b/src/Resources/Views.Shared._Layout.de.resx
@@ -43,4 +43,7 @@
Fehler beim Laden der Orte
+
+ Benutzer auswählen
+
diff --git a/src/Views/Home/Assets.cshtml b/src/Views/Home/Assets.cshtml
index 2d94e58..0048a4a 100644
--- a/src/Views/Home/Assets.cshtml
+++ b/src/Views/Home/Assets.cshtml
@@ -495,9 +495,11 @@ document.addEventListener('DOMContentLoaded', () => {
const asset = responseJson.assetsModel;
const locationSelect = updateForm.querySelector('#updateLocationSelect');
- await loadLocationsIntoSelect(locationSelect, asset.Location);
const usersSelect = updateForm.querySelector('#updateUsersSelect');
- await loadUsersIntoSelect(usersSelect, asset.Owner);
+ await Promise.all([
+ loadLocationsIntoSelect(locationSelect, asset.Location),
+ loadUsersIntoSelect(usersSelect, asset.Owner)
+ ]);
for (const [key, value] of Object.entries(asset)) {
const input = updateForm.querySelector(`[name="${key}"]`);
diff --git a/src/Views/Home/Inventory.cshtml b/src/Views/Home/Inventory.cshtml
index d1e339d..6ddd1da 100644
--- a/src/Views/Home/Inventory.cshtml
+++ b/src/Views/Home/Inventory.cshtml
@@ -5,6 +5,8 @@
@{
ViewData["Title"] = T["Inventory"];
}
+
+
@@ -309,11 +311,15 @@
-
+
-
+
@@ -416,7 +422,14 @@ document.addEventListener('DOMContentLoaded', () => {
const response = await fetch(`/Assets/Get?cn=${assetId}`);
const responseJson = await response.json();
const asset = responseJson.assetsModel;
-
+
+ const locationSelect = updateForm.querySelector('#updateLocationSelect');
+ const usersSelect = updateForm.querySelector('#updateUsersSelect');
+ await Promise.all([
+ loadLocationsIntoSelect(locationSelect, asset.Location),
+ loadUsersIntoSelect(usersSelect, asset.Owner)
+ ]);
+
for (const [key, value] of Object.entries(asset)) {
const input = updateForm.querySelector(`[name="${key}"]`);
if (input) input.value = value;
@@ -518,5 +531,56 @@ document.addEventListener('DOMContentLoaded', () => {
});
+
+
+
+
\ No newline at end of file