{{ expense.expenseID }} |
|
- |
+
+
+
+
+ |
|
Save
diff --git a/ExpenseTracker.Client/expense-tracker/src/app/expense/expense.component.ts b/ExpenseTracker.Client/expense-tracker/src/app/expense/expense.component.ts
index 4c7bb56..3b96cc6 100644
--- a/ExpenseTracker.Client/expense-tracker/src/app/expense/expense.component.ts
+++ b/ExpenseTracker.Client/expense-tracker/src/app/expense/expense.component.ts
@@ -12,6 +12,12 @@ export class ExpenseComponent implements OnInit {
expenses: Expense[];
editCache: { [key: string]: { edit: boolean; data: Expense } } = {};
readonly newRecordId: string = "n/a";
+ readonly currencies = [ // TODO: find a better place for this
+ { id: 0, name: 'Eur' },
+ { id: 1, name: 'Gbp' },
+ { id: 2, name: 'Usd' },
+ { id: 3, name: 'Chf' },
+ ];
constructor(private expenseService: ExpenseService) { }
@@ -41,7 +47,7 @@ export class ExpenseComponent implements OnInit {
var record = this.editCache[id].data;
delete record.expenseID;
this.expenseService.create(record).subscribe((result) => {
- Object.assign(this.expenses[this.expenses.length - 1] , result);
+ Object.assign(this.expenses[this.expenses.length - 1], result);
this.updateEditCache();
});
}
diff --git a/ExpenseTracker.Client/expense-tracker/src/app/expense/expense.module.ts b/ExpenseTracker.Client/expense-tracker/src/app/expense/expense.module.ts
index c7a32c8..c6800ca 100644
--- a/ExpenseTracker.Client/expense-tracker/src/app/expense/expense.module.ts
+++ b/ExpenseTracker.Client/expense-tracker/src/app/expense/expense.module.ts
@@ -5,7 +5,7 @@ import { ExpenseService } from '../shared/services/expense.service';
import { NzTableModule } from 'ng-zorro-antd/table';
import { FormsModule } from '@angular/forms';
import { NzButtonModule } from 'ng-zorro-antd/button';
-
+import { NzSelectModule } from 'ng-zorro-antd/select';
@NgModule({
declarations: [ExpenseComponent],
@@ -13,6 +13,7 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
CommonModule,
NzTableModule,
NzButtonModule,
+ NzSelectModule,
FormsModule
],
providers: [
|