mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
save
This commit is contained in:
@@ -45,6 +45,8 @@ export class EditEventToApprovePage implements OnInit {
|
||||
public stepSecond = 5;
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
recurringTypes: any;
|
||||
selectedRecurringType: any;
|
||||
|
||||
showLoader = false
|
||||
|
||||
@@ -127,12 +129,16 @@ export class EditEventToApprovePage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.log('EDITAR');
|
||||
|
||||
|
||||
if(this.restoreTemporaryData()){
|
||||
this.setOtherData()
|
||||
} else {
|
||||
this.getTask();
|
||||
|
||||
}
|
||||
this.getRecurrenceTypes();
|
||||
|
||||
}
|
||||
|
||||
@@ -156,6 +162,24 @@ export class EditEventToApprovePage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
||||
console.log(res);
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev:any){
|
||||
console.log(ev);
|
||||
if(ev.length > 1){
|
||||
console.log(ev.filter(data => data != '-1'));
|
||||
this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
this.eventProcess.workflowInstanceDataFields.OccurrenceType = "-1";
|
||||
}
|
||||
}
|
||||
|
||||
setOtherData() {
|
||||
if(this.eventProcess.workflowInstanceDataFields.ParticipantsList) {
|
||||
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
|
||||
@@ -274,6 +298,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
|
||||
}
|
||||
|
||||
console.log(event);
|
||||
|
||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||
this.toastService.successMessage('Evento editado');
|
||||
|
||||
Reference in New Issue
Block a user