removed unnecessary console logs and cleaned essential input
This commit is contained in:
parent
eb560a6c18
commit
96cbe87013
2 changed files with 4 additions and 7 deletions
|
@ -25,12 +25,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-md-3 form-control-label" for="text-input"><strong>Essential Purchase</strong></label>
|
<label class="col-md-3 form-control-label" for="text-input">Essential Purchase</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="checkbox" class="form-control" [(ngModel)]="essentialPurchase" (ngModelChange)="transactionFormValidate()">
|
<input type="checkbox" class="mr-auto" [(ngModel)]="essentialPurchase" (ngModelChange)="transactionFormValidate()">
|
||||||
</div>
|
</div>
|
||||||
<span class="help-block">Choose if the purchase is deemed essential for budgeting purposes.</span>
|
<span class="help-block">Tick if the purchase is deemed an essential purchase for budgeting purposes.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
|
|
|
@ -32,7 +32,7 @@ export class AddDataComponent implements OnInit {
|
||||||
amount: number;
|
amount: number;
|
||||||
// Assumes Groceries is 1st category
|
// Assumes Groceries is 1st category
|
||||||
categoryId: number = 1;
|
categoryId: number = 1;
|
||||||
essentialPurchase: any;
|
essentialPurchase = false;
|
||||||
transactionAdditionType = 1;
|
transactionAdditionType = 1;
|
||||||
storeList = [];
|
storeList = [];
|
||||||
showAddStore = false;
|
showAddStore = false;
|
||||||
|
@ -89,12 +89,9 @@ export class AddDataComponent implements OnInit {
|
||||||
private setCategoryList(data: any) {
|
private setCategoryList(data: any) {
|
||||||
let categoryIdList = Object.keys(data.ids).map(key => data.ids[key]);
|
let categoryIdList = Object.keys(data.ids).map(key => data.ids[key]);
|
||||||
this.categoryNameList = Object.keys(data.names).map(key => data.names[key]);
|
this.categoryNameList = Object.keys(data.names).map(key => data.names[key]);
|
||||||
console.log(categoryIdList);
|
|
||||||
let halfLength = Math.floor(categoryIdList.length / 2);
|
let halfLength = Math.floor(categoryIdList.length / 2);
|
||||||
this.leftCategoryIdList = categoryIdList.splice(0, halfLength);
|
this.leftCategoryIdList = categoryIdList.splice(0, halfLength);
|
||||||
console.log(this.leftCategoryIdList);
|
|
||||||
this.rightCategoryIdList = categoryIdList;
|
this.rightCategoryIdList = categoryIdList;
|
||||||
console.log(this.rightCategoryIdList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getMinDate() {
|
getMinDate() {
|
||||||
|
|
Reference in a new issue