2017-08-31 15:06:47 +00:00
|
|
|
<div class="animated fadeIn">
|
2017-12-12 15:10:44 +00:00
|
|
|
<snippet-bar-cust></snippet-bar-cust>
|
2017-08-31 15:06:47 +00:00
|
|
|
<div class="row">
|
2017-12-12 15:10:44 +00:00
|
|
|
<div *ngFor="let widget of widgetList" class="col-sm-6 col-lg-3">
|
|
|
|
<widget-graph *ngIf="widget.type == 'graph'"
|
|
|
|
[graphName]="widget.name"
|
|
|
|
[graphTitle]="widget.title"
|
|
|
|
[graphIcon]="widget.icon"
|
|
|
|
[dataType]="widget.dataType">
|
|
|
|
</widget-graph>
|
2017-09-01 13:36:31 +00:00
|
|
|
</div><!--/.col-->
|
2017-08-31 15:06:47 +00:00
|
|
|
</div><!--/.row-->
|
2017-12-13 12:37:11 +00:00
|
|
|
<div class=row>
|
2018-05-01 12:23:47 +00:00
|
|
|
<div class="col-xl-6">
|
2019-07-04 14:34:42 +00:00
|
|
|
<!--<panel-pie></panel-pie> --><!--All Purchases-->
|
|
|
|
<div class="demo-container" ng-app="stacked-bar" ng-controller="stacked-bar">
|
|
|
|
<div id="stacked-bar" dx-chart="chartOptions"></div>
|
|
|
|
</div> </div><!--/.col-->
|
|
|
|
<div *ngIf="showCategoryDoughnutChart" class="col-xl-6">
|
|
|
|
<div class="card">
|
|
|
|
<!-- <body style="background-color:rgb(0,0,0);"> -->
|
|
|
|
<div class="card-block">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h4 class="card-title mb-0">Weekly Spending by Category</h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="chart-wrapper">
|
|
|
|
<canvas baseChart class="chart"
|
|
|
|
[datasets]="doughnutChartDataCategory"
|
|
|
|
[labels]="doughnutChartLabelsCategory"
|
|
|
|
[options]="doughnutChartOptionsCategory"
|
|
|
|
[legend]="chartLegend"
|
|
|
|
[chartType]="chartType"
|
|
|
|
(chartHover)="chartHovered($event)"
|
|
|
|
(chartClick)="chartClicked($event)">
|
|
|
|
</canvas>
|
|
|
|
</div>
|
2018-04-17 11:16:22 +00:00
|
|
|
</div>
|
2019-07-04 14:34:42 +00:00
|
|
|
<!-- </body> -->
|
2018-04-17 11:16:22 +00:00
|
|
|
</div>
|
2018-04-13 15:07:26 +00:00
|
|
|
</div><!--/.col-->
|
2018-05-01 12:23:47 +00:00
|
|
|
<div *ngIf="showEssentialBarChart" class="col-xl-6">
|
2018-04-17 11:16:22 +00:00
|
|
|
<div class="card">
|
2018-04-13 15:07:26 +00:00
|
|
|
<div class="card-block">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h4 class="card-title mb-0">No. of Essential Purchases</h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="chart-wrapper">
|
|
|
|
<canvas baseChart class="chart"
|
|
|
|
[datasets]="barChartDataEssential"
|
|
|
|
[labels]="barChartLabelsEssential"
|
|
|
|
[options]="barChartOptionsEssential"
|
|
|
|
[chartType]="barChartTypeEssential"
|
|
|
|
(chartHover)="chartHovered($event)"
|
|
|
|
(chartClick)="chartClicked($event)"></canvas>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><!--/.col-->
|
2018-05-01 12:23:47 +00:00
|
|
|
<div *ngIf="showCategoryBarChart" class="col-xl-6">
|
2018-04-17 11:16:22 +00:00
|
|
|
<div class="card">
|
2018-04-13 15:07:26 +00:00
|
|
|
<div class="card-block">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h4 class="card-title mb-0">Monthly Spending by Category</h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="chart-wrapper">
|
|
|
|
<canvas baseChart
|
|
|
|
[datasets]="barChartDataCategory"
|
|
|
|
[labels]="barChartLabelsCategory"
|
|
|
|
[options]="barChartOptionsCategory"
|
|
|
|
[legend]="barChartLegendCategory"
|
|
|
|
[chartType]="barChartTypeCategory"
|
|
|
|
(chartHover)="chartHovered($event)"
|
|
|
|
(chartClick)="chartClicked($event)"></canvas>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><!--/.col-->
|
2018-05-01 12:23:47 +00:00
|
|
|
<div class="col-xl-6">
|
2017-12-14 16:44:23 +00:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-block">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
2018-04-13 15:07:26 +00:00
|
|
|
<h4 class="card-title float-left mb-0">Weekly Purchase No.</h4>
|
2017-12-14 16:44:23 +00:00
|
|
|
</div><!--/.col-->
|
|
|
|
</div><!--/.row-->
|
|
|
|
<div class="chart-wrapper">
|
|
|
|
<ul class="horizontal-bars type-2">
|
|
|
|
<li>
|
|
|
|
<span class="title">This Week</span>
|
2017-12-19 18:01:29 +00:00
|
|
|
<span class="value">{{ (weekPurchaseList.first || 0 ) }} <span class="text-muted small">
|
|
|
|
({{ (weekPurchaseList.first || 0 ) / weekPurchaseList.max | percent:'1.0-0' }})</span></span>
|
2017-12-14 16:44:23 +00:00
|
|
|
<div class="bars">
|
2017-12-14 20:14:47 +00:00
|
|
|
<div class="progress" style="height: 6px;">
|
|
|
|
<div class="progress-bar bg-success" role="progressbar"
|
2017-12-19 18:01:29 +00:00
|
|
|
[style.width]="(weekPurchaseList.first || 0 ) / weekPurchaseList.max | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
|
2017-12-14 16:44:23 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span class="title">Last Week</span>
|
2017-12-19 18:01:29 +00:00
|
|
|
<span class="value">{{ weekPurchaseList.second || 0 }} <span class="text-muted small">
|
|
|
|
({{ (weekPurchaseList.second || 0 ) / weekPurchaseList.max | percent:'1.0-0' }})</span></span>
|
2017-12-14 16:44:23 +00:00
|
|
|
<div class="bars">
|
2017-12-14 20:14:47 +00:00
|
|
|
<div class="progress" style="height: 6px;">
|
|
|
|
<div class="progress-bar bg-success" role="progressbar"
|
2017-12-19 18:01:29 +00:00
|
|
|
[style.width]="(weekPurchaseList.second || 0 ) / weekPurchaseList.max | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
|
2017-12-14 16:44:23 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
2017-12-19 18:01:29 +00:00
|
|
|
<span class="title">Week Maximum</span>
|
|
|
|
<span class="value">{{ weekPurchaseList.max || 0 }} <span class="text-muted small">
|
|
|
|
(100%)</span></span>
|
2017-12-14 16:44:23 +00:00
|
|
|
<div class="bars">
|
2017-12-14 20:14:47 +00:00
|
|
|
<div class="progress" style="height: 6px;">
|
|
|
|
<div class="progress-bar bg-success" role="progressbar"
|
2017-12-19 18:01:29 +00:00
|
|
|
style="width: 100%" aria-valuemin="0" aria-valuemax="100"></div>
|
2017-12-14 16:44:23 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
2017-12-19 18:01:29 +00:00
|
|
|
<span class="title">Weekly Average</span>
|
|
|
|
<span class="value">{{ (weekPurchaseList.sum / weekPurchaseList.count) || 0 | number:'1.0-0'}} <span class="text-muted small">
|
|
|
|
({{ ((weekPurchaseList.sum / weekPurchaseList.count) || 0) / weekPurchaseList.max | percent:'1.0-0' }})</span></span>
|
2017-12-14 16:44:23 +00:00
|
|
|
<div class="bars">
|
2017-12-14 20:14:47 +00:00
|
|
|
<div class="progress" style="height: 6px;">
|
|
|
|
<div class="progress-bar bg-success" role="progressbar"
|
2017-12-19 18:01:29 +00:00
|
|
|
[style.width]="((weekPurchaseList.sum / weekPurchaseList.count) || 0) / weekPurchaseList.max | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
|
2017-12-14 16:44:23 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><!--/.col-->
|
2018-05-01 12:23:47 +00:00
|
|
|
<div class="col-xl-6">
|
2017-12-14 16:44:23 +00:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-block">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
2018-05-22 11:28:09 +00:00
|
|
|
<h4 class="card-title float-left mb-0">All Purchases by Category</h4>
|
|
|
|
</div><!--/.col-->
|
|
|
|
</div><!--/.row-->
|
2019-07-03 14:11:02 +00:00
|
|
|
<div *ngIf="showTotalCategoryList" class="chart-wrapper">
|
2018-05-22 11:28:09 +00:00
|
|
|
<ul class="icons-list">
|
|
|
|
<!-- New loop -->
|
|
|
|
<li *ngFor="let category of totalCategoryList | slice:0:totalCategoryLimit; let i=index">
|
2018-06-18 11:08:50 +00:00
|
|
|
<i [ngClass]="['icon-' + category.icon, getBootstrapColour(i)]"></i>
|
2018-05-22 11:28:09 +00:00
|
|
|
<div class="desc">
|
|
|
|
<div class="title">{{ category.category || 'N/A' }}</div>
|
|
|
|
</div>
|
|
|
|
<div class="value">
|
|
|
|
<div class="small text-muted">Bought</div>
|
|
|
|
<strong>{{ category.value || 'N/A' }}</strong>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li *ngIf="totalCategoryList.length > totalCategoryLimit && disableCategoryButton == false" class="divider text-center">
|
|
|
|
<button type="button" class="btn btn-sm btn-link text-muted" (click)="categoryLoadMore()"><i class="icon-options"></i></button>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><!--/.col-->
|
2017-12-14 16:44:23 +00:00
|
|
|
</div><!--/.row-->
|
2017-08-31 15:06:47 +00:00
|
|
|
</div>
|