mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
merge branch
This commit is contained in:
@@ -32,6 +32,7 @@ export class NewPublicationPage implements OnInit {
|
||||
@Input() publication!: Publication;
|
||||
@Input() publicationType: string;
|
||||
@Input() folderId:string;
|
||||
@Input() documentId:string;
|
||||
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails = new EventEmitter<any>();
|
||||
@@ -64,16 +65,45 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
setData() {
|
||||
if(!this.publication) {
|
||||
if(!this.publicationType) {
|
||||
setTimeout(() => {
|
||||
this.setData()
|
||||
}, 500)
|
||||
} else {
|
||||
this.pub = this.publication
|
||||
// this.pub = this.publication
|
||||
// this.publication = null
|
||||
this.getPublicationDetail()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getPublicationDetail() {
|
||||
|
||||
if(this.publicationType != '2') {
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.documentId).subscribe( res => {
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
DocumentId: res.DocumentId,
|
||||
ProcessId:res.ProcessId,
|
||||
Title:res.Title,
|
||||
Message: res.Message,
|
||||
DatePublication: res.DatePublication,
|
||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||
OriginalFileName: res.OriginalFileName,
|
||||
FileExtension: res.FileExtension,
|
||||
}
|
||||
this.pub = this.publication;
|
||||
this.showLoader = false;
|
||||
}, () => {
|
||||
this.showLoader = false;
|
||||
this.goBack()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async takePicture() {
|
||||
const capturedImage = await Camera.getPhoto({
|
||||
quality: 50,
|
||||
@@ -130,6 +160,16 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
if(this.publicationType == '3') {
|
||||
|
||||
if(!this.publication?.OriginalFileName || !this.pub.OriginalFileName) {
|
||||
|
||||
if(this.pub?.OriginalFileName) {
|
||||
console.log('this.pub',this.pub)
|
||||
}
|
||||
throw('no this.publication.OriginalFileName')
|
||||
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
if(this.capturedImage != '') {
|
||||
|
||||
Reference in New Issue
Block a user