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:
1 parent
fea48e1a3e
commit
72044476a8
184 files changed
+786
-664
No files matched your search
@@ -3,7 +3,7 @@ import {Observable} from 'rxjs/internal/Observable';
|
||||
import {catchError} from 'rxjs/operators';
|
||||
import {HttpClient, HttpHeaders} from '@angular/common/http';
|
||||
import {ErrorLoggerService} from '../core/error-logger.service';
|
||||
import {Product} from '../product/product';
|
||||
import {Product} from '../core/product';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
@@ -18,7 +18,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
getLockInformation(): Observable<any> {
|
||||
const url = '/api/LockInformation';
|
||||
const url = '/api/lock-information';
|
||||
return <Observable<any>>this.http.get<any>(url)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `getLockInformation`))
|
||||
@@ -26,7 +26,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
setLockInformation(lockInformation: any): Observable<any> {
|
||||
const url = '/api/LockInformation';
|
||||
const url = '/api/lock-information';
|
||||
return <Observable<any>>this.http.post<any>(url, lockInformation)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `setLockInformation`))
|
||||
@@ -34,7 +34,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
deleteLockInformation(): Observable<any> {
|
||||
const url = '/api/LockInformation';
|
||||
const url = '/api/lock-information';
|
||||
return <Observable<any>>this.http.delete<any>(url)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `deleteLockInformation`))
|
||||
@@ -42,7 +42,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
resetStock(resetDate: string, stockDate: string, product: Product, quantity: number): Observable<boolean> {
|
||||
const url = '/api/ResetStock/';
|
||||
const url = '/api/reset-stock';
|
||||
return <Observable<any>>this.http.post<any>(`${url}/${product.id}`, {
|
||||
stockDate: stockDate,
|
||||
resetDate: resetDate,
|
||||
@@ -54,7 +54,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
rebaseDatabase(date: string): Observable<boolean> {
|
||||
const url = '/api/Rebase';
|
||||
const url = '/api/rebase';
|
||||
return <Observable<any>>this.http.post<any>(`${url}/${date}`, {})
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `rebaseDatabase`))
|
||||
@@ -62,7 +62,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
setMaintenance(enable: boolean): Observable<any> {
|
||||
const url = '/api/Maintenance';
|
||||
const url = '/api/maintenance';
|
||||
return <Observable<any>>this.http.post<any>(url, {enabled: enable})
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `setMaintenance`))
|
||||
@@ -70,7 +70,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
getMaintenance(): Observable<any> {
|
||||
const url = '/api/Maintenance';
|
||||
const url = '/api/maintenance';
|
||||
return <Observable<any>>this.http.get<any>(url)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `getMaintenance`))
|
||||
@@ -78,7 +78,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
checkDatabaseIntegrity(): Observable<any> {
|
||||
const url = '/api/DbIntegrity';
|
||||
const url = '/api/db-integrity';
|
||||
return <Observable<any>>this.http.post<any>(url, {})
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `checkDatabaseIntegrity`))
|
||||
|
||||
Reference in new issue
Block a user