This commit is contained in:
Peter Maquiran
2021-06-30 16:11:07 +01:00
parent 6bf39545b6
commit 5fb6ca2ecf
3 changed files with 23 additions and 26 deletions
@@ -177,16 +177,11 @@ export class NewPublicationPage implements OnInit {
FileBase64: this.capturedImage,
FileExtension: 'jpeg',
}
/* console.log('Create');
console.log(this.publication); */
this.publications.CreatePublication(this.folderId, this.publication).toPromise();
this.close();
try {
console.log(this.publication);
await this.publications.CreatePublication(this.folderId, this.publication).toPromise()
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
this.close();
this.toastService.successMessage("Publicação criado")
@@ -11,6 +11,7 @@ import { EventsService } from 'src/app/services/events.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -58,8 +59,6 @@ export class EditEventToApprovePage implements OnInit {
@ViewChild('fim') fim: any;
@ViewChild('inicio') inicio: any;
@ViewChild('picker1') picker1: any;
@Input() serialNumber: string
loadedAttachments: Attachment[]= []
@@ -91,8 +90,6 @@ export class EditEventToApprovePage implements OnInit {
eventAttendees: EventPerson[];
loadedEventAttachments: Attachment[];
taskParticipants: any = [];
taskParticipantsCc: any = [];
adding: "intervenient" | "CC" = "intervenient";
showAttendees = false;
@@ -106,6 +103,9 @@ export class EditEventToApprovePage implements OnInit {
@Output() closeComponent = new EventEmitter<any>();
@Input() saveData: any;
@Input() serialNumber: string
@Input() taskParticipants: EventPerson[];
@Input() taskParticipantsCc: EventPerson[];
constructor(
private modalController: ModalController,
@@ -161,6 +161,9 @@ export class EditEventToApprovePage implements OnInit {
}
})
}
this.taskParticipants = removeDuplicate(this.taskParticipants)
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc)
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
this.isRecurring = "Não se repete";
@@ -274,21 +277,21 @@ export class EditEventToApprovePage implements OnInit {
// }
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
this.taskParticipants = taskParticipants;
this.taskParticipantsCc = taskParticipantsCc;
this.taskParticipants = removeDuplicate(taskParticipants) ;
this.taskParticipantsCc = removeDuplicate(taskParticipantsCc) ;
}
// async addParticipants() {
async addParticipants() {
// //this.saveTemporaryData();
//this.saveTemporaryData();
// this.openAttendeesComponent.emit({
// type: "intervenient"
// });
this.openAttendeesComponent.emit({
type: "intervenient"
});
// this.clearContact.emit();
// }
this.clearContact.emit();
}
async addParticipantsCC() {
@@ -3,6 +3,7 @@ import { ModalController } from '@ionic/angular';
import { ContactsService } from 'src/app/services/contacts.service';
import { EventPerson } from 'src/app/models/eventperson.model';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
@Component({
selector: 'app-attendee-modal',
templateUrl: './attendee-modal.page.html',
@@ -35,16 +36,14 @@ export class AttendeePage implements OnInit {
private modalCtrl: ModalController,
private contactsService: ContactsService ) {
this.LtaskParticipants = this.taskParticipants;
this.LtaskParticipantsCc = this.taskParticipantsCc;
this.LtaskParticipants = removeDuplicate(this.taskParticipants);
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
}
ngOnChanges(){
this.LtaskParticipants = this.taskParticipants;
this.LtaskParticipantsCc = this.taskParticipantsCc;
this.LtaskParticipants = removeDuplicate(this.taskParticipants);
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
}
currentPath = window.location.pathname;
@Input() adding: "intervenient" | "CC";