Intial
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.app.directive('lostCustomersReport', lostCustomersReport);
|
||||
|
||||
function lostCustomersReport() {
|
||||
return {
|
||||
scope: true,
|
||||
templateUrl: '/js/app/report/templates/lostCustomersReport.tmpl.html',
|
||||
controller: controller,
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
}
|
||||
|
||||
controller.$inject = ['$http'];
|
||||
function controller($http) {
|
||||
var vm = this;
|
||||
|
||||
vm.isLoading = true;
|
||||
|
||||
$http.post('/Report/LostCustomers')
|
||||
.success(function (customers) {
|
||||
vm.customers = customers;
|
||||
vm.isLoading = false;
|
||||
});
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,27 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.app.directive('newCustomersReport', newCustomersReport);
|
||||
|
||||
function newCustomersReport() {
|
||||
return {
|
||||
scope: true,
|
||||
templateUrl: '/js/app/report/templates/newCustomersReport.tmpl.html',
|
||||
controller: controller,
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
}
|
||||
|
||||
controller.$inject = ['$http'];
|
||||
function controller($http) {
|
||||
var vm = this;
|
||||
|
||||
vm.isLoading = true;
|
||||
|
||||
$http.post('/Report/NewCustomers')
|
||||
.success(function (customers) {
|
||||
vm.customers = customers;
|
||||
vm.isLoading = false;
|
||||
});
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pie-chart fa-fw"></i> Lost Customers
|
||||
</h3>
|
||||
</div>
|
||||
<table ng-hide="vm.isLoading || vm.customer.length == 0"
|
||||
class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Work E-mail</th>
|
||||
<th>Date Lost</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="customer in vm.customers">
|
||||
<td>
|
||||
{{customer.Name}}
|
||||
</td>
|
||||
<td>
|
||||
{{customer.WorkEmail}}
|
||||
</td>
|
||||
<td>
|
||||
{{customer.TerminationDate | parseDate | date: 'shortDate'}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-body" ng-show="vm.isLoading">
|
||||
Loading...
|
||||
</div>
|
||||
<div class="panel-body" ng-show="!vm.isLoading && vm.customers.length == 0">
|
||||
There are no customers on the report.
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pie-chart fa-fw"></i> New Customers
|
||||
</h3>
|
||||
</div>
|
||||
<table ng-hide="vm.isLoading || vm.customers.length == 0"
|
||||
class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Work E-mail</th>
|
||||
<th>Date Acquired</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="customer in vm.customers">
|
||||
<td>
|
||||
{{customer.Name}}
|
||||
</td>
|
||||
<td>
|
||||
{{customer.WorkEmail}}
|
||||
</td>
|
||||
<td>
|
||||
{{customer.CreateDate | parseDate | date: 'shortDate'}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-body" ng-show="vm.isLoading">
|
||||
Loading...
|
||||
</div>
|
||||
<div class="panel-body" ng-show="!vm.isLoading && vm.customers.length == 0">
|
||||
There are no customers on the report.
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user