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>
|
||||
</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">
|
||||
<label class="col-md-3 form-control-label" for="text-input">Budget Type</label>
|
||||
<div class="col-md-9">
|
||||
|
|
|
@ -32,6 +32,7 @@ export class AddDataComponent implements OnInit {
|
|||
amount: number;
|
||||
// Assumes Groceries is 1st category
|
||||
categoryId: number = 1;
|
||||
essentialPurchase: any;
|
||||
transactionAdditionType = 1;
|
||||
storeList = [];
|
||||
showAddStore = false;
|
||||
|
@ -196,6 +197,7 @@ export class AddDataComponent implements OnInit {
|
|||
purchase_time : purchaseTime,
|
||||
organisation_id : this.organisationId,
|
||||
category : this.categoryId,
|
||||
essential : this.essentialPurchase,
|
||||
};
|
||||
break;
|
||||
case 2:
|
||||
|
@ -204,7 +206,7 @@ export class AddDataComponent implements OnInit {
|
|||
transaction_value : this.amount,
|
||||
purchase_time : purchaseTime,
|
||||
organisation_id : this.organisationId,
|
||||
category : this.categoryId,
|
||||
essential : this.essentialPurchase,
|
||||
};
|
||||
break;
|
||||
case 3:
|
||||
|
@ -216,7 +218,7 @@ export class AddDataComponent implements OnInit {
|
|||
street_name : this.submitOrg.street_name,
|
||||
town : this.submitOrg.town,
|
||||
postcode : this.submitOrg.postcode,
|
||||
category : this.categoryId,
|
||||
essential : this.essentialPurchase,
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
|
Reference in a new issue