273 lines
13 KiB
Handlebars
273 lines
13 KiB
Handlebars
{{#main-content}}
|
|
<div class="widget-box transparent">
|
|
{{#grid-header}}
|
|
{{#if ajax.user.admin}}
|
|
<li>
|
|
{{#link-to 'customer.import'}}
|
|
<i class="ace-icon fa fa-address-card-o bigger-110"></i>
|
|
Import Customers
|
|
{{/link-to}}
|
|
</li>
|
|
<li>
|
|
{{#link-to 'customer-ytd-sale.import'}}
|
|
<i class="ace-icon fa fa-line-chart bigger-110"></i>
|
|
Import Sales Data
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
<li>
|
|
{{#link-to 'customer.list.advanced-query'}}
|
|
<i class="ace-icon fa fa-database bigger-110"></i>
|
|
Advanced Query
|
|
{{/link-to}}
|
|
</li>
|
|
{{/grid-header}}
|
|
|
|
<div class="widget-body">
|
|
<!-- #section:custom/scrollbar -->
|
|
<div class="widget-main no-padding">
|
|
<table class="table table-striped table-bordered table-hover dataTable" style="border: 1px solid #ddd;">
|
|
<thead class="thin-border-bottom">
|
|
<tr>
|
|
{{#if tableOptions.showId}}
|
|
{{sortable-th name='id' text='ID'}}
|
|
{{/if}}
|
|
{{#if tableOptions.showName}}
|
|
<th>Name</th>
|
|
{{/if}}
|
|
{{#if tableOptions.showDateAdded}}
|
|
{{sortable-th name='dateAdded' text='Added'}}
|
|
{{/if}}
|
|
{{#if tableOptions.showYears}}
|
|
<th>Years</th>
|
|
{{/if}}
|
|
{{#if tableOptions.showYtdSale}}
|
|
{{sortable-th name='sumYtdSales' text='Sales'}}
|
|
{{/if}}
|
|
{{#if tableOptions.showCountryCode}}
|
|
<th class="hidden-480">Country</th>
|
|
{{/if}}
|
|
{{#if tableOptions.showState}}
|
|
<th class="hidden-480">State</th>
|
|
{{/if}}
|
|
{{#if tableOptions.showCity}}
|
|
<th class="hidden-480">City</th>
|
|
{{/if}}
|
|
{{#if tableOptions.showMs}}
|
|
{{sortable-th name='ms' text='MS' class='hidden-480'}}
|
|
{{/if}}
|
|
{{#if tableOptions.showRegion}}
|
|
{{sortable-th name='region' text='Region' class='hidden-480'}}
|
|
{{/if}}
|
|
{{#if tableOptions.showSalesperson}}
|
|
{{sortable-th name='salesperson' text='Salesperson'}}
|
|
{{/if}}
|
|
{{#if tableOptions.showStatus}}
|
|
<th class="hidden-480">Status</th>
|
|
{{/if}}
|
|
{{#if tableOptions.showIssue1}}
|
|
<th class="hidden-480">Issue 1</th>
|
|
{{/if}}
|
|
{{#if tableOptions.showIssue2}}
|
|
<th class="hidden-480">Issue 2</th>
|
|
{{/if}}
|
|
{{#if tableOptions.showIssue3}}
|
|
<th class="hidden-480">Issue 3</th>
|
|
{{/if}}
|
|
<th>
|
|
<i class="ace-icon fa fa-cogs bigger-110 hidden-480"></i>
|
|
Settings
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{{#each model.data as |it|}}
|
|
<tr>
|
|
{{#if tableOptions.showId}}
|
|
<td>
|
|
{{#link-to 'customer.show' it.id title='查看'}}
|
|
{{it.id}}
|
|
{{/link-to}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showName}}
|
|
<td>
|
|
{{it.name}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showDateAdded}}
|
|
<td>
|
|
{{date-cell value=it.dateAdded format='D/M/YYYY'}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showYears}}
|
|
<td>
|
|
{{#if (eq it.years.length 1)}}
|
|
{{it.years.firstObject}}
|
|
{{else if (gt it.years.length 1)}}
|
|
{{it.years.firstObject}}-{{it.years.lastObject}}
|
|
{{/if}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showYtdSale}}
|
|
<td>
|
|
<div>
|
|
{{#if it.sumYtdSales}}
|
|
{{#if it.expand}}
|
|
<a style="cursor: pointer;" {{action (route-action 'collapseYtdSales' it)}}>
|
|
<span class="ui-icon ace-icon fa fa-minus center bigger-110 blue">
|
|
</span>
|
|
</a>
|
|
{{else}}
|
|
<a style="cursor: pointer;" {{action (route-action 'expandYtdSales' it)}}>
|
|
<span class="ui-icon ace-icon fa fa-plus center bigger-110 blue">
|
|
</span>
|
|
</a>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{number-us it.sumYtdSales}}
|
|
</div>
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showCountryCode}}
|
|
<td class="hidden-480">
|
|
{{it.countryCode}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showState}}
|
|
<td class="hidden-480">
|
|
{{it.state}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showCity}}
|
|
<td class="hidden-480">
|
|
{{it.city}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showMs}}
|
|
<td class="hidden-480">
|
|
{{it.ms}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showRegion}}
|
|
<td class="hidden-480">
|
|
{{it.region}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showSalesperson}}
|
|
<td>
|
|
{{it.salesperson}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showStatus}}
|
|
<td>
|
|
{{it.statusText}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showIssue1}}
|
|
<td style="max-width: 32px">
|
|
{{#if it.issue1}}
|
|
{{it.issue1.issue}}
|
|
{{#link-to 'customer-issue.edit' it.issue1.id class="blue" title="Edit"}}
|
|
<i class="ace-icon fa fa-pencil bigger-60"></i>
|
|
{{/link-to}}
|
|
{{/if}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showIssue2}}
|
|
<td style="max-width: 32px">
|
|
{{#if it.issue2}}
|
|
{{it.issue2.issue}}
|
|
{{#link-to 'customer-issue.edit' it.issue2.id class="blue" title="Edit"}}
|
|
<i class="ace-icon fa fa-pencil bigger-60"></i>
|
|
{{/link-to}}
|
|
{{/if}}
|
|
</td>
|
|
{{/if}}
|
|
{{#if tableOptions.showIssue3}}
|
|
<td style="max-width: 32px">
|
|
{{#if it.issue3}}
|
|
{{it.issue3.issue}}
|
|
{{#link-to 'customer-issue.edit' it.issue3.id class="blue" title="Edit"}}
|
|
<i class="ace-icon fa fa-pencil bigger-60"></i>
|
|
{{/link-to}}
|
|
{{/if}}
|
|
</td>
|
|
{{/if}}
|
|
<td>
|
|
<div class="hidden-sm hidden-xs btn-group">
|
|
{{#link-to 'customer-issue.create' it.id class='btn btn-xs btn-success' title='创建注记'}}
|
|
<i class="ace-icon fa fa-tags bigger-120"></i>
|
|
{{/link-to}}
|
|
{{#if ajax.user.admin}}
|
|
{{#link-to 'customer.edit' it.id class='btn btn-xs btn-info' title='编辑'}}
|
|
<i class="ace-icon fa fa-pencil bigger-120"></i>
|
|
{{/link-to}}
|
|
{{/if}}
|
|
</div>
|
|
<div class="hidden-md hidden-lg">
|
|
<div class="inline pos-rel">
|
|
|
|
<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
|
|
<i class="ace-icon fa fa-cog icon-only bigger-110"></i>
|
|
</button>
|
|
|
|
<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
|
|
<li>
|
|
{{#link-to 'customer-issue.create' it.id class='tooltip-info' data-rel='tooltip' title='Create Issue'}}
|
|
<span class="green">
|
|
<i class="ace-icon fa fa-tags bigger-120"></i>
|
|
</span>
|
|
{{/link-to}}
|
|
</li>
|
|
{{#if ajax.user.admin}}
|
|
<li>
|
|
{{#link-to 'customer.edit' it.id class='tooltip-info' data-rel='tooltip' title='Edit'}}
|
|
<span class="blue">
|
|
<i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
|
|
</span>
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{#if it.expand}}
|
|
<tr>
|
|
<td colspan="{{tableOptions.countOfShowing}}">
|
|
<table class="table table-striped table-hover dataTable table-bordered" style="border: 1px solid #ddd;">
|
|
<thead class="thin-border-bottom">
|
|
<tr>
|
|
<th>Year</th>
|
|
<th>Sale</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each it.ytdSales as |yearSale|}}
|
|
<tr>
|
|
<td>
|
|
{{yearSale.year}}
|
|
</td>
|
|
<td>
|
|
{{number-us yearSale.sale}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
{{/if}}
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{pagination-bar}}
|
|
</div>
|
|
</div>
|
|
{{outlet}}
|
|
{{/main-content}}
|