Merge branch 'feature/viewer-attachment' of https://bitbucket.org/equilibriumito/gabinete-digital-fo into feature/viewer-attachment

This commit is contained in:
Equilibrium ITO
2024-04-01 12:52:30 +01:00
5 changed files with 72 additions and 39 deletions
@@ -10,6 +10,8 @@ import { v4 as uuidv4 } from 'uuid'
import { Result } from 'neverthrow';
import { IPublicationFormModelEntity } from '../new-publication/interface/interface';
import { CMAPIService } from "src/app/shared/repository/CMAPI/cmapi.service"
import { App } from '@capacitor/app';
import { ModalController, NavParams, Platform, LoadingController } from '@ionic/angular';
enum ActionType {
newRapid = "1",
@@ -37,7 +39,8 @@ export class PublicationFromMvService {
private httpErroHandle: HttpErrorHandle,
public PublicationFolderService: PublicationFolderService,
private CMAPIService: CMAPIService,
public publicationFolderService: PublicationFolderService
public publicationFolderService: PublicationFolderService,
private platform: Platform,
) {}
@@ -63,7 +66,7 @@ export class PublicationFromMvService {
this.folderId = folderId
}
save = async() => {
save = async() => {
const needChunk = this.needToUploadChunk()
@@ -183,7 +186,7 @@ export class PublicationFromMvService {
try {
await this.publications.CreatePublication(publication.ProcessId, publication).toPromise()
this.closeApp()
if (this.publicationType == '1') {
} else if (this.publicationType == '2') {
@@ -219,7 +222,21 @@ export class PublicationFromMvService {
// this.PublicationHolderService.setPublication(this.publicationFormMV)
this.ObjectMergeNotification.close()
}
closeApp() {
if (window["sharedContent"]) {
if (this.platform.is('android')) {
App.exitApp()
} else {
window["sharedContent"] = null
}
}
}