Table Sort Order Done
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
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 {Table} from '../core/table';
|
||||
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 { Table } from '../core/table';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
@ -48,6 +48,13 @@ export class TableService {
|
||||
);
|
||||
}
|
||||
|
||||
updateSortOrder(list: Table[]): Observable<boolean> {
|
||||
return <Observable<boolean>>this.http.post<Table[]>(url, list, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'updateSortOrder'))
|
||||
);
|
||||
}
|
||||
|
||||
saveOrUpdate(tables: Table): Observable<Table> {
|
||||
if (!tables.id) {
|
||||
return this.save(tables);
|
||||
|
||||
Reference in New Issue
Block a user