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; }