removed unnecessary console logs and cleaned essential input

This commit is contained in:
piratefinn 2018-03-01 17:07:25 +00:00
parent eb560a6c18
commit 96cbe87013
2 changed files with 4 additions and 7 deletions

View file

@ -25,12 +25,12 @@
</div>
</div>
<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="input-group">
<input type="checkbox" class="form-control" [(ngModel)]="essentialPurchase" (ngModelChange)="transactionFormValidate()">
<input type="checkbox" class="mr-auto" [(ngModel)]="essentialPurchase" (ngModelChange)="transactionFormValidate()">
</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 class="form-group row">

View file

@ -32,7 +32,7 @@ export class AddDataComponent implements OnInit {
amount: number;
// Assumes Groceries is 1st category
categoryId: number = 1;
essentialPurchase: any;
essentialPurchase = false;
transactionAdditionType = 1;
storeList = [];
showAddStore = false;
@ -89,12 +89,9 @@ export class AddDataComponent implements OnInit {
private setCategoryList(data: any) {
let categoryIdList = Object.keys(data.ids).map(key => data.ids[key]);
this.categoryNameList = Object.keys(data.names).map(key => data.names[key]);
console.log(categoryIdList);
let halfLength = Math.floor(categoryIdList.length / 2);
this.leftCategoryIdList = categoryIdList.splice(0, halfLength);
console.log(this.leftCategoryIdList);
this.rightCategoryIdList = categoryIdList;
console.log(this.rightCategoryIdList);
}
getMinDate() {