Fix accounts route.
This commit is contained in:
parent
01d77b22c3
commit
b753b59080
@ -1,5 +1,5 @@
|
||||
<td>
|
||||
<a [routerLink]="['/account', account.id, 'operations']">{{ account.name }}</a>
|
||||
<a [routerLink]="[account.id, 'operations']">{{ account.name }}</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@ -33,7 +33,7 @@
|
||||
<!-- Open account scheduler. -->
|
||||
<a class="btn btn-secondary"
|
||||
[hidden]="!account.id"
|
||||
[routerLink]="['/account', account.id, 'scheduler']">
|
||||
[routerLink]="[account.id, 'scheduler']">
|
||||
<span class="fa fa-clock-o"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -6,12 +6,12 @@ import { OperationListComponent } from './operationList.component';
|
||||
import { OperationEditComponent } from './operationEdit.component';
|
||||
|
||||
export const OperationRoutes: Routes = [{
|
||||
path: 'account/:accountId/operations',
|
||||
path: 'accounts/:accountId/operations',
|
||||
component: OperationListComponent,
|
||||
}, {
|
||||
path: 'account/:accountId/operations/new',
|
||||
path: 'accounts/:accountId/operations/new',
|
||||
component: OperationEditComponent,
|
||||
}, {
|
||||
path: 'account/:accountId/operations/:operationId/edit',
|
||||
path: 'accounts/:accountId/operations/:operationId/edit',
|
||||
component: OperationEditComponent,
|
||||
}];
|
||||
|
@ -89,7 +89,7 @@ export class OperationListComponent implements OnInit {
|
||||
let toDay = this.route.snapshot.queryParamMap.get('to');
|
||||
|
||||
if(! fromDay && ! toDay) {
|
||||
this.router.navigate(['account', accountId, 'operations'], {
|
||||
this.router.navigate([], {
|
||||
queryParams: {
|
||||
from: moment().startOf('month').format('YYYY-MM-DD'),
|
||||
to: moment().endOf('month').format('YYYY-MM-DD')
|
||||
|
Loading…
Reference in New Issue
Block a user