Fix org user no-data errors, and typo
This commit is contained in:
parent
6168c8e1e2
commit
19a667382a
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,6 +266,7 @@ export class DashboardComponent {
|
||||||
this.setDate();
|
this.setDate();
|
||||||
this.api.orgStats().subscribe(
|
this.api.orgStats().subscribe(
|
||||||
result => {
|
result => {
|
||||||
|
if (result.data.cat_list.length > 0) {
|
||||||
this.setWeekPurchaseList(result.weeks);
|
this.setWeekPurchaseList(result.weeks);
|
||||||
this.setWeekData(result);
|
this.setWeekData(result);
|
||||||
this.setChartDataCat(result.data.cat_total);
|
this.setChartDataCat(result.data.cat_total);
|
||||||
|
@ -274,6 +275,7 @@ export class DashboardComponent {
|
||||||
if (this.totalCategoryList) {
|
if (this.totalCategoryList) {
|
||||||
this.showTotalCategoryList = true;
|
this.showTotalCategoryList = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log('Retrieval Error');
|
console.log('Retrieval Error');
|
||||||
|
|
Reference in a new issue