mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix
This commit is contained in:
@@ -31,6 +31,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100" >
|
||||
<div class="ion-item-class-2 d-flex width-100">
|
||||
<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 " [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
|
||||
<ion-input [disabled]=true autocomplete="on" autocorrect="on" spellcheck="true" placeholder="CalendarName*" [(ngModel)]="CalendarNameOwnerName"></ion-input>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
@@ -58,15 +71,13 @@
|
||||
<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">
|
||||
<div class="ion-input-class flex-grow-1 width-100">
|
||||
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100 " >
|
||||
<mat-select placeholder="Selecione agenda*" [(ngModel)]="postEvent.CalendarName" [disabled]=true>
|
||||
<mat-option value="Oficial">
|
||||
Agenda Oficial
|
||||
</mat-option>
|
||||
<mat-option value="Pessoal">
|
||||
Agenda Pessoal
|
||||
|
||||
<mat-select [(value)]="postEvent.CalendarName" class="width-100" [disabled]=true>
|
||||
<mat-option *ngFor="let calendars of CalendarNamesOptions" value="{{calendars}}">
|
||||
Agenda {{ calendars }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -16,7 +16,7 @@ import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -57,6 +57,9 @@ export class EditEventPage implements OnInit {
|
||||
recurringTypes: any;
|
||||
selectedRecurringType: any;
|
||||
|
||||
CalendarNameOwnerName = ''
|
||||
CalendarNamesOptions = []
|
||||
|
||||
public date: any;
|
||||
public disabled = false;
|
||||
public showSpinners = true;
|
||||
@@ -82,11 +85,12 @@ export class EditEventPage implements OnInit {
|
||||
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
||||
|
||||
sesseionStora = SessionStore
|
||||
|
||||
environment = environment
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private eventsService: EventsService,
|
||||
public eventsService: EventsService,
|
||||
public alertController: AlertController,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private toastService: ToastService,
|
||||
@@ -134,6 +138,9 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
this.getAttachments(this.postEvent.EventId);
|
||||
|
||||
|
||||
this.CalendarNameOwnerName = this.eventsService.detectCalendarNameByCalendarId(this.postEvent.CalendarId)
|
||||
this.changeAgenda()
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -559,4 +566,27 @@ export class EditEventPage implements OnInit {
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
changeAgenda() {
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
if(this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
|
||||
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial']) {
|
||||
this.CalendarNamesOptions = ['Oficial']
|
||||
this.postEvent.CalendarName = 'Oficial'
|
||||
|
||||
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||
this.CalendarNamesOptions = ['Pessoal']
|
||||
this.postEvent.CalendarName = 'Pessoal'
|
||||
|
||||
} else {
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
}
|
||||
}, 50)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user