mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
@@ -409,21 +409,31 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
close() {
|
||||
|
||||
this.modalController.dismiss(this.PublicationFromMvService.form).then(() => {
|
||||
this.showLoader = true;
|
||||
});
|
||||
}
|
||||
|
||||
cancel() {
|
||||
|
||||
this.PublicationFromMvService.form.cancel = true
|
||||
if(this.PublicationFromMvService.form.send == false) {
|
||||
this.PublicationFromMvService.cancel()
|
||||
this.PublicationFromMvService.ObjectMergeNotification.close()
|
||||
}
|
||||
|
||||
this.modalController.dismiss(this.PublicationFromMvService.form).then(() => {
|
||||
this.showLoader = true;
|
||||
});
|
||||
if (window["sharedContent"]) {
|
||||
|
||||
if (this.platform.is('android')) {
|
||||
App.exitApp()
|
||||
} else {
|
||||
window["sharedContent"] = null;
|
||||
this.close()
|
||||
}
|
||||
} else {
|
||||
this.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
clear() {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
|
||||
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.Base64" style="height: 69px; width: 69px;"></ion-img>
|
||||
|
||||
<video class="sdf" *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video' && checkDesktop() == true" width="70" height="70"
|
||||
<video class="sdf" *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video' " width="70" height="70"
|
||||
preload="metadata" webkit-playsinline="webkit-playsinline">
|
||||
<source type="video/mp4" [src]="seleted.url">
|
||||
</video>
|
||||
|
||||
@@ -315,7 +315,7 @@ export class NewPublicationPage implements OnInit {
|
||||
console.log('load video tablet base64', content)
|
||||
this.filecontent = true;
|
||||
let fileObject = new PublicationAttachmentEntity({
|
||||
base64: 'data:video/mp4;base64,'+content.data,
|
||||
base64: content.data,
|
||||
extension: this.removeTextBeforeSlash(element.mimeType, '/'),
|
||||
OriginalFileName: 'video',
|
||||
FileType: this.checkFileType.checkFileType( this.removeTextBeforeSlash(element.mimeType, '/')) as any
|
||||
|
||||
@@ -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(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -215,6 +215,7 @@ export class PublicationFormModel implements IPublicationFormModelEntity {
|
||||
|
||||
hasSet = false
|
||||
send = false
|
||||
cancel = false
|
||||
|
||||
setData(data: IPublicationFormModelEntity) {
|
||||
if(data.Files) {
|
||||
|
||||
Reference in New Issue
Block a user