mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -38,10 +38,10 @@ export class ViewEventPage implements OnInit {
|
||||
caller:string;
|
||||
customDate:any;
|
||||
today:any;
|
||||
|
||||
|
||||
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"];
|
||||
|
||||
|
||||
dicIndex = 0;
|
||||
|
||||
constructor(
|
||||
@@ -56,7 +56,7 @@ export class ViewEventPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private toastService: ToastService,
|
||||
)
|
||||
)
|
||||
{
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
@@ -75,11 +75,11 @@ export class ViewEventPage implements OnInit {
|
||||
console.log(params["eventId"]);
|
||||
}
|
||||
}); */
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
||||
this.loadEvent();
|
||||
this.getAttachments();
|
||||
|
||||
@@ -90,11 +90,11 @@ export class ViewEventPage implements OnInit {
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
}
|
||||
|
||||
@@ -110,31 +110,33 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
loadEvent(){
|
||||
const loader = this.toastService.loading();
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
|
||||
console.log(res);
|
||||
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
});
|
||||
}
|
||||
|
||||
deleteEvent(){
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento removido',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
this.goBack();
|
||||
this.toastService.successMessage('Evento apagado');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getAttachments() {
|
||||
@@ -146,18 +148,18 @@ export class ViewEventPage implements OnInit {
|
||||
console.log(res);
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async editEventDetail() {
|
||||
|
||||
console.log(this.caller);
|
||||
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EditEventPage,
|
||||
@@ -171,7 +173,7 @@ export class ViewEventPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if(res){
|
||||
setTimeout(() => {
|
||||
/* this.loadEvent(); */
|
||||
@@ -183,7 +185,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
async editEvent() {
|
||||
console.log(this.loadedEvent);
|
||||
|
||||
@@ -193,7 +195,7 @@ export class ViewEventPage implements OnInit {
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EditEventPage,
|
||||
componentProps:{
|
||||
@@ -205,7 +207,7 @@ export class ViewEventPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if(res){
|
||||
setTimeout(() => {
|
||||
/* this.loadEvent(); */
|
||||
@@ -223,7 +225,7 @@ export class ViewEventPage implements OnInit {
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -236,9 +238,9 @@ export class ViewEventPage implements OnInit {
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user