-een gebruiker kan meerdere bedrijven hebben
Some checks failed
Docker Image CI / build-and-push (push) Failing after 1m21s
Docker Image CI / deploy (push) Has been skipped
Docker Image CI / notify-failure (push) Successful in 10s

-manier van afspraken maken veranderd in de backend ivm meerdere bedrijven gebruiker
 -email is aangepast op bedrijf en gebruiker
 -dropdown voor instellingen toegevoegd
This commit is contained in:
2025-04-15 20:45:56 +02:00
parent ddabbc62d1
commit 9fbb61fef4
15 changed files with 190 additions and 54 deletions

View File

@@ -2,6 +2,7 @@ import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Appointment} from '../models/appointment';
import {environment} from '../../environments/environment';
import {AuthService} from './auth.service';
@Injectable({
providedIn: 'root',
@@ -9,7 +10,7 @@ import {environment} from '../../environments/environment';
export class AppointmentService {
baseApi = `${environment.baseApi}/appointments`;
constructor(private http: HttpClient) {
constructor(private http: HttpClient, private authService: AuthService) {
}
getAllAppointments() {
@@ -24,7 +25,8 @@ export class AppointmentService {
}
addAppointment(appointment: Appointment) {
return this.http.post(`${this.baseApi}`, appointment);
let companyId = this.authService.getCurrentCompany().id
return this.http.post(`${this.baseApi}/${companyId}`, appointment);
}
deleteAppointment(appointment: Appointment) {