mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Changes on Home view
This commit is contained in:
@@ -12,15 +12,19 @@
|
||||
<ion-content>
|
||||
<div class="div-ion-content">
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Assunto</ion-label>
|
||||
<ion-label>Assunto</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Descrição</ion-label>
|
||||
<!-- <ion-item>
|
||||
<ion-label>Descrição</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Body.Text"></ion-input>
|
||||
</ion-item> -->
|
||||
<ion-item>
|
||||
<ion-label>Descrição</ion-label>
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder=""></ion-textarea>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Localização</ion-label>
|
||||
<ion-label>Localização</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</ion-item>
|
||||
<!-- <ion-item>
|
||||
@@ -69,21 +73,23 @@
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
<!-- <div class="div-attach">
|
||||
<ion-item>
|
||||
<ion-icon name="add" slot="end"></ion-icon>
|
||||
<ion-item lines="none">
|
||||
<ion-icon name="add" slot="end" (click)="addAttendees()"></ion-icon>
|
||||
<ion-label class="attach-label">Intervenientes</ion-label>
|
||||
</ion-item>
|
||||
<div id="AttachFiles"></div>
|
||||
</div>
|
||||
<div class="div-attach">
|
||||
<ion-item lines="none">
|
||||
<ion-icon name="add" slot="end" (click)="showAlert()"></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-list>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
<ion-footer class="ion-no-border">
|
||||
<ion-toolbar color="primary">
|
||||
<ion-buttons slot="start">
|
||||
|
||||
@@ -13,4 +13,11 @@
|
||||
border: 1px solid #ccc;
|
||||
margin: 15px 0 0 0;
|
||||
padding: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ion-item{
|
||||
display: block;
|
||||
border: 1px solid red;
|
||||
width: 100%;
|
||||
float: left;
|
||||
} */
|
||||
@@ -5,6 +5,10 @@ import { Event } from '../../models/event.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
|
||||
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';
|
||||
|
||||
@Component({
|
||||
selector: 'app-cal-modal',
|
||||
templateUrl: './cal-modal.page.html',
|
||||
@@ -21,9 +25,13 @@ export class CalModalPage implements AfterViewInit {
|
||||
postEvent: Event;
|
||||
modalReady = false;
|
||||
|
||||
constructor(private modalCtrl: ModalController, private eventService: EventsService) {
|
||||
eventAttendees: EventPerson[];
|
||||
segment:string = "true";
|
||||
|
||||
constructor(private modalCtrl: ModalController, private eventService: EventsService, private alertController:AlertService) {
|
||||
this.postEvent = new Event();
|
||||
this.postEvent.Body = { BodyType : "1", Text : ""};
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -52,4 +60,46 @@ export class CalModalPage implements AfterViewInit {
|
||||
close(){
|
||||
this.modalCtrl.dismiss();
|
||||
}
|
||||
|
||||
|
||||
|
||||
async addAttendees()
|
||||
{
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: AttendeeModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.eventAttendees
|
||||
},
|
||||
cssClass: 'attendee-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
console.log(this.eventAttendees);
|
||||
|
||||
if (newattendees != null)
|
||||
{
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
"EmailAddress": newattendee.EmailAddress,
|
||||
"Name": newattendee.Name,
|
||||
"IsRequired": (this.segment == "true")
|
||||
};
|
||||
if (this.eventAttendees == null)
|
||||
{
|
||||
this.eventAttendees = new Array();
|
||||
}
|
||||
this.postEvent.Attendees = this.eventAttendees;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
showAlert(){
|
||||
this.alertController.presentAlert("Funcionalidade em desenvolvimento");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user