mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add ocurrence
This commit is contained in:
+24
-4
@@ -35,7 +35,6 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-book-meeting-modal',
|
||||
templateUrl: './book-meeting-modal.page.html',
|
||||
@@ -69,6 +68,9 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
recurringTypes = [];
|
||||
Occurrence: Date = new Date()
|
||||
EventRecurrenceType = '-1'
|
||||
|
||||
showLoader = false
|
||||
|
||||
@@ -154,8 +156,17 @@ export class BookMeetingModalPage implements OnInit {
|
||||
console.log(this.task);
|
||||
this.getAttachments();
|
||||
this.setDefaultTime()
|
||||
this.getRecurrenceTypes();
|
||||
|
||||
}
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.calendarService.getRecurrenceTypes().subscribe(res=>{
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
setDefaultTime() {
|
||||
this.postData.StartDate = new Date()
|
||||
this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
|
||||
@@ -220,9 +231,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
if(this.Form.invalid) return false
|
||||
}
|
||||
|
||||
// if(this.Form.invalid) return false
|
||||
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
@@ -248,7 +258,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
Organizer: null,
|
||||
Category: 'Reunião',
|
||||
HasAttachments: true,
|
||||
EventRecurrence: null,
|
||||
EventRecurrence: {
|
||||
Type: this.EventRecurrenceType,
|
||||
LastOccurrence: this.Occurrence
|
||||
},
|
||||
}
|
||||
|
||||
console.log(this.postData);
|
||||
@@ -339,6 +352,13 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
openLastOccurrence() {
|
||||
let input: any = document.querySelector('#last-occurrence')
|
||||
if(input) {
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
async addParticipantsCc() {
|
||||
|
||||
this.adding = "CC";
|
||||
|
||||
Reference in New Issue
Block a user