Assunto
-
@@ -31,27 +30,48 @@
- Calendário
-
+ Agenda
+
+ Pessoal
+ Oficial
+
- Tipo do evento
-
+ Selecione o tipo de evento
+
+ Reunião
+ Viagem
+ Conferência
+ Encontro
+
- Data Início:
-
+ Data Início
+
Data Fim
-
+
- Anexos
-
-
- Lei do orçamento geral do Estado
-
+
+
+
+
+
-
+
diff --git a/src/app/services/attachments.service.spec.ts b/src/app/services/attachments.service.spec.ts
new file mode 100644
index 000000000..e70f648e7
--- /dev/null
+++ b/src/app/services/attachments.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { AttachmentsService } from './attachments.service';
+
+describe('AttachmentsService', () => {
+ let service: AttachmentsService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(AttachmentsService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/src/app/services/attachments.service.ts b/src/app/services/attachments.service.ts
new file mode 100644
index 000000000..c15eec509
--- /dev/null
+++ b/src/app/services/attachments.service.ts
@@ -0,0 +1,36 @@
+import { Injectable } from '@angular/core';
+import { Attachment } from '../models/attachment.model';
+import { Observable } from 'rxjs';
+import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
+import { environment } from 'src/environments/environment';
+import { AuthService } from '../services/auth.service';
+import { User } from '../models/user.model';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class AttachmentsService {
+
+ loggeduser: User;
+ headers: HttpHeaders;
+
+ constructor(private http: HttpClient, user: AuthService) {
+ this.loggeduser = user.ValidatedUser;
+ this.headers = new HttpHeaders();
+ this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
+ }
+
+ getEventAttachments(eventid: string): Observable{
+ let geturl = environment.apiURL + 'attachments/GetAttachments';
+ let params = new HttpParams();
+
+ params = params.set("ParentId", eventid);
+
+ let options = {
+ headers: this.headers,
+ params: params
+ };
+
+ return this.http.get(`${geturl}`, options);
+ }
+}
diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts
index 1c2811c0f..ce6b84de5 100644
--- a/src/app/services/events.service.ts
+++ b/src/app/services/events.service.ts
@@ -1,13 +1,12 @@
import { Injectable } from '@angular/core';
-
import { Event } from '../models/event.model';
-import axios from 'axios'
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { AuthService } from '../services/auth.service';
import { User } from '../models/user.model';
+
@Injectable({
providedIn: 'root'
})
@@ -55,7 +54,7 @@ export class EventsService {
}
getEvent(eventid: string): Observable{
- const geturl = environment.apiURL + 'calendar/GetEvent';
+ let geturl = environment.apiURL + 'calendar/GetEvent';
let params = new HttpParams();
params = params.set("EventId", eventid);
@@ -65,7 +64,7 @@ export class EventsService {
params: params
};
- return this.http.get(`${geturl}`, options)
+ return this.http.get(`${geturl}`, options);
}
putEvent(event: Event, conflictResolutionMode:number, sendInvitationsOrCancellationsMode:number): Observable
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 1c120b111..4fb899a73 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -4,7 +4,7 @@
export const environment = {
production: false,
- apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/v1/api/',
+ apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/v2/api/',
domain: 'gabinetedigital.local',
defaultuser: 'tiago.kayaya',
defaultuserpwd: 'tabteste@006'