mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Melhorias na opção Back do EventDetails. Melhorias na actualização de dados da Agenda.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button defaultHref="/home/events"></ion-back-button>
|
||||
<ion-back-button defaultHref="{{ backURL }}"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title>Visualizar Evento</ion-title>
|
||||
<ion-buttons slot="end">
|
||||
@@ -57,7 +57,7 @@
|
||||
<ion-item>
|
||||
<ion-label>Data Fim</ion-label>
|
||||
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
displayFormat="D MMM YYYY HH:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
<div class="div-card-button">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, Injectable } from '@angular/core';
|
||||
import { Component, OnInit, ViewChildren, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -7,6 +7,7 @@ import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { AlertController, ModalController } from '@ionic/angular';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { DEFAULT_ENCODING } from 'crypto';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-detail',
|
||||
@@ -16,6 +17,9 @@ import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
|
||||
export class EventDetailPage implements OnInit {
|
||||
|
||||
loadedEvent: Event;
|
||||
backURL: string;
|
||||
|
||||
minDate: Date;
|
||||
|
||||
constructor(public alertController: AlertController, private router: Router, private activatedRoute: ActivatedRoute, private eventsService: EventsService, private modalCtrl: ModalController) {
|
||||
this.loadedEvent = new Event();
|
||||
@@ -28,20 +32,30 @@ export class EventDetailPage implements OnInit {
|
||||
|
||||
loadEvent()
|
||||
{
|
||||
let eventid: string;
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>
|
||||
{
|
||||
if (!paramMap.has("eventId"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
eventid = paramMap.get('eventId');
|
||||
}
|
||||
|
||||
this.eventsService.getEvent(paramMap.get('eventId')).subscribe(response =>
|
||||
{
|
||||
this.loadedEvent = response;
|
||||
//this.eventsService.lastloadedevent = this.loadedEvent;
|
||||
});
|
||||
if (paramMap.has("caller"))
|
||||
{
|
||||
this.backURL = "/home/" + paramMap.get('caller');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
this.eventsService.getEvent(eventid).subscribe(response =>
|
||||
{
|
||||
this.loadedEvent = response;
|
||||
});
|
||||
}
|
||||
|
||||
async openAttendees()
|
||||
@@ -127,9 +141,11 @@ export class EventDetailPage implements OnInit {
|
||||
});
|
||||
|
||||
await alert.present();
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
});
|
||||
}
|
||||
|
||||
back()
|
||||
{
|
||||
//this.back();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of eventsList"
|
||||
[routerLink]="['/home/events', event.EventId]">
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<div class="div-item-{{event.CalendarName}}">
|
||||
<div class="div-up">
|
||||
<div class="div-icon">
|
||||
|
||||
@@ -77,7 +77,6 @@ export class EventsPage implements OnInit {
|
||||
.subscribe(response => {
|
||||
this.eventsList = response;
|
||||
this.showLoader = false;
|
||||
console.log(response[0].HasAttachments)
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user