From eb560a6c187c928fb2d5d4b6cbc3066fdbdd86dc Mon Sep 17 00:00:00 2001 From: piratefinn Date: Wed, 28 Feb 2018 12:02:01 +0000 Subject: [PATCH] added initial essential branch checkbox --- src/app/dashboard/add-data.component.html | 9 +++++++++ src/app/dashboard/add-data.component.ts | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/dashboard/add-data.component.html b/src/app/dashboard/add-data.component.html index c413237..2f079f5 100644 --- a/src/app/dashboard/add-data.component.html +++ b/src/app/dashboard/add-data.component.html @@ -24,6 +24,15 @@ Enter the amount spent, such as 5.35 for £5.35. +
+ +
+
+ +
+ Choose if the purchase is deemed essential for budgeting purposes. +
+
diff --git a/src/app/dashboard/add-data.component.ts b/src/app/dashboard/add-data.component.ts index 48622bf..1f0f569 100644 --- a/src/app/dashboard/add-data.component.ts +++ b/src/app/dashboard/add-data.component.ts @@ -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; }