mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 23:11:54 +00:00
Added dropdown users and locations to inventory, Improved edit modal loading for Assets
This commit is contained in:
@@ -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}"]`);
|
||||
|
||||
Reference in New Issue
Block a user