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="card-block">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<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>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="chart-wrapper">
|
<div class="chart-wrapper">
|
||||||
|
|
|
@ -266,13 +266,15 @@ export class DashboardComponent {
|
||||||
this.setDate();
|
this.setDate();
|
||||||
this.api.orgStats().subscribe(
|
this.api.orgStats().subscribe(
|
||||||
result => {
|
result => {
|
||||||
this.setWeekPurchaseList(result.weeks);
|
if (result.data.cat_list.length > 0) {
|
||||||
this.setWeekData(result);
|
this.setWeekPurchaseList(result.weeks);
|
||||||
this.setChartDataCat(result.data.cat_total);
|
this.setWeekData(result);
|
||||||
this.setChartDataEssential(result.data.essentials);
|
this.setChartDataCat(result.data.cat_total);
|
||||||
this.totalCategoryList = result.data.cat_list;
|
this.setChartDataEssential(result.data.essentials);
|
||||||
if (this.totalCategoryList) {
|
this.totalCategoryList = result.data.cat_list;
|
||||||
this.showTotalCategoryList = true;
|
if (this.totalCategoryList) {
|
||||||
|
this.showTotalCategoryList = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
|
Reference in a new issue