diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html index a2a03a0ca..2a37cadd3 100644 --- a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html @@ -196,54 +196,68 @@ -
-
+
+
-
- - Não se repete - Repete - - - - - - - - Não se repete - - - Repete +
+ + + + + {{recurring.Description}} - +
- - +
+
+
+ +
+
+ + + + + + + + + + + + +
+
+
diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts index 6b93574d0..e8e24e419 100644 --- a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts @@ -19,6 +19,7 @@ import { MAT_DATE_LOCALE } from '@angular/material/core'; import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page'; import { DocumentService } from 'src/app/Rules/document.service'; import { DocumentSetUpMeeting, Attachments } from 'src/app/models/CallMeeting'; +import { EventsService } from 'src/app/services/events.service'; const moment = _rollupMoment || _moment; @@ -38,6 +39,9 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { selector: 'app-document-set-up-meeting', templateUrl: './document-set-up-meeting.page.html', styleUrls: ['./document-set-up-meeting.page.scss'], + providers: [ + { provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS }, + ] }) export class DocumentSetUpMeetingPage implements OnInit { @@ -60,6 +64,9 @@ export class DocumentSetUpMeetingPage implements OnInit { Form: FormGroup; validateFrom = false + recurringTypes = []; + Occurrence: Date = new Date() + EventRecurrenceType = '-1' showLoader = false @@ -115,7 +122,8 @@ export class DocumentSetUpMeetingPage implements OnInit { private processes:ProcessesService, authService: AuthService, private toastService: ToastService, - private documentService: DocumentService + private documentService: DocumentService, + private calendarService: EventsService ) { this.loggeduser = authService.ValidatedUser; @@ -135,6 +143,13 @@ export class DocumentSetUpMeetingPage implements OnInit { this.adding = "intervenient"; console.log(this.task); this.setDefaultTime() + this.getRecurrenceTypes(); + } + + getRecurrenceTypes() { + this.calendarService.getRecurrenceTypes().subscribe(res=>{ + this.recurringTypes = res; + }); } setDefaultTime() { @@ -193,6 +208,7 @@ export class DocumentSetUpMeetingPage implements OnInit { if(this.loggeduser.Profile == 'MDGPR') { this.injectValidation() this.runValidation() + if(this.Form.invalid) return false } let Attendees = this.taskParticipants.concat(this.taskParticipantsCc); @@ -205,11 +221,14 @@ export class DocumentSetUpMeetingPage implements OnInit { EndDate: this.dateEnd, EventType: 'Reunião', ParticipantsList: Attendees, - EventRecurrence: null, Subject: this.postData.Subject, IsRecurring: this.postData.IsRecurring, Message: this.postData.Subject, IsAllDayEvent: this.postData.IsRecurring, + EventRecurrence: { + Type: this.EventRecurrenceType, + LastOccurrence: this.Occurrence + }, }, Attachments: [] diff --git a/src/app/models/CallMeeting.ts b/src/app/models/CallMeeting.ts index 42bed156f..02023325c 100644 --- a/src/app/models/CallMeeting.ts +++ b/src/app/models/CallMeeting.ts @@ -26,12 +26,12 @@ export class DocumentSetUpMeeting { "ParticipantsList"?: EventPerson[], "Message": string, "EventRecurrence": { - "Type": 0, - "Day"?: 1, - "DayOfWeek"?: 0, - "Month"?: 1, - "LastOccurrence"?: string - } + "Type": string, + "Day"?: any, + "DayOfWeek"?: any, + "Month"?: any, + "LastOccurrence"?: any + }, } Attachments: Attachments[] diff --git a/src/app/pages/events/events.page.html b/src/app/pages/events/events.page.html index d64175488..0b679e7f3 100644 --- a/src/app/pages/events/events.page.html +++ b/src/app/pages/events/events.page.html @@ -43,9 +43,13 @@
+ + {{ toDayEventStorage.eventsList | json}} + + (click)="goToEvent(event.EventId)" + >
diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html index 42530955c..9029a5b94 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html @@ -261,9 +261,6 @@
- - -
diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts index 685b26696..3c55b1ab7 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts @@ -40,7 +40,6 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { templateUrl: './book-meeting-modal.page.html', styleUrls: ['./book-meeting-modal.page.scss'], providers: [ - // { provide: MAT_DATE_LOCALE, useValue: 'pt' }, { provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS }, ] }) diff --git a/src/app/shared/agenda/view-event/view-event.page.ts b/src/app/shared/agenda/view-event/view-event.page.ts index 606d88046..bd179c573 100644 --- a/src/app/shared/agenda/view-event/view-event.page.ts +++ b/src/app/shared/agenda/view-event/view-event.page.ts @@ -113,11 +113,10 @@ export class ViewEventPage implements OnInit { this.toastService.badRequest('Este evento já não existe na sua agenda') } - }) - ; + }); } - async deleteEvent(){ + async deleteEvent() { if (this.loadedEvent.IsRecurring) {