expressCart/views/customers.hbs

65 lines
2.8 KiB
Handlebars
Raw Normal View History

2018-02-12 05:47:26 +10:00
{{> partials/menu}}
2020-02-01 16:59:30 +10:00
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
2018-01-22 07:20:33 +10:00
<h2>Customers</h2>
</div>
<div class="col-sm-12 search_bar">
2018-01-22 07:20:33 +10:00
<div class="input-group">
<input type="text" name="customer_filter" id="customer_filter" class="form-control" placeholder="Filter customers">
<div class="input-group-append">
<button type="button" class="btn btn-outline-success" id="btn_customer_filter">Filter</button>
2020-02-01 16:59:30 +10:00
<a href="/admin/customers" class="hidden-xs btn btn-outline-warning"><i class="feather" data-feather="x-octagon"></i></a>
</div>
2018-01-22 07:20:33 +10:00
</div>
<p class="text-warning top-pad-10">{{ @root.__ "Customers can be filtered by: email, name or phone number" }}</p>
2018-01-22 07:20:33 +10:00
</div>
{{#if customers}}
<div class="col-sm-12">
2018-01-22 07:20:33 +10:00
<ul class="list-group">
<li class="list-group-item">
<strong>
{{ @root.__ "Customers" }}
2018-01-22 07:20:33 +10:00
{{#if searchTerm}}
- <span class="text-danger">{{ @root.__ "Filtered term" }}: {{searchTerm}} </span>
2018-01-22 07:20:33 +10:00
{{/if}}
</strong>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-sm-6">
2019-12-26 20:32:28 +10:00
<div class="text-info"><strong>{{ @root.__ "Email address" }}</strong></div>
2018-01-22 07:20:33 +10:00
</div>
<div class="col-sm-3">
2019-12-26 20:32:28 +10:00
<div class="text-info"><strong>{{ @root.__ "Name" }}</strong></div>
2018-01-22 07:20:33 +10:00
</div>
<div class="col-sm-3">
2019-12-26 20:32:28 +10:00
<div class="text-info"><strong>{{ @root.__ "Phone number" }}</strong></div>
2018-01-22 07:20:33 +10:00
</div>
</div>
</li>
{{#each customers}}
<li class="list-group-item">
2019-12-26 20:32:28 +10:00
<a href="/admin/customer/view/{{this._id}}">
<div class="row">
<div class="col-sm-6">
2019-12-26 20:32:28 +10:00
<div class="">{{this.email}}</div>
2018-01-22 07:20:33 +10:00
</div>
<div class="col-sm-3">
2019-12-26 20:32:28 +10:00
<div class="">{{this.firstName}} {{this.lastName}}</div>
2018-01-22 07:20:33 +10:00
</div>
<div class="col-sm-3">
2019-12-26 20:32:28 +10:00
<div class="">{{this.phone}}</div>
2018-01-22 07:20:33 +10:00
</div>
</div>
2019-12-26 20:32:28 +10:00
</a>
2018-01-22 07:20:33 +10:00
</li>
{{/each}}
</ul>
</div>
{{else}}
<h4 class="text-center">
{{ @root.__ "No orders found" }}
2018-01-22 07:20:33 +10:00
</h4>
{{/if}}
2020-02-01 16:59:30 +10:00
</main>