mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix publications
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -90,11 +90,11 @@ export class NewPublicationPage implements OnInit {
|
||||
private modalController: ModalController
|
||||
) {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
this.PublicationFromMvService.clear()
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.PublicationFromMvService.clear()
|
||||
this.setAction();
|
||||
this.setData()
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import { IPublicationFormModelEntity } from '../new-publication/interface/interf
|
||||
import { CMAPIService } from "src/app/shared/repository/CMAPI/cmapi.service"
|
||||
import { App } from '@capacitor/app';
|
||||
import { ModalController, NavParams, Platform, LoadingController } from '@ionic/angular';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
enum ActionType {
|
||||
newRapid = "1",
|
||||
@@ -43,6 +44,7 @@ export class PublicationFromMvService {
|
||||
public publicationFolderService: PublicationFolderService,
|
||||
private platform: Platform,
|
||||
private modalController: ModalController,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
|
||||
@@ -188,9 +190,6 @@ export class PublicationFromMvService {
|
||||
OriginalFileName: e.OriginalFileName || 'foto'
|
||||
}))
|
||||
|
||||
publication.DocumentId = null;
|
||||
publication.ProcessId = this.folderId
|
||||
|
||||
try {
|
||||
|
||||
await this.publications.CreatePublication(publication.ProcessId, publication).toPromise()
|
||||
@@ -230,7 +229,6 @@ export class PublicationFromMvService {
|
||||
|
||||
closeApp() {
|
||||
if (window["sharedContent"]) {
|
||||
alert('close android')
|
||||
|
||||
if (this.platform.is('android')) {
|
||||
App.exitApp()
|
||||
@@ -240,7 +238,9 @@ export class PublicationFromMvService {
|
||||
|
||||
if (this.platform.is('ios')) {
|
||||
this.modalController.dismiss(this.form).then(() => {
|
||||
this.router.navigate(['/home/publications', this.folderId])
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user