mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
Fix multiples API calls and methods
This commit is contained in:
@@ -20,11 +20,11 @@ export class AttachmentsService {
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
}
|
||||
|
||||
getEventAttachments(eventid: string): Observable<Attachment[]>{
|
||||
getAttachmentsBySerial(serialNumber: string): Observable<Attachment[]>{
|
||||
let geturl = environment.apiURL + 'attachments/GetAttachments';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("ParentId", eventid);
|
||||
params = params.set("SerialNumber", serialNumber);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
@@ -45,6 +45,20 @@ export class AttachmentsService {
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
getAttachmentsById(eventId: string): Observable<Attachment[]>{
|
||||
let geturl = environment.apiURL + 'attachments/GetAttachmentsByEventId';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("ParentId", eventId);
|
||||
/* params = params.set("SourceId", sourceid); */
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ export class EventsService {
|
||||
|
||||
deleteEvent(eventid:string, deletemode:number)
|
||||
{
|
||||
const puturl = environment.apiURL + 'calendar/PostEvent';
|
||||
const puturl = environment.apiURL + 'calendar/DeleteEvent';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("EventId", eventid);
|
||||
@@ -191,11 +191,12 @@ export class EventsService {
|
||||
|
||||
return this.http.delete(`${puturl}`, options)
|
||||
}
|
||||
postExpedientEvent(docId:any, body:any, sharedagenda:string){
|
||||
postExpedientEvent(docId:any, body:any, sharedagenda:string, serialNumber:any){
|
||||
const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente');
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("DocId", docId);
|
||||
params = params.set("SerialNumber", serialNumber);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
|
||||
Reference in New Issue
Block a user