Upgraded to Meteor 1.6.0.1 and NodeJS 8.9.3. Added weekly/daily property to venues to support graphing and tracking of actual income from farmers markets (they don't usually match with expected income). Added workers objects to help illustrate who did what work (who was at the market on a specific week for example, or who prep'd and who canned a batch of jam). Fixed some bugs in the venue page. Re-design of the menu to allow for more menu options.

This commit is contained in:
Wynne Crisman
2017-12-31 14:06:46 -08:00
parent d8a6a31525
commit 6c17639e0c
31 changed files with 3082 additions and 219 deletions

90
imports/ui/Workers.html Normal file
View File

@@ -0,0 +1,90 @@
<template name="Workers">
<div id="workers">
{{#if Template.subscriptionsReady}}
<div class="tableControls">
<div class="showHidden">
<span class="controlLabel">Show Hidden</span>
<div class="toggleShowHidden checkbox checkbox-slider--b-flat">
<label>
<input type="checkbox" name="showHidden"><span></span>
</label>
</div>
</div>
<div class="contentControls">
<a class="loadMoreLink {{#if disableLoadMore}}disabled{{/if}}" href="javascript:">Load More...</a>
</div>
</div>
<div class="separatedTableHeader">
<table class="table table-striped table-hover">
<thead>
<tr>
<th class="name">Name {{>WorkerSearch columnName='name'}}</th>
<th class="activities">Activities</th>
<th class="hourlyRate">Avg Hourly Rate</th>
<th class="actions">Actions <span class="newWorkerButton btn btn-success"><i class="fa fa-plus-circle" aria-hidden="true"></i><i class="fa fa-times-circle" aria-hidden="true"></i></span></th>
</tr>
</thead>
</table>
</div>
<div class="listRow">
<div class="listCell">
<div class="tableContainer mCustomScrollbar" data-mcs-theme="dark">
<table class="table table-striped table-hover">
<tbody>
{{#if displayNewWorker}}
<tr>{{> WorkerEditor isNew=true}}</tr>
{{/if}}
{{#each workers}}
{{> Worker}}
{{/each}}
</tbody>
</table>
</div>
</div>
</div>
{{else}}
{{/if}}
</div>
</template>
<template name="Worker">
<tr class="{{getRowClass}}">
{{#if editing}}
{{> WorkerEditor}}
{{else}}
<td class="name noselect nonclickable left">{{name}}</td>
<td class="activities noselect nonclickable left">{{activities}}</td>
<td class="hourlyRate noselect nonclickable left">{{hourlyRate}}</td>
{{#if hidden}}
<td class="actions center"><i class="actionEdit fa fa-pencil-square-o fa-lg noselect clickable" title="Edit" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="actionShow fa fa-eye fa-lg noselect clickable" title="Show" aria-hidden="true"></i></td>
{{else}}
{{#if deactivated}}
<td class="actions center"><i class="actionEdit fa fa-pencil-square-o fa-lg noselect clickable" title="Edit" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="actionActivate fa fa-toggle-on fa-lg noselect clickable" title="Activate" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="actionHide fa fa-eye-slash fa-lg noselect clickable" title="Hide" aria-hidden="true"></i></td>
{{else}}
<td class="actions center"><i class="actionEdit fa fa-pencil-square-o fa-lg noselect clickable" title="Edit" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="actionRemove fa fa-times-circle fa-lg noselect clickable" title="Deactivate" aria-hidden="true"></i></td>
{{/if}}
{{/if}}
{{/if}}
</tr>
</template>
<template name="WorkerEditor">
<td colspan="3" class="workerEditorTd">
<div class="editorDiv"><label>Name</label> <input name="name" class="form-control" type="text" value="{{name}}" autocomplete="off" required></div>
<div class="editorDiv"><label>Activities</label>
<select class="activitiesEditor" multiple="multiple">
{{#each activities}}
<option value="{{this}}" {{activitySelected}}>{{this}}</option>
{{/each}}
</select>
</div>
<div class="editorDiv"><label>Avg Hourly Rate</label> <input name="hourlyRate" class="form-control" type="number" min="0" step="0.01" data-schema-key='currency' value="{{name}}" autocomplete="off" required></div>
</td>
<td class="center workerEditorTd actions"><i class="editorApply fa fa-check-square-o fa-lg noselect clickable" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="editorCancel fa fa-times-circle fa-lg noselect clickable" aria-hidden="true"></i></td>
</template>
<template name="WorkerSearch">
<div class="workerSearch">
<input type="text" class="searchInput" placeholder="Filter..." value="{{searchValue}}"/>
</div>
</template>