Added dropdown users and locations to inventory, Improved edit modal loading for Assets

This commit is contained in:
2025-10-26 15:12:56 +01:00
parent 10b23f4df2
commit 9e706ed35d
2 changed files with 69 additions and 5 deletions

View File

@@ -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}"]`);