/** Angular Imports */ import { Injectable } from '@angular/core' ; import { HttpClient , HttpParams } from '@angular/common/http' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /**
 * Tasks Service
 */ @ Injectable ( { providedIn : 'root' } ) export class TasksService { param { HttpClient } http constructor ( private http ) { } param { searchData } SearchData getMakerCheckerData ( searchData ? ) { let httpParams = new HttpParams ( ) ; if ( searchData ) { const propNames = Object . getOwnPropertyNames ( searchData ) ; for ( let i = 0 ; i < propNames . length ; i ++ ) { const propName = propNames [ i ] ; if ( ! ( searchData [ propName ] === '' || searchData [ propName ] === undefined || searchData [ propName ] === null ) ) { httpParams = httpParams . set ( propName , searchData [ propName ] ) ; } } } return this . http . get ( '/makercheckers' , { params : httpParams } ) ; } /**
     * Get Maker Checker Template
     */ getMakerCheckerTemplate ( ) { return this . http . get ( '/makercheckers' ) ; } /**
     * Get Grouped Clients Data
     */ getGroupedClientsData ( ) { const httpParams = new HttpParams ( ) . set ( 'limit' , '1000' ) . set ( 'sqlSearch' , 'c.status_enum=100' ) ; return this . http . get ( '/clients' , { params : httpParams } ) ; } /**
     * Get all Offices Data
     */ getAllOffices ( ) { return this . http . get ( '/offices' ) ; } /**
     * Get all Loans Data
     */ getAllLoans ( ) { const httpParams = new HttpParams ( ) . set ( 'limit' , '1000' ) . set ( 'sqlSearch' , 'l.loan_status_id in (100,200)' ) ; return this . http . get ( '/loans' , { params : httpParams } ) ; } /**
     * Get Pending Rescheduled Loans
     */ getPendingRescheduleLoans ( ) { const httpParams = new HttpParams ( ) . set ( 'command' , 'pending' ) ; return this . http . get ( '/rescheduleloans' , { params : httpParams } ) ; } param { data } Data submitBatchData ( data ) { return this . http . post ( '/batches' , data ) ; } param { makerCheckerId } MakerCheckerId param { command } Command executeMakerCheckerAction ( makerCheckerId , command ) { const httpParams = new HttpParams ( ) . set ( 'command' , command ) ; return this . http . post ( `/makercheckers/${ makerCheckerId }` , { } , { params : httpParams } ) ; } param { makerCheckerId } MakerCheckerId deleteMakerChecker ( makerCheckerId ) { return this . http . delete ( `/makercheckers/${ makerCheckerId }` ) ; } param { makerCheckerId } MakerCheckerId getCheckerInboxDetail ( makerCheckerId ) { return this . http . get ( `/audits/${ makerCheckerId }` ) ; } }