From e527a971ea45e158226cd77ef4339d5132604c41 Mon Sep 17 00:00:00 2001 From: Cyril Joseph Date: Sun, 8 Jun 2025 20:36:24 -0300 Subject: [PATCH] api integration updates --- src/app/core/services/basic-detail.service.ts | 2 +- src/app/core/services/carnet-sequence.service.ts | 2 +- src/app/core/services/contact.service.ts | 4 ++-- src/styles.scss | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/core/services/basic-detail.service.ts b/src/app/core/services/basic-detail.service.ts index 62d3e69..80d848a 100644 --- a/src/app/core/services/basic-detail.service.ts +++ b/src/app/core/services/basic-detail.service.ts @@ -15,7 +15,7 @@ export class BasicDetailService { constructor(private http: HttpClient, private userService: UserService) { } getBasicDetailsById(id: number): BasicDetail | any { - return this.http.get(`${this.apiUrl}/${this.apiDb}/GetSelectedServiceprovider?p_spid=${id}`).pipe( + return this.http.get(`${this.apiUrl}/${this.apiDb}/GetSelectedServiceprovider/${id}`).pipe( filter(response => response.length > 0), map(response => this.mapToBasicDetail(response?.[0]))); } diff --git a/src/app/core/services/carnet-sequence.service.ts b/src/app/core/services/carnet-sequence.service.ts index 84edc91..f5e624b 100644 --- a/src/app/core/services/carnet-sequence.service.ts +++ b/src/app/core/services/carnet-sequence.service.ts @@ -15,7 +15,7 @@ export class CarnetSequenceService { constructor(private http: HttpClient, private userService: UserService) { } getCarnetSequenceById(id: number): Observable { - return this.http.get(`${this.apiUrl}/${this.apiDb}/GetCarnetSequence?p_spid=${id}`).pipe( + return this.http.get(`${this.apiUrl}/${this.apiDb}/GetCarnetSequence/${id}`).pipe( map(response => this.mapToCarnetSequence(response))); } diff --git a/src/app/core/services/contact.service.ts b/src/app/core/services/contact.service.ts index f7e7e59..785cc88 100644 --- a/src/app/core/services/contact.service.ts +++ b/src/app/core/services/contact.service.ts @@ -15,7 +15,7 @@ export class ContactService { constructor(private http: HttpClient, private userService: UserService) { } getContactsById(id: number): Observable { - return this.http.get(`${this.apiUrl}/${this.apiDb}/GetSPAllContacts?p_SPid=${id}`).pipe( + return this.http.get(`${this.apiUrl}/${this.apiDb}/GetSPAllContacts/${id}`).pipe( map(response => this.mapToContacts(response))); } @@ -79,7 +79,7 @@ export class ContactService { } deleteContact(spContactId: string): Observable { - return this.http.post(`${this.apiUrl}/${this.apiDb}/InactivateSPContact?p_spcontactid=${spContactId}`, null); + return this.http.post(`${this.apiUrl}/${this.apiDb}/InactivateSPContact/${spContactId}`, null); } } diff --git a/src/styles.scss b/src/styles.scss index 73fb027..45c4ad0 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -4,7 +4,8 @@ @use '@angular/material' as mat; html { - @include mat.theme((density: -3)); + @include mat.theme((density: -3, + )); } html,