added fixes to category viewing
This commit is contained in:
parent
450b63620f
commit
f6ef50f686
2 changed files with 12 additions and 13 deletions
|
@ -9,8 +9,8 @@
|
|||
</div><!--/.col-->
|
||||
</div><!--/.row-->
|
||||
<div class="chart-wrapper">
|
||||
<ul class="horizontal-bars type-2">
|
||||
<li *ngIf="weekList1 !== undefined">
|
||||
<ul *ngIf="weekList1" class="horizontal-bars type-2">
|
||||
<li *ngIf="weekEssential1">
|
||||
<span class="title">Essential Purchases</span>
|
||||
<span class="value">{{ ( weekEssential1.value || 0 ) | currency:'GBP':'symbol':'1.2-2' }} <span class="text-muted small">
|
||||
({{ (weekEssential1.value || 0 ) / weekListValueSum1 | percent:'1.0-0' }})</span></span>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<div *ngIf="weekList1 !== undefined">
|
||||
<div *ngIf="weekList1">
|
||||
<li *ngIf="weekList1.length > categoryLimit1 && disableCategoryButton1 == false" class="divider text-center">
|
||||
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore1()"><i class="icon-options"></i></button>
|
||||
</li>
|
||||
|
@ -51,8 +51,8 @@
|
|||
</div><!--/.col-->
|
||||
</div><!--/.row-->
|
||||
<div class="chart-wrapper">
|
||||
<ul class="horizontal-bars type-2">
|
||||
<li *ngIf="weekList2 !== undefined">
|
||||
<ul *ngIf="weekList2" class="horizontal-bars type-2">
|
||||
<li *ngIf="weekEssential2">
|
||||
<span class="title">Essential Purchases</span>
|
||||
<span class="value">{{ ( weekEssential2.value || 0 ) | currency:'GBP':'symbol':'1.2-2' }} <span class="text-muted small">
|
||||
({{ (weekEssential2.value || 0 ) / weekListValueSum2 | percent:'1.0-0' }})</span></span>
|
||||
|
@ -74,7 +74,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<div *ngIf="!weekList2 == null">
|
||||
<div *ngIf="weekList2">
|
||||
<li *ngIf="weekList2.length > categoryLimit2 && disableCategoryButtonFirst == false" class="divider text-center">
|
||||
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore2()"><i class="icon-options"></i></button>
|
||||
</li>
|
||||
|
@ -93,8 +93,8 @@
|
|||
</div><!--/.col-->
|
||||
</div><!--/.row-->
|
||||
<div class="chart-wrapper">
|
||||
<ul class="horizontal-bars type-2">
|
||||
<li *ngIf="weekList3 !== undefined">
|
||||
<ul *ngIf="weekList3" class="horizontal-bars type-2">
|
||||
<li *ngIf="weekEssential3">
|
||||
<span class="title">Essential Purchases</span>
|
||||
<span class="value">{{ ( weekEssential1.value || 0 ) | currency:'GBP':'symbol':'1.2-2' }} <span class="text-muted small">
|
||||
({{ (weekEssential3.value || 0 ) / weekListValueSum3 | percent:'1.0-0' }})</span></span>
|
||||
|
@ -116,7 +116,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<div *ngIf="weekList3 !== undefined">
|
||||
<div *ngIf="weekList3">
|
||||
<li *ngIf="weekList3.length > categoryLimit3 && disableCategoryButtonFirst == false" class="divider text-center">
|
||||
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore3()"><i class="icon-options"></i></button>
|
||||
</li>
|
||||
|
@ -135,8 +135,8 @@
|
|||
</div><!--/.col-->
|
||||
</div><!--/.row-->
|
||||
<div class="chart-wrapper">
|
||||
<ul class="horizontal-bars type-2">
|
||||
<li *ngIf="weekList4 !== undefined">
|
||||
<ul *ngIf="weekList4" class="horizontal-bars type-2">
|
||||
<li *ngIf="weekEssential4">
|
||||
<span class="title">Essential Purchases</span>
|
||||
<span class="value">{{ ( weekEssential4.value || 0 ) | currency:'GBP':'symbol':'1.2-2' }} <span class="text-muted small">
|
||||
({{ (weekEssential4.value || 0 ) / weekListValueSum4 | percent:'1.0-0' }})</span></span>
|
||||
|
@ -158,7 +158,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<div *ngIf="!weekList4 == null">
|
||||
<div *ngIf="weekList4">
|
||||
<li *ngIf="weekList4.length > categoryLimit4 && disableCategoryButtonFirst == false" class="divider text-center">
|
||||
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore4()"><i class="icon-options"></i></button>
|
||||
</li>
|
||||
|
|
|
@ -94,7 +94,6 @@ export class CategoryMonthComponent implements OnInit {
|
|||
this.weekList4 = prop(data.data.categories, this.myWeek4);
|
||||
this.getMaxValue(this.weekList1, this.weekList2, this.weekList3, this.weekList4);
|
||||
this.weekEssential1 = prop(data.data.essentials, this.myWeek1);
|
||||
console.log(this.weekEssential1);
|
||||
this.weekEssential2 = prop(data.data.essentials, this.myWeek2);
|
||||
this.weekEssential3 = prop(data.data.essentials, this.myWeek3);
|
||||
this.weekEssential4 = prop(data.data.essentials, this.myWeek4);
|
||||
|
|
Reference in a new issue