import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs/Rx';
import {Injectable} from '@angular/core';
import {SERVER_API_URL} from '../app.constants';
import {CommonService} from '../shared/common/common.service';
import {LocalStorageService, SessionStorageService} from 'ngx-webstorage';

@Injectable()
export class OverviewService {

    headers;
    options;

    constructor(private http: HttpClient, private commonSer: CommonService,
                private localStorage: LocalStorageService, private sessionStorage: SessionStorageService) {
    }

    //工作提醒查询接口
    selectMaintainCompany(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/workRemind/selectMaintainCompany', data);
    }

    //将消息设为已读
    updateReadStatus(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/workRemind/updateReadStatus', data);
    }

    //工作模块排序
    updateWorkModule(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/workRemind/updateWorkModule', data);
    }

    //查询所有工作模块
    selectWorkModule(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/workRemind/selectWorkModule', data);
    }
}
