This commit is contained in:
Sören Oesterwind 2023-07-09 18:20:27 +02:00
parent 720a969484
commit 09e74f9eb6
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@
</div>
<div class="mb-3">
<label for="itemModifyModalStorageLocation" class="form-label">Select a storage location</label>
<select class="form-select" id="itemModifyModalStorageLocation" name="storageLocation">
<select class="form-select" id="itemModifyModalStorageLocation" name="storageLocationId">
<option value=""><i>Do not assign a storage location</i></option>
<% it.storeLocs.forEach(function(locs){ %>
<option value="<%= locs.id %>"><%= locs.name %></option>

View File

@ -41,6 +41,7 @@ function getDataForEdit(id) {
// Select the correct option in the dropdown
const modal_itemCategoryOptions = modal_itemCategory.options;
modal_itemCategoryOptions[0].selected = true;
for (let i = 0; i < modal_itemCategoryOptions.length; i++) {
if (modal_itemCategoryOptions[i].value == result.categoryId) {
modal_itemCategoryOptions[i].selected = true;
@ -49,6 +50,7 @@ function getDataForEdit(id) {
// Select the correct option in the dropdown
const modal_itemStatusOptions = modal_itemStatus.options;
modal_itemStatusOptions[0].selected = true;
for (let i = 0; i < modal_itemStatusOptions.length; i++) {
if (modal_itemStatusOptions[i].value == result.statusId) {
modal_itemStatusOptions[i].selected = true;
@ -57,6 +59,7 @@ function getDataForEdit(id) {
// Select the correct option in the dropdown
const modal_itemStorageLocationOptions = modal_itemStorageLocation.options;
modal_itemStorageLocationOptions[0].selected = true;
for (let i = 0; i < modal_itemStorageLocationOptions.length; i++) {
if (modal_itemStorageLocationOptions[i].value == result.storageLocationId) {
modal_itemStorageLocationOptions[i].selected = true;