Edit event show attachment

This commit is contained in:
Peter Maquiran
2021-04-19 18:03:41 +01:00
parent 8b26ffd9a5
commit e794c12872
5 changed files with 69 additions and 17 deletions
@@ -32,6 +32,8 @@ export class ViewEventPage implements OnInit {
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
documents: Attachment[] = [];
@Input() profile:string;
@Input() eventId: string;
@@ -76,12 +78,15 @@ export class ViewEventPage implements OnInit {
loadEvent(){
this.eventsService.getEvent(this.eventId).subscribe(res => {
this.loadedEvent = res;
console.log(res);
// console.log(res);
this.today = new Date(res.StartDate);
console.log(new Date(this.today));
// console.log(new Date(this.today));
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
this.getAttachments(this.loadedEvent.EventId);
});
}
deleteEvent(){
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>