mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user