mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Attachment } from '../models/attachment.model';
|
||||
import { Attachment, EventAttachment } from '../models/attachment.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { environment } from 'src/environments/environment';
|
||||
@@ -33,7 +33,7 @@ export class AttachmentsService {
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
getAttachments(source: number, sourceid: string): Observable<Attachment[]>{
|
||||
getAttachments(source: number, sourceid: string): Observable<Attachment[]> {
|
||||
let geturl = environment.apiURL + 'attachments/GetSourceName';
|
||||
let params = new HttpParams();
|
||||
|
||||
@@ -47,18 +47,47 @@ export class AttachmentsService {
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
getAttachmentsById(eventId: string): Observable<Attachment[]>{
|
||||
|
||||
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 = {
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
setEventAttachmentById(body: EventAttachment) {
|
||||
|
||||
let geturl = environment.apiURL + 'Attachments/Create';
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
}
|
||||
|
||||
return this.http.post(`${geturl}`, body, options);
|
||||
}
|
||||
|
||||
deleteEventAttachmentById(attachmentId) {
|
||||
|
||||
let geturl = environment.apiURL + `Attachments/Delete?attachmentId=${attachmentId}`;
|
||||
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("attachmentId", attachmentId);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
|
||||
return this.http.delete(`${geturl}`, options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ export class EventsService {
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.post<Event>(`${puturl}`, event, options)
|
||||
return this.http.post<string>(`${puturl}`, event, options)
|
||||
}
|
||||
|
||||
postEventPr(event:Event, calendarName:string)
|
||||
@@ -173,7 +173,7 @@ export class EventsService {
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.post<Event>(`${puturl}`, event, options)
|
||||
return this.http.post<string>(`${puturl}`, event, options)
|
||||
}
|
||||
|
||||
deleteEvent(eventid:string, deletemode:number)
|
||||
|
||||
Reference in New Issue
Block a user