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:
@ -7,7 +7,7 @@ import {ProductLedgerComponent} from './product-ledger.component';
|
||||
|
||||
const productLedgerRoutes: Routes = [
|
||||
{
|
||||
path: 'ProductLedger',
|
||||
path: '',
|
||||
component: ProductLedgerComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
@ -19,7 +19,7 @@ const productLedgerRoutes: Routes = [
|
||||
runGuardsAndResolvers: 'always'
|
||||
},
|
||||
{
|
||||
path: 'ProductLedger/:id',
|
||||
path: ':id',
|
||||
component: ProductLedgerComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
|
||||
@ -10,7 +10,7 @@ import * as moment from 'moment';
|
||||
import {ProductLedgerDataSource} from './product-ledger-datasource';
|
||||
import {ProductLedger} from './product-ledger';
|
||||
import {ProductLedgerService} from './product-ledger.service';
|
||||
import {Product} from '../product/product';
|
||||
import {Product} from '../core/product';
|
||||
import {ProductService} from '../product/product.service';
|
||||
|
||||
@Component({
|
||||
@ -108,7 +108,7 @@ export class ProductLedgerComponent implements OnInit {
|
||||
|
||||
show() {
|
||||
const l = this.prepareSubmit();
|
||||
this.router.navigate(['ProductLedger', l.product.id], {
|
||||
this.router.navigate(['product-ledger', l.product.id], {
|
||||
queryParams: {
|
||||
startDate: l.startDate,
|
||||
finishDate: l.finishDate
|
||||
|
||||
@ -9,7 +9,7 @@ const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
|
||||
const url = '/api/ProductLedger';
|
||||
const url = '/api/product-ledger';
|
||||
const serviceName = 'ProductLedgerService';
|
||||
|
||||
@Injectable({
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import {Product} from '../product/product';
|
||||
import {Product} from '../core/product';
|
||||
|
||||
export class ProductLedgerItem {
|
||||
date: string;
|
||||
|
||||
Reference in New Issue
Block a user