add recurence to agenda web

This commit is contained in:
Eudes Inácio
2024-06-07 14:10:17 +01:00
parent 95bb69be99
commit 4be9c6562e
7 changed files with 90 additions and 30 deletions
@@ -132,6 +132,38 @@
</div>
</div>
<div class="container-div">
<div class="ion-item-class-2 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-repeat.svg"></ion-icon>
</div>
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs">
<mat-form-field appearance="none" class="width-100" placeholder="Sample Type" required>
<!-- <input matInput type="text" > -->
<mat-select [(value)]="eventRecurence" >
<mat-option value="never">
Nunca
</mat-option>
<mat-option value="daily">
Diário
</mat-option>
<mat-option value="weekly">
Semanalmente
</mat-option>
<mat-option value="monthly">
Mensal
</mat-option>
<mat-option value="yearly">
Anual
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</div>
<div *ngIf="allDayCheck" class="container-div">
<div class="ion-item-class-2 d-flex" >
<div class="ion-icon-class">
@@ -82,6 +82,7 @@ export class NewEventPage implements OnInit {
selectedRecurringType: any;
loggedAttendDad: boolean = true;
mostrarModal = false;
eventRecurence = 'never'
@Input() attendees: []
@Input() profile: string;
@@ -232,7 +233,10 @@ export class NewEventPage implements OnInit {
Organizer: '',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
EventRecurrence: {
frequency: "never", until: this.autoEndTime,
Type: ''
},
};
}
else {
@@ -254,7 +258,8 @@ export class NewEventPage implements OnInit {
Organizer: '',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
EventRecurrence: { frequency: "never", until: this.autoEndTime,
Type: '' },
}
}
}
@@ -534,6 +539,8 @@ export class NewEventPage implements OnInit {
let loader = this.toastService.loading();
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.EventRecurrence.frequency = this.eventRecurence;
this.agendaDataRepository.createEvent(this.postEvent, this.CalendarName, this.documents).subscribe((value) => {
console.log(value)