Rename component and route.

This commit is contained in:
Alexis Lahouze 2018-06-14 09:24:18 +02:00
parent 65dcd7f453
commit f33d7f1437
4 changed files with 8 additions and 8 deletions

View File

@ -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: [

View File

@ -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,
}];

View File

@ -94,7 +94,7 @@ import { OperationFormComponent } from './operationForm.component';
</div>
`
})
export class OperationNewComponent {
export class OperationEditComponent {
public operation = new Operation();
constructor(

View File

@ -42,7 +42,7 @@ import { OperationDeleteModalComponent } from './operationDeleteModal.component'
<!-- Edit operation, for non-canceled operation. -->
<a class="btn btn-success"
*ngIf="!operation.canceled"
routerLink="/account/{{account.id}}/operations/{{ operation.id }}/edit" title="edit">
routerLink="/account/{{account.id}}/operation/{{ operation.id }}/edit" title="edit">
<span class="fa fa-pencil-square-o"></span>
</a>