All Masters Done!!
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
export class Printer {
|
||||
id: string;
|
||||
name: string;
|
||||
address: string;
|
||||
cutCode: string;
|
||||
name?: string;
|
||||
address?: string;
|
||||
cutCode?: string;
|
||||
}
|
||||
|
||||
@ -1,16 +1,7 @@
|
||||
import {MenuCategory} from './menu-category';
|
||||
import {Printer} from './printer';
|
||||
import { MenuCategory } from './menu-category';
|
||||
import { Printer } from './printer';
|
||||
|
||||
export class SectionPrinter {
|
||||
id: string;
|
||||
menuCategories: SectionPrinterItem[];
|
||||
|
||||
public constructor(init?: Partial<SectionPrinter>) {
|
||||
Object.assign(this, init);
|
||||
}
|
||||
}
|
||||
|
||||
export class SectionPrinterItem {
|
||||
menuCategory: MenuCategory;
|
||||
printer: Printer;
|
||||
copies: number;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Modifier } from '../core/modifier';
|
||||
import { ErrorLoggerService } from '../core/error-logger.service';
|
||||
|
||||
@ -9,7 +9,7 @@ const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
|
||||
const url = '/v1/modifiers';
|
||||
const url = '/api/modifiers';
|
||||
const serviceName = 'ModifierService';
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
@ -19,7 +19,7 @@ export class ModifierService {
|
||||
}
|
||||
|
||||
get(id: string): Observable<Modifier> {
|
||||
const getUrl: string = (id === null) ? `${url}/new` : `${url}/${id}`;
|
||||
const getUrl: string = (id === null) ? url : `${url}/${id}`;
|
||||
return <Observable<Modifier>>this.http.get<Modifier>(getUrl)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`))
|
||||
@ -27,15 +27,14 @@ export class ModifierService {
|
||||
}
|
||||
|
||||
list(): Observable<Modifier[]> {
|
||||
const options = {params: new HttpParams().set('l', '')};
|
||||
return <Observable<Modifier[]>>this.http.get<Modifier[]>(url, options)
|
||||
return <Observable<Modifier[]>>this.http.get<Modifier[]>(`${url}/list`)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'getList'))
|
||||
);
|
||||
}
|
||||
|
||||
save(modifier: Modifier): Observable<Modifier> {
|
||||
return <Observable<Modifier>>this.http.post<Modifier>(`${url}/new`, modifier, httpOptions)
|
||||
return <Observable<Modifier>>this.http.post<Modifier>(url, modifier, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save'))
|
||||
);
|
||||
@ -48,13 +47,6 @@ export class ModifierService {
|
||||
);
|
||||
}
|
||||
|
||||
updateSortOrder(list: Modifier[]): Observable<boolean> {
|
||||
return <Observable<boolean>>this.http.post<Modifier[]>(url, list, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'updateSortOrder'))
|
||||
);
|
||||
}
|
||||
|
||||
saveOrUpdate(modifier: Modifier): Observable<Modifier> {
|
||||
if (!modifier.id) {
|
||||
return this.save(modifier);
|
||||
@ -69,20 +61,4 @@ export class ModifierService {
|
||||
catchError(this.log.handleError(serviceName, 'delete'))
|
||||
);
|
||||
}
|
||||
|
||||
autocomplete(term: string): Observable<Modifier[]> {
|
||||
const options = {params: new HttpParams().set('t', term)};
|
||||
return <Observable<Modifier[]>>this.http.get<Modifier[]>(url, options)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'autocomplete'))
|
||||
);
|
||||
}
|
||||
|
||||
balance(id: string, date: string): Observable<number> {
|
||||
const options = {params: new HttpParams().set('b', 'true').set('d', date)};
|
||||
return <Observable<number>>this.http.get<number>(`${url}/${id}`, options)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'balance'))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
|
||||
import {ErrorLoggerService} from '../core/error-logger.service';
|
||||
import {catchError} from 'rxjs/operators';
|
||||
import {Observable} from 'rxjs/internal/Observable';
|
||||
import {Printer} from '../core/printer';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { ErrorLoggerService } from '../core/error-logger.service';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { Printer } from '../core/printer';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
const url = '/v1/printers';
|
||||
const url = '/api/printers';
|
||||
const serviceName = 'PrinterService';
|
||||
|
||||
@Injectable({
|
||||
@ -19,7 +19,7 @@ export class PrinterService {
|
||||
}
|
||||
|
||||
get(id: string): Observable<Printer> {
|
||||
const getUrl: string = (id === null) ? `${url}/new` : `${url}/${id}`;
|
||||
const getUrl: string = (id === null) ? url : `${url}/${id}`;
|
||||
return <Observable<Printer>>this.http.get<Printer>(getUrl)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`))
|
||||
@ -27,15 +27,14 @@ export class PrinterService {
|
||||
}
|
||||
|
||||
list(): Observable<Printer[]> {
|
||||
const options = {params: new HttpParams().set('l', '')};
|
||||
return <Observable<Printer[]>>this.http.get<Printer[]>(url, options)
|
||||
return <Observable<Printer[]>>this.http.get<Printer[]>(`${url}/list`)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
);
|
||||
}
|
||||
|
||||
save(printer: Printer): Observable<Printer> {
|
||||
return <Observable<Printer>>this.http.post<Printer>(`${url}/new`, printer, httpOptions)
|
||||
return <Observable<Printer>>this.http.post<Printer>(url, printer, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save'))
|
||||
);
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
import { DataSource } from '@angular/cdk/collections';
|
||||
import { Observable } from 'rxjs';
|
||||
import { SectionPrinterItem } from '../core/section-printer';
|
||||
import { SectionPrinter } from '../core/section-printer';
|
||||
|
||||
|
||||
export class SectionPrinterDataSource extends DataSource<SectionPrinterItem> {
|
||||
export class SectionPrinterDataSource extends DataSource<SectionPrinter> {
|
||||
|
||||
constructor(private data: Observable<SectionPrinterItem[]>) {
|
||||
constructor(private data: Observable<SectionPrinter[]>) {
|
||||
super();
|
||||
}
|
||||
|
||||
connect(): Observable<SectionPrinterItem[]> {
|
||||
connect(): Observable<SectionPrinter[]> {
|
||||
return this.data;
|
||||
}
|
||||
|
||||
|
||||
@ -7,12 +7,12 @@ import { SectionPrinterService } from './section-printer.service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SectionPrinterResolver implements Resolve<SectionPrinter> {
|
||||
export class SectionPrinterResolver implements Resolve<SectionPrinter[]> {
|
||||
|
||||
constructor(private ser: SectionPrinterService, private router: Router) {
|
||||
}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<SectionPrinter> {
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<SectionPrinter[]> {
|
||||
const id = route.paramMap.get('id');
|
||||
return this.ser.get(id);
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<!-- Menu Category Column -->
|
||||
<ng-container matColumnDef="menuCategory">
|
||||
<mat-header-cell *matHeaderCellDef>Menu Category</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.menuCategory.name}}</mat-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.menuCategory?.name || 'Default'}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Printer Column -->
|
||||
@ -59,7 +59,7 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
||||
<button mat-raised-button color="warn" *ngIf="item.id" (click)="confirmDelete()">Delete</button>
|
||||
<button mat-raised-button color="warn" *ngIf="sectionId" (click)="confirmDelete()">Delete</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router} from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { SectionPrinter } from '../core/section-printer';
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
@ -21,11 +21,11 @@ export class SectionPrinterComponent implements OnInit {
|
||||
@ViewChild('section', {static: true}) sectionElement: ElementRef;
|
||||
form: FormGroup;
|
||||
dataSource: SectionPrinterDataSource;
|
||||
public itemObservable = new BehaviorSubject<SectionPrinter>(new SectionPrinter());
|
||||
item: SectionPrinter;
|
||||
public listObservable = new BehaviorSubject<SectionPrinter[]>([]);
|
||||
list: SectionPrinter[];
|
||||
sections: Section[];
|
||||
printers: Printer[];
|
||||
|
||||
sectionId: string;
|
||||
displayedColumns = ['menuCategory', 'printer', 'copies'];
|
||||
|
||||
constructor(
|
||||
@ -37,6 +37,7 @@ export class SectionPrinterComponent implements OnInit {
|
||||
private ser: SectionPrinterService
|
||||
) {
|
||||
this.createForm();
|
||||
route.params.pipe(map(p => p.id)).subscribe(x => this.sectionId = x);
|
||||
}
|
||||
|
||||
createForm() {
|
||||
@ -48,23 +49,23 @@ export class SectionPrinterComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { item: SectionPrinter, sections: Section[], printers: Printer[] }) => {
|
||||
.subscribe((data: { list: SectionPrinter[], sections: Section[], printers: Printer[] }) => {
|
||||
this.sections = data.sections;
|
||||
this.printers = data.printers;
|
||||
this.showItem(data.item);
|
||||
this.dataSource = new SectionPrinterDataSource(this.itemObservable.pipe(map(p => p.menuCategories)));
|
||||
this.itemObservable.next(this.item);
|
||||
this.showItem(data.list);
|
||||
this.dataSource = new SectionPrinterDataSource(this.listObservable);
|
||||
this.listObservable.next(this.list);
|
||||
});
|
||||
}
|
||||
|
||||
showItem(item: SectionPrinter) {
|
||||
this.item = item;
|
||||
this.form.get('section').setValue(this.item.id);
|
||||
showItem(list: SectionPrinter[]) {
|
||||
this.list = list;
|
||||
this.form.get('section').setValue(this.sectionId);
|
||||
this.form.setControl('menuCategories', this.fb.array(
|
||||
this.item.menuCategories.map(
|
||||
this.list.map(
|
||||
x => this.fb.group({
|
||||
menuCategory: x.menuCategory.name,
|
||||
printer: x.printer.id,
|
||||
menuCategory: (x.menuCategory?.name || 'Default'),
|
||||
printer: x.printer?.id,
|
||||
copies: '' + x.copies
|
||||
})
|
||||
)
|
||||
@ -73,10 +74,11 @@ export class SectionPrinterComponent implements OnInit {
|
||||
|
||||
|
||||
save() {
|
||||
this.ser.save(this.getItem())
|
||||
this.ser.save(this.sectionId, this.getItem())
|
||||
.subscribe(
|
||||
(result) => {
|
||||
(result: SectionPrinter[]) => {
|
||||
this.toaster.show('Success', '');
|
||||
this.showItem(result);
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Danger', error.error);
|
||||
@ -85,7 +87,7 @@ export class SectionPrinterComponent implements OnInit {
|
||||
}
|
||||
|
||||
delete() {
|
||||
this.ser.delete(this.item.id)
|
||||
this.ser.delete(this.sectionId)
|
||||
.subscribe(
|
||||
(result) => {
|
||||
this.toaster.show('Success', '');
|
||||
@ -109,20 +111,19 @@ export class SectionPrinterComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getItem(): SectionPrinter {
|
||||
getItem(): SectionPrinter[] {
|
||||
const formModel = this.form.value;
|
||||
this.item.id = formModel.section;
|
||||
this.sectionId = formModel.section;
|
||||
const array = this.form.get('menuCategories') as FormArray;
|
||||
this.item.menuCategories.forEach((item, index) => {
|
||||
this.list.forEach((item, index) => {
|
||||
const cont = array.controls[index].value;
|
||||
item.printer.id = cont.printer;
|
||||
item.printer = {id: cont.printer};
|
||||
item.copies = +cont.copies;
|
||||
});
|
||||
return this.item;
|
||||
return this.list;
|
||||
}
|
||||
|
||||
show(val: any) {
|
||||
this.router.navigate(['/section-printers', val.value]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
|
||||
import {ErrorLoggerService} from '../core/error-logger.service';
|
||||
import {catchError} from 'rxjs/operators';
|
||||
import {Observable} from 'rxjs/internal/Observable';
|
||||
import {SectionPrinter, SectionPrinterItem} from '../core/section-printer';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { ErrorLoggerService } from '../core/error-logger.service';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { SectionPrinter } from '../core/section-printer';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
const url = '/v1/section-printers';
|
||||
const url = '/api/section-printers';
|
||||
const serviceName = 'SectionPrinterService';
|
||||
|
||||
@Injectable({
|
||||
@ -18,31 +18,31 @@ export class SectionPrinterService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {
|
||||
}
|
||||
|
||||
get(id: string): Observable<SectionPrinter> {
|
||||
get(id: string): Observable<SectionPrinter[]> {
|
||||
const getUrl: string = (id === null) ? `${url}` : `${url}/${id}`;
|
||||
return <Observable<SectionPrinter>>this.http.get<SectionPrinter>(getUrl)
|
||||
return <Observable<SectionPrinter[]>>this.http.get<SectionPrinter[]>(getUrl)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`))
|
||||
);
|
||||
}
|
||||
|
||||
item(id: string, menuCategoryId: string): Observable<SectionPrinterItem> {
|
||||
const options = {params: new HttpParams().set('m', menuCategoryId)};
|
||||
return <Observable<SectionPrinterItem>>this.http.get<SectionPrinterItem>(`${url}/${id}`, options)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
);
|
||||
}
|
||||
// item(id: string, menuCategoryId: string): Observable<SectionPrinterItem> {
|
||||
// const options = {params: new HttpParams().set('m', menuCategoryId)};
|
||||
// return <Observable<SectionPrinterItem>>this.http.get<SectionPrinterItem>(`${url}/${id}`, options)
|
||||
// .pipe(
|
||||
// catchError(this.log.handleError(serviceName, 'list'))
|
||||
// );
|
||||
// }
|
||||
|
||||
save(item: SectionPrinter): Observable<SectionPrinter> {
|
||||
return <Observable<SectionPrinter>>this.http.post<SectionPrinter>(`${url}/${item.id}`, item, httpOptions)
|
||||
save(sectionId: string, list: SectionPrinter[]): Observable<SectionPrinter[]> {
|
||||
return <Observable<SectionPrinter[]>>this.http.post<SectionPrinter[]>(`${url}/${sectionId}`, list, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save'))
|
||||
);
|
||||
}
|
||||
|
||||
delete(id: string): Observable<SectionPrinter> {
|
||||
return <Observable<SectionPrinter>>this.http.delete<SectionPrinter>(`${url}/${id}`, httpOptions)
|
||||
delete(id: string): Observable<SectionPrinter[]> {
|
||||
return <Observable<SectionPrinter[]>>this.http.delete<SectionPrinter[]>(`${url}/${id}`, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'delete'))
|
||||
);
|
||||
|
||||
@ -16,7 +16,7 @@ const sectionPrinterRoutes: Routes = [
|
||||
permission: 'Section Printers'
|
||||
},
|
||||
resolve: {
|
||||
item: SectionPrinterResolver,
|
||||
list: SectionPrinterResolver,
|
||||
sections: SectionListResolver,
|
||||
printers: PrinterListResolver
|
||||
}
|
||||
@ -29,7 +29,7 @@ const sectionPrinterRoutes: Routes = [
|
||||
permission: 'Section Printers'
|
||||
},
|
||||
resolve: {
|
||||
item: SectionPrinterResolver,
|
||||
list: SectionPrinterResolver,
|
||||
sections: SectionListResolver,
|
||||
printers: PrinterListResolver
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
|
||||
import {ErrorLoggerService} from '../core/error-logger.service';
|
||||
import {catchError} from 'rxjs/operators';
|
||||
import {Observable} from 'rxjs/internal/Observable';
|
||||
import {Section} from '../core/section';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { ErrorLoggerService } from '../core/error-logger.service';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { Section } from '../core/section';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
const url = '/v1/sections';
|
||||
const url = '/api/sections';
|
||||
const serviceName = 'SectionService';
|
||||
|
||||
@Injectable({
|
||||
@ -19,7 +19,7 @@ export class SectionService {
|
||||
}
|
||||
|
||||
get(id: string): Observable<Section> {
|
||||
const getUrl: string = (id === null) ? `${url}/new` : `${url}/${id}`;
|
||||
const getUrl: string = (id === null) ? url : `${url}/${id}`;
|
||||
return <Observable<Section>>this.http.get<Section>(getUrl)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`))
|
||||
@ -27,15 +27,14 @@ export class SectionService {
|
||||
}
|
||||
|
||||
list(): Observable<Section[]> {
|
||||
const options = {params: new HttpParams().set('l', '')};
|
||||
return <Observable<Section[]>>this.http.get<Section[]>(url, options)
|
||||
return <Observable<Section[]>>this.http.get<Section[]>(`${url}/list`)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
);
|
||||
}
|
||||
|
||||
save(section: Section): Observable<Section> {
|
||||
return <Observable<Section>>this.http.post<Section>(`${url}/new`, section, httpOptions)
|
||||
return <Observable<Section>>this.http.post<Section>(url, section, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save'))
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@ import { Table } from '../core/table';
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
const url = '/v1/tables';
|
||||
const url = '/api/tables';
|
||||
const serviceName = 'TableService';
|
||||
|
||||
@Injectable({
|
||||
@ -19,7 +19,7 @@ export class TableService {
|
||||
}
|
||||
|
||||
get(id: string): Observable<Table> {
|
||||
const getUrl: string = (id === null) ? `${url}/new` : `${url}/${id}`;
|
||||
const getUrl: string = (id === null) ? url : `${url}/${id}`;
|
||||
return <Observable<Table>>this.http.get<Table>(getUrl)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`))
|
||||
@ -27,23 +27,21 @@ export class TableService {
|
||||
}
|
||||
|
||||
list(): Observable<Table[]> {
|
||||
const options = {params: new HttpParams().set('l', '')};
|
||||
return <Observable<Table[]>>this.http.get<Table[]>(url, options)
|
||||
return <Observable<Table[]>>this.http.get<Table[]>(`${url}/list`)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
);
|
||||
}
|
||||
|
||||
running(): Observable<Table[]> {
|
||||
const options = {params: new HttpParams().set('r', '')};
|
||||
return <Observable<Table[]>>this.http.get<Table[]>(url, options)
|
||||
return <Observable<Table[]>>this.http.get<Table[]>(`${url}/running`)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'running'))
|
||||
);
|
||||
}
|
||||
|
||||
save(tables: Table): Observable<Table> {
|
||||
return <Observable<Table>>this.http.post<Table>(`${url}/new`, tables, httpOptions)
|
||||
return <Observable<Table>>this.http.post<Table>(url, tables, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save'))
|
||||
);
|
||||
@ -57,7 +55,7 @@ export class TableService {
|
||||
}
|
||||
|
||||
updateSortOrder(list: Table[]): Observable<boolean> {
|
||||
return <Observable<boolean>>this.http.post<Table[]>(url, list, httpOptions)
|
||||
return <Observable<boolean>>this.http.post<Table[]>(`${url}/list`, list, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'updateSortOrder'))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user