Fix org user no-data errors, and typo
This commit is contained in:
parent
2aa42fa291
commit
688b54dc7f
2 changed files with 10 additions and 8 deletions
|
@ -85,7 +85,7 @@
|
|||
<div class="card-block">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h4 class="card-title float-left mb-0"> Global Puchases by Category</h4>
|
||||
<h4 class="card-title float-left mb-0"> Global Purchases by Category</h4>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="chart-wrapper">
|
||||
|
|
|
@ -266,13 +266,15 @@ export class DashboardComponent {
|
|||
this.setDate();
|
||||
this.api.orgStats().subscribe(
|
||||
result => {
|
||||
this.setWeekPurchaseList(result.weeks);
|
||||
this.setWeekData(result);
|
||||
this.setChartDataCat(result.data.cat_total);
|
||||
this.setChartDataEssential(result.data.essentials);
|
||||
this.totalCategoryList = result.data.cat_list;
|
||||
if (this.totalCategoryList) {
|
||||
this.showTotalCategoryList = true;
|
||||
if (result.data.cat_list.length > 0) {
|
||||
this.setWeekPurchaseList(result.weeks);
|
||||
this.setWeekData(result);
|
||||
this.setChartDataCat(result.data.cat_total);
|
||||
this.setChartDataEssential(result.data.essentials);
|
||||
this.totalCategoryList = result.data.cat_list;
|
||||
if (this.totalCategoryList) {
|
||||
this.showTotalCategoryList = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
|
|
Reference in a new issue