Updaated Products to have multiple associated stores.

- Products will be updated on first start of server to make sure the store attribute is set as an Array of values.
- You can edit Products to add more associated stores
- Products will list all associated stores on the product table view
- Cut down method calls to single event trigger for adding / editing products info
This commit is contained in:
Brian McGonagill 2024-08-13 10:48:27 -05:00
parent a7a9c48e01
commit 3f6618d906
4 changed files with 56 additions and 96 deletions

View file

@ -14,16 +14,17 @@
<input type="text" class="prodName" style="{{#if $eq prodNameErr true}}border: 2px solid red;{{/if}}" id="prodName" />
<label for="prodName">Name*</label>
</div>
<div class="col s12 m6 l6 input-field outlined">
<select name="prodStore" id="prodStore">
<option value="" disabled selected></option>
<option id="addNewStore" value="addNewStore" class="modal-trigger" data-target="modalStore">+ Add New Store</option>
<div class="col s12 m4 l4 input-field outlined">
<select name="prodStore" id="prodStore" multiple>
{{#each stores}}
<option value="{{storeName}}">{{storeName}}</option>
{{/each}}
</select>
<label for="prodStore">Store</label>
</div>
<div class="col s12 m2 l2">
<a class="btn waves-light waves-effect blue white-text modal-trigger" id="addNewStore" href="#modalStore">+ Add Store</a>
</div>
<div class="col s12 m12 l12">
{{#if $eq prodEditMode false}}
<a class="waves-effect waves-light btn saveProdMgmt green white-text right">Add</a>