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:
@@ -39,6 +39,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
@Input() publicationType: string;
|
||||
@Input() folderId: string;
|
||||
@Input() publicationId:string;
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails = new EventEmitter<any>();
|
||||
@Output() goBackToViewPublications = new EventEmitter<any>();
|
||||
@@ -59,10 +60,38 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if(this.publicationType == '3'){
|
||||
this.getPublicationDetail();
|
||||
}
|
||||
this.setTitle();
|
||||
this.clear();
|
||||
this.takePicture();
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
this.showLoader = true;
|
||||
console.log(this.publicationId);
|
||||
/* console.log(this.folderId); */
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
|
||||
console.log(res);
|
||||
/* this.publication = 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: 'jpeg',
|
||||
}
|
||||
this.pub = this.publication;
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
takePicture(){
|
||||
const options: CameraOptions = {
|
||||
quality: 90,
|
||||
@@ -189,7 +218,8 @@ export class NewPublicationPage implements OnInit {
|
||||
if(this.publicationType == '2'){
|
||||
this.goBackToViewPublications.emit();
|
||||
} else {
|
||||
this.goBacktoPublicationDetails.emit();
|
||||
this.goBackToViewPublications.emit();
|
||||
//this.goBacktoPublicationDetails.emit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user