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:
@@ -13,6 +13,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Event } from '../../../models/event.model';
|
||||
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
@@ -94,7 +95,8 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
segment:string = "true";
|
||||
profile:string;
|
||||
eventAttendees: EventPerson[];
|
||||
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
loadedEventAttachments: Attachment[];
|
||||
taskParticipants: any = [];
|
||||
taskParticipantsCc: any = [];
|
||||
@@ -115,31 +117,18 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
private processes:ProcessesService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private router:Router,
|
||||
) {
|
||||
// Edit event to approve
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
|
||||
this.isEventEdited = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.getTask()
|
||||
console.log('HERE');
|
||||
this.getRecurrenceTypes();
|
||||
|
||||
this.selectedRecurringType = this.eventProcess.workflowInstanceDataFields.OccurrenceType;
|
||||
|
||||
setTimeout(() => {
|
||||
this.selectedRecurringType = this.eventProcess.workflowInstanceDataFields.OccurrenceType;
|
||||
console.log(this.selectedRecurringType);
|
||||
}, 1000);
|
||||
|
||||
|
||||
}
|
||||
|
||||
async getTask() {
|
||||
@@ -149,6 +138,9 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
this.eventProcess = result
|
||||
|
||||
this.startDate = new Date(this.eventProcess.workflowInstanceDataFields.StartDate);
|
||||
this.endDate = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
|
||||
|
||||
// description
|
||||
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
@@ -205,10 +197,26 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
goBack() {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"eventos": true,
|
||||
}
|
||||
};
|
||||
if( window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
} else {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
console.log('CLOSE');
|
||||
|
||||
}
|
||||
|
||||
save() {
|
||||
@@ -232,8 +240,8 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||
Location: this.eventProcess.workflowInstanceDataFields.Location,
|
||||
Subject: this.eventProcess.workflowInstanceDataFields.Subject,
|
||||
StartDate: this.eventProcess.workflowInstanceDataFields.StartDate,
|
||||
EndDate: this.eventProcess.workflowInstanceDataFields.EndDate,
|
||||
StartDate: this.startDate,
|
||||
EndDate: this.endDate,
|
||||
ReviewUserComment: '',
|
||||
MDName: this.eventProcess.workflowInstanceDataFields.MDName,
|
||||
MDEmail: this.eventProcess.workflowInstanceDataFields.MDEmail,
|
||||
@@ -277,8 +285,8 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
})
|
||||
|
||||
|
||||
//this.modalController.dismiss();
|
||||
this.modalController.dismiss();
|
||||
this.goBack();
|
||||
|
||||
}
|
||||
|
||||
@@ -326,8 +334,9 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
addParticipants(){
|
||||
this.adding = 'intervenient'
|
||||
|
||||
this.openAttendees();
|
||||
console.log('LOGS');
|
||||
|
||||
}
|
||||
|
||||
addParticipantsCC(){
|
||||
|
||||
Reference in New Issue
Block a user