mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
save
This commit is contained in:
@@ -412,7 +412,7 @@ export class EventsService {
|
||||
return this.http.post<string>(`${puturl}`, event, options)
|
||||
}
|
||||
|
||||
deleteEvent(eventid:string, eventDeleteType:number)
|
||||
deleteEvent(eventid:string, eventDeleteType:number, calendarName:string)
|
||||
{
|
||||
const puturl = environment.apiURL + 'calendar/DeleteEvent';
|
||||
let params = new HttpParams();
|
||||
@@ -421,10 +421,38 @@ export class EventsService {
|
||||
// 0 for occurence and 1 for serie (delete all events)
|
||||
params = params.set("eventDeleteType", eventDeleteType.toString());
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
let options;
|
||||
|
||||
switch (this.loggeduser.Profile) {
|
||||
case 'MDGPR':
|
||||
if(calendarName == 'Pessoal'){
|
||||
options = {
|
||||
headers: this.headersMdPessoal,
|
||||
params: params
|
||||
};
|
||||
}
|
||||
else if(calendarName == 'Oficial'){
|
||||
options = {
|
||||
headers: this.headersMdOficial,
|
||||
params: params
|
||||
};
|
||||
}
|
||||
break;
|
||||
case 'PR':
|
||||
if(calendarName == 'Pessoal'){
|
||||
options = {
|
||||
headers: this.headersPrPessoal,
|
||||
params: params
|
||||
};
|
||||
}
|
||||
else if(calendarName == 'Oficial'){
|
||||
options = {
|
||||
headers: this.headersPrOficial,
|
||||
params: params
|
||||
};
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return this.http.delete(`${puturl}`, options)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user