recurece added to new event web

This commit is contained in:
Eudes Inácio
2024-06-07 16:05:13 +01:00
parent 4c51188c66
commit 5cac864294
3 changed files with 37 additions and 6 deletions
@@ -141,7 +141,7 @@
<mat-form-field appearance="none" class="width-100" placeholder="Sample Type" required>
<!-- <input matInput type="text" > -->
<mat-select [(value)]="eventRecurence" >
<mat-select [(value)]="postEvent.EventRecurrence.frequency" >
<mat-option value="never">
Nunca
</mat-option>
@@ -164,6 +164,36 @@
</div>
</div>
<div *ngIf="postEvent.EventRecurrence.frequency != 'never'" class="container-div">
<div class="ion-item-class-2 d-flex" >
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" >
<mat-form-field appearance="none" class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Data Fim de Recorrência*"
[(ngModel)]="postEvent.EventRecurrence.until"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" ></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
[touchUi]="touchUi"
[hideTime]="true"
>
</ngx-mat-datetime-picker>
</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">
@@ -234,7 +234,7 @@ export class NewEventPage implements OnInit {
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: {
frequency: "never", until: this.autoEndTime,
frequency: this.eventRecurence, until: this.autoEndTime,
Type: ''
},
};
@@ -258,7 +258,7 @@ export class NewEventPage implements OnInit {
Organizer: '',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: { frequency: "never", until: this.autoEndTime,
EventRecurrence: { frequency: this.eventRecurence, until: this.autoEndTime,
Type: '' },
}
}
@@ -536,11 +536,12 @@ export class NewEventPage implements OnInit {
return false
}
let loader = this.toastService.loading();
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.EventRecurrence.frequency = this.eventRecurence;
console.log('evenr rec 1 ',this.eventRecurence)
console.log('eent rec 2 ',this.postEvent.EventRecurrence.frequency)
this.agendaDataRepository.createEvent(this.postEvent, this.CalendarName, this.documents).subscribe((value) => {
console.log(value)