No longer throwing errors and proper limit & slice
This commit is contained in:
parent
9446ef11d4
commit
ca2cf0fdab
3 changed files with 10 additions and 10 deletions
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<div *ngIf="weekList1 !== undefined">
|
<div *ngIf="weekList1 !== undefined">
|
||||||
<li *ngIf="weekList1.length > 6 && disableCategoryButton1 == false" class="divider text-center">
|
<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>
|
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore1()"><i class="icon-options"></i></button>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<div *ngIf="!weekList2 == null">
|
<div *ngIf="!weekList2 == null">
|
||||||
<li *ngIf="weekList2.length > 6 && disableCategoryButtonFirst == false" class="divider text-center">
|
<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>
|
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore2()"><i class="icon-options"></i></button>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<div *ngIf="weekList3 !== undefined">
|
<div *ngIf="weekList3 !== undefined">
|
||||||
<li *ngIf="weekList3.length > 6 && disableCategoryButtonFirst == false" class="divider text-center">
|
<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>
|
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore3()"><i class="icon-options"></i></button>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<div *ngIf="!weekList4 == null">
|
<div *ngIf="!weekList4 == null">
|
||||||
<li *ngIf="weekList4.length > 6 && disableCategoryButtonFirst == false" class="divider text-center">
|
<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>
|
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore4()"><i class="icon-options"></i></button>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,10 +18,10 @@ export class CategoryMonthComponent implements OnInit {
|
||||||
first: 0,
|
first: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
weekList1 = {};
|
weekList1 = [];
|
||||||
weekList2 = {};
|
weekList2 = [];
|
||||||
weekList3 = {};
|
weekList3 = [];
|
||||||
weekList4 = {};
|
weekList4 = [];
|
||||||
|
|
||||||
categoryList: number[] = [];
|
categoryList: number[] = [];
|
||||||
dayList: any[] = [];
|
dayList: any[] = [];
|
||||||
|
@ -32,7 +32,7 @@ export class CategoryMonthComponent implements OnInit {
|
||||||
myWeek4: any;
|
myWeek4: any;
|
||||||
categoryIdList: number[] = [];
|
categoryIdList: number[] = [];
|
||||||
categoryNameList: string[] = [];
|
categoryNameList: string[] = [];
|
||||||
categoryLimit1: number = 6;
|
categoryLimit1: number = 2;
|
||||||
categoryLimit2: number = 6;
|
categoryLimit2: number = 6;
|
||||||
categoryLimit3: number = 6;
|
categoryLimit3: number = 6;
|
||||||
categoryLimit4: number = 6;
|
categoryLimit4: number = 6;
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
<strong>{{ sectorPurchases[i] || 'N/A' }}</strong>
|
<strong>{{ sectorPurchases[i] || 'N/A' }}</strong>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="sectorLetters.length > 10 && disableSectorButton == false" class="divider text-center">
|
<li *ngIf="sectorLetters.length > sectorLimit && disableSectorButton == false" class="divider text-center">
|
||||||
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore()"><i class="icon-options"></i></button>
|
<button type="button" class="btn btn-sm btn-link text-muted" (click)="loadMore()"><i class="icon-options"></i></button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Reference in a new issue