mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Changes on Intervenientes + New Event
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div class="div-ion-content">
|
||||
<ion-item>
|
||||
<ion-label position="floating">Assunto</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Subject" name="subject"></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="floating">Descrição</ion-label>
|
||||
@@ -21,11 +21,11 @@
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="floating">Localização</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Location" name="location"></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="floating">Selecione a Agenda</ion-label>
|
||||
<ion-select [(ngModel)]="postEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select selectedText="{{postEvent.CalendarName}}" [(ngModel)]="postEvent.CalendarName" name="calendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select-option Pessoal="Reunião">Pessoal</ion-select-option>
|
||||
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
|
||||
</ion-select>
|
||||
@@ -40,21 +40,21 @@
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="floating">Data Início</ion-label>
|
||||
<ion-datetime [(ngModel)]="postEvent.StartDate" min="2020" max="2100"
|
||||
<ion-label position="floating">Data Início</ion-label>
|
||||
<ion-datetime placeholder="{{postEvent.StartDate | date: 'dd MMM yyyy H:mm'}}" [(ngModel)]="postEvent.StartDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="floating">Data Fim</ion-label>
|
||||
<ion-datetime [(ngModel)]="postEvent.EndDate" min="2020" max="2100"
|
||||
<ion-datetime placeholder="{{postEvent.EndDate | date: 'dd MMM yyyy H:mm'}}" [(ngModel)]="postEvent.EndDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
<div class="div-attach">
|
||||
<ion-item lines="none">
|
||||
<ion-icon name="add" slot="end" (click)="openAttendees()"></ion-icon>
|
||||
<ion-label class="attach-label">Intervenientes</ion-label>
|
||||
<ion-label class="attach-label">Participantes</ion-label>
|
||||
</ion-item>
|
||||
<div id="AttachFiles"></div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, AfterViewInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { Component, OnInit, AfterViewInit, Input } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
import { Event } from '../../models/event.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
@@ -9,6 +9,7 @@ import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { AttendeeModalPage } from '../events/attendee-modal/attendee-modal.page';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { moveMessagePortToContext } from 'worker_threads';
|
||||
|
||||
@Component({
|
||||
selector: 'app-cal-modal',
|
||||
@@ -22,20 +23,84 @@ export class CalModalPage implements OnInit {
|
||||
currentDate: new Date()
|
||||
};
|
||||
|
||||
viewTitle: string;
|
||||
postEvent: Event;
|
||||
modalReady = false;
|
||||
|
||||
eventAttendees: EventPerson[];
|
||||
segment:string = "true";
|
||||
selectedSegment: string;
|
||||
selectedDate: Date;
|
||||
|
||||
constructor(private modalCtrl: ModalController, private eventService: EventsService, private alertController:AlertService) {
|
||||
viewTitle: string;
|
||||
postEvent: Event;
|
||||
eventBody: EventBody;
|
||||
modalReady = false;
|
||||
|
||||
minDate: string;
|
||||
|
||||
|
||||
|
||||
@Input() teste: string;
|
||||
passedInfo = null;
|
||||
|
||||
constructor(private modalCtrl: ModalController, private eventService: EventsService, private alertController:AlertService,
|
||||
private navParams: NavParams) {
|
||||
this.postEvent = new Event();
|
||||
this.postEvent.Body = { BodyType : "1", Text : ""};
|
||||
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.postEvent.Body = this.eventBody;
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.selectedSegment = this.navParams.get('segment');
|
||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||
|
||||
let selectedStartdDate = this.selectedDate;
|
||||
let selectedEndDate = new Date(this.selectedDate);
|
||||
/* Set + 30minutes to seleted datetime */
|
||||
selectedEndDate.setMinutes(this.selectedDate.getMinutes() + 30)
|
||||
|
||||
this.minDate = this.selectedDate.toString();
|
||||
|
||||
if(this.selectedSegment != "Combinada"){
|
||||
this.postEvent ={
|
||||
EventId: '',
|
||||
Subject: '',
|
||||
Body: this.eventBody,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: this.selectedSegment,
|
||||
StartDate: selectedStartdDate,
|
||||
EndDate: new Date(selectedEndDate),
|
||||
EventType: '',
|
||||
Attendees: null,
|
||||
IsMeeting: false,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Categories: null,
|
||||
HasAttachments: false,
|
||||
};
|
||||
}
|
||||
else{
|
||||
this.postEvent ={
|
||||
EventId: '',
|
||||
Subject: '',
|
||||
Body: this.eventBody,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: '',
|
||||
StartDate: selectedStartdDate,
|
||||
EndDate: new Date(selectedEndDate),
|
||||
EventType: '',
|
||||
Attendees: null,
|
||||
IsMeeting: false,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Categories: null,
|
||||
HasAttachments: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
@@ -126,5 +191,8 @@ export class CalModalPage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
example(){
|
||||
console.log("Mensagem");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user