fix publications

This commit is contained in:
Peter Maquiran
2024-04-02 11:57:29 +01:00
parent 4e91973244
commit 6f94b0fa97
3 changed files with 20 additions and 11 deletions
@@ -143,6 +143,7 @@ export class NewPublicationPage implements OnInit {
private videoconvertService: VideoconvertService,
public PublicationFromMvService: PublicationFromMvService,
) {
this.PublicationFromMvService.clear()
this.publicationType = this.navParams.get('publicationType');
this.folderId = this.navParams.get('folderId');
@@ -166,12 +167,25 @@ export class NewPublicationPage implements OnInit {
}
}
if(this.publicationType == '3') {
this.PublicationFromMvService.form.setData({
DateIndex: publication.DateIndex,
DocumentId: publication.DocumentId,
ProcessId: publication.ProcessId,
Title: publication.Title,
Message: publication.Message,
DatePublication: publication.DatePublication
})
}
this.publicationTitle = 'Nova Publicação';
this.intent = this.navParams.get('intent');
this.convertBlobToBase64Worker = new Worker(new URL('./convertBlobToBase64.worker.js', import.meta.url));
this.PublicationFromMvService.clear()
}
ngOnInit() {
@@ -376,8 +390,6 @@ export class NewPublicationPage implements OnInit {
if (!window["sharedContent"]) {
this.close();
} else {
alert('dont close')
}
this.PublicationFromMvService.publicationType = this.publicationType as any
@@ -399,20 +411,17 @@ export class NewPublicationPage implements OnInit {
close() {
this.modalController.dismiss(this.PublicationFromMvService.form).then(() => {
alert('desmiss')
this.showLoader = true;
});
}
cancel() {
alert('this.PublicationFromMvService.form.send'+ this.PublicationFromMvService.form.send)
if(this.PublicationFromMvService.form.send == false) {
this.PublicationFromMvService.cancel()
this.PublicationFromMvService.ObjectMergeNotification.close()
}
this.modalController.dismiss(this.PublicationFromMvService.form).then(() => {
alert('desmiss2')
this.showLoader = true;
});
}