Rename component and route.
This commit is contained in:
parent
65dcd7f453
commit
f33d7f1437
@ -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: [
|
||||
|
@ -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,
|
||||
}];
|
||||
|
@ -94,7 +94,7 @@ import { OperationFormComponent } from './operationForm.component';
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class OperationNewComponent {
|
||||
export class OperationEditComponent {
|
||||
public operation = new Operation();
|
||||
|
||||
constructor(
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user