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:
@@ -113,11 +113,19 @@ export class PublicationFromMvService {
|
||||
|
||||
publication.ProcessId = this.folderId
|
||||
|
||||
if(this.form.cancel) {
|
||||
window['upload-header-set-remove'](this.id);
|
||||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
const response = await this.publications.UpdatePublication(publication.ProcessId, publication).toPromise()
|
||||
|
||||
this.httpErroHandle.httpsSucessMessagge('Editar publicação')
|
||||
if (!this.form.cancel) {
|
||||
this.httpErroHandle.httpsSucessMessagge('Editar publicação')
|
||||
}
|
||||
|
||||
this.publicationFolderService.getPublicationsIds(this.folderId)
|
||||
window['upload-header-set-remove'](this.id);
|
||||
|
||||
@@ -195,21 +203,24 @@ export class PublicationFromMvService {
|
||||
publication.DocumentId = null;
|
||||
publication.ProcessId = this.folderId
|
||||
|
||||
if(this.form.cancel) {
|
||||
window['upload-header-set-remove'](this.id);
|
||||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
await this.publications.CreatePublication(publication.ProcessId, publication).toPromise()
|
||||
|
||||
if (this.publicationType == '1') {
|
||||
if (this.publicationType == '1' && !this.form.cancel) {
|
||||
this.httpErroHandle.httpsSucessMessagge('Criar publicação')
|
||||
} else if (this.publicationType == '2') {
|
||||
} else if (this.publicationType == '2' && !this.form.cancel) {
|
||||
this.httpErroHandle.httpsSucessMessagge('Criar publicação')
|
||||
} else if (this.publicationType == '3') {
|
||||
this.httpErroHandle.httpsSucessMessagge('Editar publicação')
|
||||
}
|
||||
|
||||
// this.goBackToViewPublications.emit();
|
||||
window['upload-header-set-remove'](this.id);
|
||||
this.closeApp()
|
||||
this.doneUpload()
|
||||
this.publicationFolderService.getPublicationsIds(this.folderId)
|
||||
} catch (error) {
|
||||
window['upload-header-set-retry'](this.id)
|
||||
@@ -232,11 +243,14 @@ export class PublicationFromMvService {
|
||||
|
||||
}
|
||||
|
||||
closeApp() {
|
||||
doneUpload() {
|
||||
if (window["sharedContent"]) {
|
||||
|
||||
if (this.platform.is('android')) {
|
||||
App.exitApp()
|
||||
window["sharedContent"] = null
|
||||
this.modalController.dismiss(this.form).then(() => {
|
||||
this.router.navigate(['/home/publications', this.folderId])
|
||||
});
|
||||
} else {
|
||||
window["sharedContent"] = null
|
||||
this.modalController.dismiss(this.form).then(() => {
|
||||
@@ -244,6 +258,8 @@ export class PublicationFromMvService {
|
||||
});
|
||||
|
||||
}
|
||||
} else {
|
||||
this.modalController.dismiss(this.form).then(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user