mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve
This commit is contained in:
@@ -50,6 +50,28 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div 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>
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs " [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
|
||||
<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" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' "> Calendário de {{calendars}} </div>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> {{calendars}} </div>
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
@@ -61,7 +83,9 @@
|
||||
[(ngModel)]="postData.CalendarName"
|
||||
placeholder="Selecione repetição"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
Cancel-text="Cancelar" required
|
||||
(selectionChange)="changeAgenda()"
|
||||
>
|
||||
<ion-select-option value="Oficial">Oficial</ion-select-option>
|
||||
<ion-select-option value="Pessoal">Pessoal</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
@@ -90,6 +90,9 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
docs:any[] = [];
|
||||
|
||||
eventPipe = new EventPipe()
|
||||
CalendarName;
|
||||
CalendarNameShow = true
|
||||
CalendarNamesOptions
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -99,7 +102,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private calendarService: EventsService,
|
||||
private eventService: EventService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
public _eventService: EventsService,
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.document = this.navParams.get('document')
|
||||
@@ -165,6 +169,33 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
changeAgenda() {
|
||||
|
||||
this.CalendarNameShow = false
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
this.CalendarNameShow = true
|
||||
|
||||
if(this._eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this._eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
||||
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
|
||||
} else if (this._eventService.calendarNamesType[this.CalendarName]?.['Oficial']) {
|
||||
this.CalendarNamesOptions = ['Oficial']
|
||||
this.postData.CalendarName = 'Oficial'
|
||||
|
||||
} else if (this._eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
||||
this.CalendarNamesOptions = ['Pessoal']
|
||||
this.postData.CalendarName = 'Pessoal'
|
||||
|
||||
} else {
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
}
|
||||
}, 50)
|
||||
|
||||
}
|
||||
|
||||
async saveTask() {
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
@@ -175,7 +206,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
if(this.document.Documents){
|
||||
if(this.document.Documents) {
|
||||
this.document.Documents.forEach((e)=> {
|
||||
this.docs.push({
|
||||
ApplicationId: e.ApplicationId || e.ApplicationType,
|
||||
|
||||
@@ -2,12 +2,9 @@ import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/emend-message-modal.page';
|
||||
import { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popover/event-actions-popover.page';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@@ -193,8 +193,8 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user