mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 16:28:50 +00:00
- 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
49 lines
1.9 KiB
HTML
49 lines
1.9 KiB
HTML
<template name="prodMgmtForm">
|
|
<h4>Product Management</h4>
|
|
{{#if Template.subscriptionsReady}}
|
|
<form action="submit" class="row prodInputForm" style="gap: 1em;">
|
|
<div class="col s12">
|
|
<p>
|
|
<label>
|
|
<input type="checkbox" id="showNoStoreSet" />
|
|
<span>Show Products without Store Assigned</span>
|
|
</label>
|
|
</p>
|
|
</div>
|
|
<div class="col s12 m6 l6 input-field outlined">
|
|
<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 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>
|
|
{{else}}
|
|
<a class="waves-effect waves-light btn editProdMgmt blue white-text right">Save Edits</a>
|
|
{{/if}}
|
|
</div>
|
|
</form>
|
|
{{/if}}
|
|
|
|
<!-- Store Modal Structure -->
|
|
<div id="modalStore" class="modal">
|
|
<div class="modal-content">
|
|
<h4>Add New Store</h4>
|
|
{{> storeMgmtForm}}
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a href="#!" class="modal-close waves-effect green white-text btn">Done</a>
|
|
</div>
|
|
</div>
|
|
{{> snackbar}}
|
|
</template>
|