diff --git a/src/operations/operation.module.ts b/src/operations/operation.module.ts index 916d47f..3e83c39 100644 --- a/src/operations/operation.module.ts +++ b/src/operations/operation.module.ts @@ -18,8 +18,8 @@ import { CategoryChartComponent } from './categoryChart.component'; import { OperationRowComponent } from './operationRow.component'; import { CategoryService } from './category.service'; import { OperationService } from './operation.service'; +import { OperationEditComponent } from './operationEdit.component'; import { OperationListComponent } from './operationList.component'; -import { OperationNewComponent } from './operationNew.component'; import { OperationDeleteModalComponent } from './operationDeleteModal.component'; import { OperationRoutes } from './operation.states'; @@ -46,8 +46,8 @@ import { OperationRoutes } from './operation.states'; BalanceChartComponent, CategoryChartComponent, OperationRowComponent, + OperationEditComponent, OperationListComponent, - OperationNewComponent, OperationDeleteModalComponent, ], entryComponents: [ diff --git a/src/operations/operation.states.ts b/src/operations/operation.states.ts index 6f7af70..5a88a02 100644 --- a/src/operations/operation.states.ts +++ b/src/operations/operation.states.ts @@ -3,15 +3,15 @@ import { Routes } from '@angular/router'; import { OperationListComponent } from './operationList.component'; -import { OperationNewComponent } from './operationNew.component'; +import { OperationEditComponent } from './operationEdit.component'; export const OperationRoutes: Routes = [{ path: 'account/:accountId/operations', component: OperationListComponent, }, { path: 'account/:accountId/operations/new', - component: OperationNewComponent, + component: OperationEditComponent, }, { - path: 'account/:accountId/operations/:operationId/edit', - component: OperationNewComponent, + path: 'account/:accountId/operation/:operationId/edit', + component: OperationEditComponent, }]; diff --git a/src/operations/operationNew.component.ts b/src/operations/operationEdit.component.ts similarity index 99% rename from src/operations/operationNew.component.ts rename to src/operations/operationEdit.component.ts index b3777b0..125d728 100644 --- a/src/operations/operationNew.component.ts +++ b/src/operations/operationEdit.component.ts @@ -94,7 +94,7 @@ import { OperationFormComponent } from './operationForm.component'; ` }) -export class OperationNewComponent { +export class OperationEditComponent { public operation = new Operation(); constructor( diff --git a/src/operations/operationRow.component.ts b/src/operations/operationRow.component.ts index fc22cee..2bab190 100644 --- a/src/operations/operationRow.component.ts +++ b/src/operations/operationRow.component.ts @@ -42,7 +42,7 @@ import { OperationDeleteModalComponent } from './operationDeleteModal.component' + routerLink="/account/{{account.id}}/operation/{{ operation.id }}/edit" title="edit">