@@ -231,3 +231,65 @@ export class OrganizationService {
231231 } ) ;
232232 }
233233}
234+
235+ /**
236+ * Home Service
237+ */
238+ @Injectable ( {
239+ providedIn : 'root'
240+ } )
241+ export class HomeService {
242+ /**
243+ * @param {HttpClient } http Http Client to send requests.
244+ */
245+ constructor ( private http : HttpClient ) { }
246+
247+ /**
248+ * @param {number } officeId Office Id.
249+ * @returns {Observable<any> }
250+ */
251+ getCollectedAmount ( officeId : number ) : Observable < any > {
252+ const httpParams = new HttpParams ( ) . set ( 'R_officeId' , officeId . toString ( ) ) . set ( 'genericResultSet' , 'false' ) ;
253+ return this . http . get ( '/runreports/Demand Vs Collection' , { params : httpParams } ) ;
254+ }
255+
256+ getDisbursedAmount ( officeId : number ) : Observable < any > {
257+ const httpParams = new HttpParams ( ) . set ( 'R_officeId' , officeId . toString ( ) ) . set ( 'genericResultSet' , 'false' ) ;
258+ return this . http . get ( '/runreports/Disbursal Vs Awaitingdisbursal' , { params : httpParams } ) ;
259+ }
260+
261+ /**
262+ * @param {number } officeId Office Id.
263+ * @returns {Observable<any> }
264+ */
265+
266+ getClientTrendsByDay ( officeId : number ) : Observable < any > {
267+ const httpParams = new HttpParams ( ) . set ( 'R_officeId' , officeId . toString ( ) ) . set ( 'genericResultSet' , 'false' ) ;
268+ return this . http . get ( '/runreports/ClientTrendsByDay' , { params : httpParams } ) ;
269+ }
270+
271+ getLoanTrendsByDay ( officeId : number ) : Observable < any > {
272+ const httpParams = new HttpParams ( ) . set ( 'R_officeId' , officeId . toString ( ) ) . set ( 'genericResultSet' , 'false' ) ;
273+ return this . http . get ( '/runreports/LoanTrendsByDay' , { params : httpParams } ) ;
274+ }
275+
276+ getClientTrendsByWeek ( officeId : number ) : Observable < any > {
277+ const httpParams = new HttpParams ( ) . set ( 'R_officeId' , officeId . toString ( ) ) . set ( 'genericResultSet' , 'false' ) ;
278+ return this . http . get ( '/runreports/ClientTrendsByWeek' , { params : httpParams } ) ;
279+ }
280+
281+ getClientTrendsByMonth ( officeId : number ) : Observable < any > {
282+ const httpParams = new HttpParams ( ) . set ( 'R_officeId' , officeId . toString ( ) ) . set ( 'genericResultSet' , 'false' ) ;
283+ return this . http . get ( '/runreports/ClientTrendsByMonth' , { params : httpParams } ) ;
284+ }
285+
286+ getLoanTrendsByWeek ( officeId : number ) : Observable < any > {
287+ const httpParams = new HttpParams ( ) . set ( 'R_officeId' , officeId . toString ( ) ) . set ( 'genericResultSet' , 'false' ) ;
288+ return this . http . get ( '/runreports/LoanTrendsByWeek' , { params : httpParams } ) ;
289+ }
290+
291+ getLoanTrendsByMonth ( officeId : number ) : Observable < any > {
292+ const httpParams = new HttpParams ( ) . set ( 'R_officeId' , officeId . toString ( ) ) . set ( 'genericResultSet' , 'false' ) ;
293+ return this . http . get ( '/runreports/LoanTrendsByMonth' , { params : httpParams } ) ;
294+ }
295+ }
0 commit comments