-een gebruiker kan meerdere bedrijven hebben
-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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user