Feature: Lazy loading

Lazy loaded everything
TODO: The cash flow module when clicking on sub-links, it reloads the whole page, it needs to be diagnosed and fixed, this problem also exists in the other modules
TODO: Rename folders and modules such as account to accounts to match the url
This commit is contained in:
Amritanshu
2019-06-13 16:36:43 +05:30
parent fea48e1a3e
commit 72044476a8
184 changed files with 786 additions and 664 deletions
@@ -5,8 +5,8 @@ import { MatDialog } from '@angular/material/dialog';
import {ActivatedRoute, Router} from '@angular/router';
import {BehaviorSubject, Observable, of as observableOf} from 'rxjs';
import {EmployeeBenefitsDataSource} from './employee-benefits-datasource';
import {VoucherService} from '../journal/voucher.service';
import {EmployeeBenefit, Journal, Voucher} from '../journal/voucher';
import {VoucherService} from '../core/voucher.service';
import {EmployeeBenefit, Journal, Voucher} from '../core/voucher';
import * as moment from 'moment';
import {AuthService} from '../auth/auth.service';
import {ConfirmDialogComponent} from '../shared/confirm-dialog/confirm-dialog.component';
@@ -14,7 +14,7 @@ import {ToasterService} from '../core/toaster.service';
import {debounceTime, distinctUntilChanged, map, startWith, switchMap} from 'rxjs/operators';
import {Employee} from '../employee/employee';
import {EmployeeService} from '../employee/employee.service';
import {Account} from '../account/account';
import {Account} from '../core/account';
@Component({
selector: 'app-employee-benefits',
@@ -195,7 +195,7 @@ export class EmployeeBenefitsComponent implements OnInit, AfterViewInit {
.subscribe(
(result) => {
this.toaster.show('Success', '');
this.router.navigate(['/EmployeeBenefits', result.id]);
this.router.navigate(['/employee-benefits', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
@@ -214,7 +214,7 @@ export class EmployeeBenefitsComponent implements OnInit, AfterViewInit {
.subscribe(
(result) => {
this.toaster.show('Success', '');
this.router.navigate(['/EmployeeBenefits'], {replaceUrl: true});
this.router.navigate(['/employee-benefits'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);