Prepare Edit and New separation.
This commit is contained in:
parent
c92b1bed11
commit
45207d6500
@ -19,10 +19,14 @@ import { OperationRowComponent } from './operationRow.component';
|
||||
import { CategoryService } from './category.service';
|
||||
import { OperationService } from './operation.service';
|
||||
import { OperationListComponent } from './operationList.component';
|
||||
import { OperationNewComponent } from './operationNew.component';
|
||||
import { OperationEditComponent } from './operationEdit.component';
|
||||
import { OperationDeleteModalComponent } from './operationDeleteModal.component';
|
||||
import { OperationFormComponent } from './operationForm.component';
|
||||
import { OperationEditModalComponent } from './operationEditModal.component';
|
||||
import { OperationListState } from './operation.states';
|
||||
import { OperationNewState } from './operation.states';
|
||||
import { OperationEditState } from './operation.states';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -30,7 +34,9 @@ import { OperationListState } from './operation.states';
|
||||
CommonModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule.forChild([
|
||||
OperationListState
|
||||
OperationListState,
|
||||
OperationNewState,
|
||||
OperationEditState
|
||||
]),
|
||||
NgLoggerModule,
|
||||
ToastrModule,
|
||||
@ -48,6 +54,8 @@ import { OperationListState } from './operation.states';
|
||||
CategoryChartComponent,
|
||||
OperationRowComponent,
|
||||
OperationListComponent,
|
||||
OperationEditComponent,
|
||||
OperationNewComponent,
|
||||
OperationDeleteModalComponent,
|
||||
OperationFormComponent,
|
||||
OperationEditModalComponent,
|
||||
|
@ -1,9 +1,21 @@
|
||||
// vim: set tw=80 ts=2 sw=2 sts=2 :
|
||||
|
||||
import { OperationListComponent } from './operationList.component';
|
||||
import { OperationNewComponent } from './operationNew.component';
|
||||
import { OperationEditComponent } from './operationEdit.component';
|
||||
|
||||
export const OperationListState = {
|
||||
path: 'account/:accountId/operations',
|
||||
component: OperationListComponent,
|
||||
onSameUrlNavigation: 'reload'
|
||||
}
|
||||
};
|
||||
|
||||
export const OperationNewState = {
|
||||
path: 'account/:accountId/operations/new',
|
||||
component: OperationNewComponent,
|
||||
};
|
||||
|
||||
export const OperationEditState = {
|
||||
path: 'account/:accountId/operations/:operationId/edit',
|
||||
component: OperationEditComponent,
|
||||
};
|
||||
|
20
src/operations/operationEdit.component.ts
Normal file
20
src/operations/operationEdit.component.ts
Normal file
@ -0,0 +1,20 @@
|
||||
// vim: set tw=80 ts=2 sw=2 sts=2 :
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'operation-edit',
|
||||
template: `
|
||||
<div>
|
||||
<div class="row">
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class OperationEditComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
|
||||
}
|
||||
}
|
||||
|
19
src/operations/operationNew.component.ts
Normal file
19
src/operations/operationNew.component.ts
Normal file
@ -0,0 +1,19 @@
|
||||
// vim: set tw=80 ts=2 sw=2 sts=2 :
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'operation-new',
|
||||
template: `
|
||||
<div>
|
||||
<div class="row">
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class OperationNewComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user