mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Removed slice method + few changes
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="floating">Descrição</ion-label>
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text"></ion-textarea>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Body.Text"></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="floating">Localização</ion-label>
|
||||
@@ -53,7 +53,7 @@
|
||||
</ion-item>
|
||||
<div class="div-attach">
|
||||
<ion-item lines="none">
|
||||
<ion-icon name="add" slot="end" (click)="addAttendees()"></ion-icon>
|
||||
<ion-icon name="add" slot="end" (click)="openAttendees()"></ion-icon>
|
||||
<ion-label class="attach-label">Intervenientes</ion-label>
|
||||
</ion-item>
|
||||
<div id="AttachFiles"></div>
|
||||
|
||||
@@ -4,6 +4,7 @@ import { ModalController } from '@ionic/angular';
|
||||
import { Event } from '../../models/event.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
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';
|
||||
@@ -14,13 +15,13 @@ import { AlertService } from 'src/app/services/alert.service';
|
||||
templateUrl: './cal-modal.page.html',
|
||||
styleUrls: ['./cal-modal.page.scss'],
|
||||
})
|
||||
export class CalModalPage implements AfterViewInit {
|
||||
export class CalModalPage implements OnInit {
|
||||
|
||||
calendar = {
|
||||
mode: 'month',
|
||||
currentDate: new Date()
|
||||
};
|
||||
|
||||
|
||||
viewTitle: string;
|
||||
postEvent: Event;
|
||||
modalReady = false;
|
||||
@@ -68,7 +69,7 @@ export class CalModalPage implements AfterViewInit {
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: AttendeeModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.eventAttendees
|
||||
eventPersons: this.postEvent.Attendees
|
||||
},
|
||||
cssClass: 'attendee-modal',
|
||||
backdropDismiss: false
|
||||
@@ -104,4 +105,26 @@ export class CalModalPage implements AfterViewInit {
|
||||
this.alertController.presentAlert("Funcionalidade em desenvolvimento");
|
||||
}
|
||||
|
||||
async openAttendees()
|
||||
{
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: AttendeesPage,
|
||||
componentProps: {
|
||||
eventAttendees: this.postEvent.Attendees
|
||||
},
|
||||
cssClass: 'attendee',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.postEvent.Attendees = newattendees;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,16 +91,15 @@
|
||||
<div class="div-attach" >
|
||||
<ion-item>
|
||||
<ion-buttons slot="end" (click)="openAttendees()">
|
||||
<ion-icon name="people" slot="start" ></ion-icon>
|
||||
<ion-label>Ver mais</ion-label>
|
||||
<ion-label color="secondary">Editar</ion-label>
|
||||
</ion-buttons>
|
||||
<ion-label class="attach-label">Intervenientes</ion-label>
|
||||
</ion-item>
|
||||
<div id="AttachFiles"></div>
|
||||
<ion-list>
|
||||
<ion-item class="attendees" lines="none" *ngFor="let attendee of loadedEvent.Attendees.slice(0, 2)">
|
||||
<ion-item class="attendees" lines="none" *ngFor="let attendee of loadedEvent.Attendees">
|
||||
<ion-icon class="attendees-icon" name="person" slot="start"></ion-icon>
|
||||
<ion-label color="secondary" class="attendees-list">{{attendee.Name}}</ion-label>
|
||||
<ion-label class="attendees-list">{{attendee.Name}}</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
@@ -108,8 +107,7 @@
|
||||
<ion-item>
|
||||
|
||||
<ion-buttons slot="end" (click)="showAlert()">
|
||||
<ion-icon name="documents" slot="start"></ion-icon>
|
||||
<ion-label>Ver mais</ion-label>
|
||||
<ion-label color="secondary">Editar</ion-label>
|
||||
</ion-buttons>
|
||||
<ion-label class="attach-label">Anexos</ion-label>
|
||||
</ion-item>
|
||||
@@ -119,15 +117,18 @@
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<ion-item lines="none" *ngFor="let att of loadedEventAttachments.slice(0, 2)">
|
||||
<ion-item lines="none" *ngFor="let att of loadedEventAttachments">
|
||||
<ion-icon name="attach" slot="start"></ion-icon>
|
||||
<ion-label color="secondary">
|
||||
<ion-label>
|
||||
<p>{{ att.Description }}</p>
|
||||
<p>{{ att.CreateDate }}</p>
|
||||
</ion-label>
|
||||
<!-- <ion-icon name="trash" slot="end"></ion-icon> -->
|
||||
</ion-item>
|
||||
<ion-item lines="none" *ngIf="!loadedEvent.HasAttachments">
|
||||
|
||||
</ion-list>
|
||||
<ion-list *ngIf="!loadedEvent.HasAttachments">
|
||||
<ion-item lines="none" >
|
||||
<ion-label>
|
||||
Sem anexos
|
||||
</ion-label>
|
||||
@@ -201,11 +202,13 @@
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
<ion-footer class="ion-no-border">
|
||||
<div class="event-detail-buttons">
|
||||
<!-- <ion-button shape="round" fill="outline" class="ion-button-left" (click)="deleteConfirm()">Apagar</ion-button> -->
|
||||
<ion-button shape="round" (click)="Save()">Gravar</ion-button>
|
||||
</div>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<div class="event-detail-buttons">
|
||||
<ion-button shape="round" (click)="Save()">Gravar</ion-button>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
|
||||
|
||||
@@ -81,3 +81,10 @@ ion-card{
|
||||
font-weight: bold;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
/* .event-detail-buttons{
|
||||
margin-bottom: 80px;
|
||||
margin-top: 10px;
|
||||
} */
|
||||
.attendees-icon{
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -106,6 +106,11 @@
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</ion-list>
|
||||
<!-- <ion-list *ngIf="!officialeventsList">
|
||||
<ion-item lines="none">
|
||||
Sem eventos
|
||||
</ion-item>
|
||||
</ion-list> -->
|
||||
<!-- OFICIAL -->
|
||||
<ion-list *ngSwitchCase="'Oficial'">
|
||||
<ion-item-group>
|
||||
|
||||
Reference in New Issue
Block a user