This commit is contained in:
tiago.kayaya
2021-06-30 08:27:43 +01:00
parent 4856bd9b63
commit c81d4eaf1e
@@ -76,7 +76,7 @@ export class NewPublicationPage implements OnInit {
this.camera.getPicture(options).then((imageData) => {
// imageData is either a base64 encoded string or a file URI
// If it's base64 (DATA_URL):
// If it's base64 (DATA_URL):
let base64Image = 'data:image/jpeg;base64,' + imageData;
this.capturedImage = imageData;
this.capturedImageTitle = new Date().getTime() + '.jpeg';
@@ -107,6 +107,8 @@ export class NewPublicationPage implements OnInit {
}
async save(){
console.log('SAVE');
if(this.publicationType == '3'){
console.log(this.navParams.get('publication'));
@@ -124,7 +126,7 @@ export class NewPublicationPage implements OnInit {
}
console.log('Edit change image');
console.log(this.publication);
this.publications.UpdatePublication(this.publication.ProcessId, this.publication);
this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise();
this.close();
}
else{
@@ -139,14 +141,13 @@ export class NewPublicationPage implements OnInit {
FileBase64: this.publication.FileBase64,
FileExtension: 'jpeg',
}
/* console.log('Edit - keep image');
console.log(this.publication); */
this.publications.UpdatePublication(this.publication.ProcessId, this.publication);
console.log('Edit - keep image');
console.log(this.publication);
this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise();
this.close();
}
}
else{
this.publication = {
DateIndex: new Date(),
DocumentId:null,
@@ -161,7 +162,7 @@ export class NewPublicationPage implements OnInit {
/* console.log('Create');
console.log(this.publication); */
this.publications.CreatePublication(this.folderId, this.publication);
this.publications.CreatePublication(this.folderId, this.publication).toPromise();
this.close();
}
}