added initial essential branch checkbox
This commit is contained in:
parent
46e2efeaba
commit
f6dd18bfc8
2 changed files with 13 additions and 2 deletions
|
@ -24,6 +24,15 @@
|
||||||
<span class="help-block">Enter the amount spent, such as 5.35 for £5.35.</span>
|
<span class="help-block">Enter the amount spent, such as 5.35 for £5.35.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-3 form-control-label" for="text-input"><strong>Essential Purchase</strong></label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="checkbox" class="form-control" [(ngModel)]="essentialPurchase" (ngModelChange)="transactionFormValidate()">
|
||||||
|
</div>
|
||||||
|
<span class="help-block">Choose if the purchase is deemed essential for budgeting purposes.</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-md-3 form-control-label" for="text-input">Budget Type</label>
|
<label class="col-md-3 form-control-label" for="text-input">Budget Type</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
|
|
@ -32,6 +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;
|
||||||
transactionAdditionType = 1;
|
transactionAdditionType = 1;
|
||||||
storeList = [];
|
storeList = [];
|
||||||
showAddStore = false;
|
showAddStore = false;
|
||||||
|
@ -196,6 +197,7 @@ export class AddDataComponent implements OnInit {
|
||||||
purchase_time : purchaseTime,
|
purchase_time : purchaseTime,
|
||||||
organisation_id : this.organisationId,
|
organisation_id : this.organisationId,
|
||||||
category : this.categoryId,
|
category : this.categoryId,
|
||||||
|
essential : this.essentialPurchase,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -204,7 +206,7 @@ export class AddDataComponent implements OnInit {
|
||||||
transaction_value : this.amount,
|
transaction_value : this.amount,
|
||||||
purchase_time : purchaseTime,
|
purchase_time : purchaseTime,
|
||||||
organisation_id : this.organisationId,
|
organisation_id : this.organisationId,
|
||||||
category : this.categoryId,
|
essential : this.essentialPurchase,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -216,7 +218,7 @@ export class AddDataComponent implements OnInit {
|
||||||
street_name : this.submitOrg.street_name,
|
street_name : this.submitOrg.street_name,
|
||||||
town : this.submitOrg.town,
|
town : this.submitOrg.town,
|
||||||
postcode : this.submitOrg.postcode,
|
postcode : this.submitOrg.postcode,
|
||||||
category : this.categoryId,
|
essential : this.essentialPurchase,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue