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 { OperationRowComponent } from './operationRow.component';
|
||||||
import { CategoryService } from './category.service';
|
import { CategoryService } from './category.service';
|
||||||
import { OperationService } from './operation.service';
|
import { OperationService } from './operation.service';
|
||||||
|
import { OperationEditComponent } from './operationEdit.component';
|
||||||
import { OperationListComponent } from './operationList.component';
|
import { OperationListComponent } from './operationList.component';
|
||||||
import { OperationNewComponent } from './operationNew.component';
|
|
||||||
import { OperationDeleteModalComponent } from './operationDeleteModal.component';
|
import { OperationDeleteModalComponent } from './operationDeleteModal.component';
|
||||||
import { OperationRoutes } from './operation.states';
|
import { OperationRoutes } from './operation.states';
|
||||||
|
|
||||||
@ -46,8 +46,8 @@ import { OperationRoutes } from './operation.states';
|
|||||||
BalanceChartComponent,
|
BalanceChartComponent,
|
||||||
CategoryChartComponent,
|
CategoryChartComponent,
|
||||||
OperationRowComponent,
|
OperationRowComponent,
|
||||||
|
OperationEditComponent,
|
||||||
OperationListComponent,
|
OperationListComponent,
|
||||||
OperationNewComponent,
|
|
||||||
OperationDeleteModalComponent,
|
OperationDeleteModalComponent,
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
|
|
||||||
import { OperationListComponent } from './operationList.component';
|
import { OperationListComponent } from './operationList.component';
|
||||||
import { OperationNewComponent } from './operationNew.component';
|
import { OperationEditComponent } from './operationEdit.component';
|
||||||
|
|
||||||
export const OperationRoutes: Routes = [{
|
export const OperationRoutes: Routes = [{
|
||||||
path: 'account/:accountId/operations',
|
path: 'account/:accountId/operations',
|
||||||
component: OperationListComponent,
|
component: OperationListComponent,
|
||||||
}, {
|
}, {
|
||||||
path: 'account/:accountId/operations/new',
|
path: 'account/:accountId/operations/new',
|
||||||
component: OperationNewComponent,
|
component: OperationEditComponent,
|
||||||
}, {
|
}, {
|
||||||
path: 'account/:accountId/operations/:operationId/edit',
|
path: 'account/:accountId/operation/:operationId/edit',
|
||||||
component: OperationNewComponent,
|
component: OperationEditComponent,
|
||||||
}];
|
}];
|
||||||
|
@ -94,7 +94,7 @@ import { OperationFormComponent } from './operationForm.component';
|
|||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class OperationNewComponent {
|
export class OperationEditComponent {
|
||||||
public operation = new Operation();
|
public operation = new Operation();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
@ -42,7 +42,7 @@ import { OperationDeleteModalComponent } from './operationDeleteModal.component'
|
|||||||
<!-- Edit operation, for non-canceled operation. -->
|
<!-- Edit operation, for non-canceled operation. -->
|
||||||
<a class="btn btn-success"
|
<a class="btn btn-success"
|
||||||
*ngIf="!operation.canceled"
|
*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>
|
<span class="fa fa-pencil-square-o"></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user