mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'feature/agenda-new-api-eudes' of bitbucket.org:equilibriumito/gabinete-digital-fo into feature/agenda-new-api-eudes
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div" (click)="changeAgenda()">
|
||||
<div *ngIf="(sharedCalendar | async) as calendarData" class="container-div" (click)="changeAgenda()">
|
||||
<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>
|
||||
@@ -40,17 +40,15 @@
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarName" (selectionChange)="changeAgenda()">
|
||||
|
||||
<!-- <mat-option *ngFor="let calendars of _eventService.calendarNamesAry; let i = index" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Presidente da República'"> {{ environment.agendaPR}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars != 'Ministro e Director do Gabinete do PR' && calendars != 'Presidente da República'"> Agenda do {{calendars}} </div>
|
||||
<mat-option *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}">
|
||||
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div> -->
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars.Fullname || calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.PRES">PR </div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGENDA DO MDGPR</div>
|
||||
<div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName && calendars.wxUserId != SessionStore.user.UserId"> Agenda do {{calendars.wxFullName}} </div>
|
||||
<div *ngIf="calendars.wxUserId == SessionStore.user.UserId ">
|
||||
Minha agenda
|
||||
</div>
|
||||
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
@@ -59,29 +57,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="(sharedCalendar | async) as calendarData" style="" class="select-calendar">
|
||||
|
||||
|
||||
<!-- Debug line to print data -->
|
||||
<mat-form-field class="select-calendar" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda" *ngIf="calendarData?.length" >
|
||||
<mat-select [(value)]="selectedUserCalendar" >
|
||||
<mat-option *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}">
|
||||
|
||||
<div *ngIf="calendars.roleId == RoleIdService.PRES">PR </div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGENDA DO MDGPR</div>
|
||||
<div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName"> Agenda do {{calendars.wxFullName}} </div>
|
||||
<div *ngIf="calendars.wxUserId == SessionStore.user.UserId ">
|
||||
Minha agenda
|
||||
</div>
|
||||
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
@@ -96,7 +71,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-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-calendar.svg"></ion-icon>
|
||||
@@ -115,7 +90,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
@@ -158,13 +133,13 @@
|
||||
<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>
|
||||
<ion-icon slot="start" src="assets/images/icons-reapet.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-select [(value)]="postEvent.EventRecurrence.frequency" >
|
||||
<mat-option value="never">
|
||||
Nunca
|
||||
</mat-option>
|
||||
@@ -187,6 +162,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-reapet.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">
|
||||
@@ -335,7 +340,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="postEvent.EventRecurrence.Type != '-1'" class="container-div width-100">
|
||||
<!-- <div *ngIf="postEvent.EventRecurrence.Type != '-1'" class="container-div width-100">
|
||||
<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>
|
||||
@@ -361,7 +366,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="container-div width-100">
|
||||
|
||||
@@ -278,7 +278,7 @@ export class NewEventPage implements OnInit {
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: {
|
||||
frequency: "never", until: this.autoEndTime,
|
||||
frequency: this.eventRecurence, until: this.autoEndTime,
|
||||
Type: ''
|
||||
},
|
||||
};
|
||||
@@ -302,7 +302,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: '' },
|
||||
}
|
||||
}
|
||||
@@ -377,10 +377,10 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
injectValidation() {
|
||||
|
||||
if (typeof (this.postEvent.EventRecurrence.Type) == 'number') {
|
||||
/* if (typeof (this.postEvent.EventRecurrence.Type) == 'number') {
|
||||
const str: any = this.postEvent.EventRecurrence.Type.toString()
|
||||
this.postEvent.EventRecurrence.Type = str
|
||||
}
|
||||
} */
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postEvent.Subject, [
|
||||
@@ -400,9 +400,9 @@ export class NewEventPage implements OnInit {
|
||||
dateEnd: new FormControl(this.postEvent.EndDate, [
|
||||
Validators.required
|
||||
]),
|
||||
dateOccurrence: new FormControl(this.postEvent.EventRecurrence.Type.toString() == '-1' ? ['ok'] : this.postEvent.EventRecurrence.LastOccurrence && new Date(this.postEvent.EventRecurrence.LastOccurrence).getTime() > new Date(this.postEvent.EndDate).getTime() ? 'ok' : null, [
|
||||
/* dateOccurrence: new FormControl(this.postEvent.EventRecurrence.Type.toString() == '-1' ? ['ok'] : this.postEvent.EventRecurrence.LastOccurrence && new Date(this.postEvent.EventRecurrence.LastOccurrence).getTime() > new Date(this.postEvent.EndDate).getTime() ? 'ok' : null, [
|
||||
Validators.required
|
||||
]),
|
||||
]), */
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
// Validators.required
|
||||
]),
|
||||
@@ -580,11 +580,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)
|
||||
|
||||
Reference in New Issue
Block a user