mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
New changes added + AddEvent method partially done
This commit is contained in:
@@ -13,36 +13,36 @@
|
||||
<div class="div-ion-content">
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Assunto</ion-label>
|
||||
<ion-input tpye="text" [(ngModel)]="event.title"></ion-input>
|
||||
<ion-input tpye="text" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Descrição</ion-label>
|
||||
<ion-input tpye="text" [(ngModel)]="event.desc"></ion-input>
|
||||
<ion-input tpye="text" [(ngModel)]="postEvent.Body.Text"></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Localização</ion-label>
|
||||
<ion-input tpye="text" [(ngModel)]="event.place"></ion-input>
|
||||
<ion-input tpye="text" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Intervenientes</ion-label>
|
||||
<ion-input tpye="text" [(ngModel)]="event.people"></ion-input>
|
||||
<ion-input tpye="text" [(ngModel)]="postEvent.RequiredAttendees.Name"></ion-input>
|
||||
</ion-item>
|
||||
<ion-list>
|
||||
<ion-radio-group value="biff">
|
||||
<ion-item class="radio-button" lines="none">
|
||||
<ion-label>Oficial</ion-label>
|
||||
<ion-radio [(ngModel)]="event.type" slot="start" value="biff"></ion-radio>
|
||||
<ion-radio [(ngModel)]="postEvent.CalendarName" slot="start" value="biff"></ion-radio>
|
||||
</ion-item>
|
||||
|
||||
<ion-item class="radio-button" lines="none">
|
||||
<ion-label>Pessoal</ion-label>
|
||||
<ion-radio slot="start" value="griff"></ion-radio>
|
||||
<ion-radio [(ngModel)]="postEvent.CalendarName" slot="start" value="griff"></ion-radio>
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
</ion-list>
|
||||
<ion-item>
|
||||
<ion-label>Selecione o tipo de evento</ion-label>
|
||||
<ion-select interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select [(ngModel)]="postEvent.EventType" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
@@ -51,13 +51,13 @@
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Data Início</ion-label>
|
||||
<ion-datetime value="2005-06-17T11:06Z" min="1990" max="2020"
|
||||
<ion-datetime [(ngModel)]="postEvent.StartDate" value="2005-06-17T11:06Z" min="1990" max="2020"
|
||||
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>Data Fim</ion-label>
|
||||
<ion-datetime value="2005-06-17T11:06Z" min="1990" max="2020"
|
||||
<ion-datetime [(ngModel)]="postEvent.EndDate" value="2005-06-17T11:06Z" min="1990" max="2020"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
@@ -65,14 +65,15 @@
|
||||
<ion-item>
|
||||
<ion-icon name="add" slot="end"></ion-icon>
|
||||
<ion-label class="attach-label">Anexos</ion-label>
|
||||
|
||||
</ion-item>
|
||||
<div id="AttachFiles"></div>
|
||||
<ion-list [(ngModel)]="postEvent.Attachments">
|
||||
<ion-item lines="none">
|
||||
<ion-icon name="attach"></ion-icon>
|
||||
<ion-label color="secondary">Lei do orçamento geral do Estado</ion-label>
|
||||
<ion-icon name="trash" slot="end"></ion-icon>
|
||||
</ion-item>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { Component, OnInit, AfterViewInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
|
||||
import { Event } from '../../models/event.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-cal-modal',
|
||||
templateUrl: './cal-modal.page.html',
|
||||
@@ -15,22 +18,31 @@ export class CalModalPage implements AfterViewInit {
|
||||
|
||||
viewTitle: string;
|
||||
|
||||
event = {
|
||||
title: '',
|
||||
desc: '',
|
||||
place: '',
|
||||
people: '',
|
||||
group: '',
|
||||
type: '',
|
||||
frequency: '',
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
allDay: true
|
||||
public postEvent: Event = {
|
||||
EventId: '',
|
||||
Subject: '',
|
||||
Body: null,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: '',
|
||||
StartDate: '',
|
||||
EndDate: '',
|
||||
EventType: '',
|
||||
RequiredAttendees: null,
|
||||
OptionalAttendees: null,
|
||||
HasAttachments: false,
|
||||
IsMeeting: false,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Categories: null,
|
||||
Attachments: null,
|
||||
};
|
||||
|
||||
modalReady = false;
|
||||
|
||||
constructor(private modalCtrl: ModalController) { }
|
||||
constructor(private modalCtrl: ModalController, private eventService: EventsService) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
@@ -42,7 +54,11 @@ export class CalModalPage implements AfterViewInit {
|
||||
}
|
||||
|
||||
save(){
|
||||
this.modalCtrl.dismiss({event: this.event})
|
||||
this.modalCtrl.dismiss({postEvent: this.eventService.AddEvent(this.postEvent)});
|
||||
/* this.eventService.AddEvent(); */
|
||||
console.log("created");
|
||||
|
||||
|
||||
}
|
||||
|
||||
onViewTitleChanged(title){
|
||||
@@ -50,7 +66,8 @@ export class CalModalPage implements AfterViewInit {
|
||||
}
|
||||
|
||||
onTimeSelected(ev){
|
||||
this.event.startTime = new Date(ev.selectedTime);
|
||||
/* this.postEvent.startTime = new Date(ev.selectedTime); */
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
Reference in New Issue
Block a user