diff --git a/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java b/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java index b6dc349..2400df7 100755 --- a/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java +++ b/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java @@ -785,28 +785,28 @@ public class SyncService { if (writeTabs == null || writeTabs.isEmpty()) { writeTabs = "epas_cartellini_rendicontazioni"; } else { - writeTabs = writeTabs + "epas_cartellini_rendicontazioni"; + writeTabs = writeTabs + ",epas_cartellini_rendicontazioni"; } } if (bpers_orario) { if (writeTabs == null || writeTabs.isEmpty()) { writeTabs = "epas_pers_orario"; } else { - writeTabs = writeTabs + "epas_pers_orario"; + writeTabs = writeTabs + ",epas_pers_orario"; } } if (blavoro_fuori_sede) { if (writeTabs == null || writeTabs.isEmpty()) { writeTabs = "epas_lavoro_fuori_sede"; } else { - writeTabs = writeTabs + "epas_lavoro_fuori_sede"; + writeTabs = writeTabs + ",epas_lavoro_fuori_sede"; } } if (baspettative) { if (writeTabs == null || writeTabs.isEmpty()) { writeTabs = "epas_aspettative"; } else { - writeTabs = writeTabs + "epas_aspettative"; + writeTabs = writeTabs + ",epas_aspettative"; } } return writeTabs; diff --git a/src/main/webapp/app/operations/rendicontazione/rendicontazione.service.ts b/src/main/webapp/app/operations/rendicontazione/rendicontazione.service.ts index d9fe8a9..01bb0ef 100755 --- a/src/main/webapp/app/operations/rendicontazione/rendicontazione.service.ts +++ b/src/main/webapp/app/operations/rendicontazione/rendicontazione.service.ts @@ -12,6 +12,6 @@ export class RendicontazioneService { let queryParams = new HttpParams(); queryParams = queryParams.append('year', year + ''); queryParams = queryParams.append('month', month + ''); - return this.http.get(SERVER_API_URL + 'api/sync/test', { params: queryParams }); + return this.http.get(SERVER_API_URL + 'api/sync/writes', { params: queryParams }); } } diff --git a/src/main/webapp/app/operations/sync/sync.service.ts b/src/main/webapp/app/operations/sync/sync.service.ts index ce3f10e..d42a7bb 100755 --- a/src/main/webapp/app/operations/sync/sync.service.ts +++ b/src/main/webapp/app/operations/sync/sync.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import { HttpClient } from '@angular/common/http'; +import { HttpClient, HttpParams } from '@angular/common/http'; import { SERVER_API_URL } from 'app/app.constants'; import { SyncType } from './sync.model'; @@ -10,6 +10,9 @@ export class SyncService { constructor(private http: HttpClient) {} sync(syncType: SyncType, year: number, month: number): Observable<{}> { - return this.http.get(SERVER_API_URL + 'api/sync/' + syncType + '?year=' + year + '&month=' + month); + let queryParams = new HttpParams(); + queryParams = queryParams.append('year', year + ''); + queryParams = queryParams.append('month', month + ''); + return this.http.get(SERVER_API_URL + 'api/sync/' + syncType, { params: queryParams }); } } diff --git a/src/test/java/it/cnr/isti/epasmed/web/rest/sync/SyncResourceIT.java b/src/test/java/it/cnr/isti/epasmed/web/rest/sync/SyncResourceIT.java index c46ac38..82f8cd2 100755 --- a/src/test/java/it/cnr/isti/epasmed/web/rest/sync/SyncResourceIT.java +++ b/src/test/java/it/cnr/isti/epasmed/web/rest/sync/SyncResourceIT.java @@ -29,7 +29,7 @@ public class SyncResourceIT { private final Logger log = LoggerFactory.getLogger(getClass()); private static final String YEAR="2022"; - private static final String MONTH="6"; + private static final String MONTH="7"; @Autowired