Fixed app, added ability for non category transaction changed reset form
This commit is contained in:
parent
30e236f387
commit
5fe91a536d
2 changed files with 3 additions and 5 deletions
|
@ -29,7 +29,7 @@
|
|||
<div class="col-md-9">
|
||||
<div class="input-group">
|
||||
<select type="text" class="form-control" [(ngModel)]="categoryId">
|
||||
<option value="" disabled>Choose a category</option>
|
||||
<option value="">Uncategorised</option>
|
||||
<option *ngFor="let category of categoryIdList, let i=index" [ngValue]="category" >
|
||||
{{ categoryNameList[i] }}
|
||||
</option>
|
||||
|
|
|
@ -30,7 +30,8 @@ export class AddDataComponent implements OnInit {
|
|||
organisationTown: string;
|
||||
organisationPostcode: string;
|
||||
amount: number;
|
||||
categoryId: number;
|
||||
// Assumes Groceries is 1st category
|
||||
categoryId: number = 1;
|
||||
transactionAdditionType = 1;
|
||||
storeList = [];
|
||||
showAddStore = false;
|
||||
|
@ -69,8 +70,6 @@ export class AddDataComponent implements OnInit {
|
|||
// this.myDate = new Date().toISOString().slice(0, 16);
|
||||
this.api.categoryList().subscribe(
|
||||
result => {
|
||||
this.categories = result;
|
||||
console.log(this.categories);
|
||||
this.setCategoryList(result.categories);
|
||||
},
|
||||
error => {
|
||||
|
@ -261,7 +260,6 @@ export class AddDataComponent implements OnInit {
|
|||
this.amount = null;
|
||||
this.transactionFormInvalid = true;
|
||||
this.showAddStore = false;
|
||||
this.categoryId = null;
|
||||
}
|
||||
|
||||
onSubmitPayroll() {
|
||||
|
|
Reference in a new issue