mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
save
This commit is contained in:
@@ -76,7 +76,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
this.camera.getPicture(options).then((imageData) => {
|
this.camera.getPicture(options).then((imageData) => {
|
||||||
// imageData is either a base64 encoded string or a file URI
|
// 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;
|
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||||
this.capturedImage = imageData;
|
this.capturedImage = imageData;
|
||||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||||
@@ -107,6 +107,8 @@ export class NewPublicationPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async save(){
|
async save(){
|
||||||
|
console.log('SAVE');
|
||||||
|
|
||||||
if(this.publicationType == '3'){
|
if(this.publicationType == '3'){
|
||||||
console.log(this.navParams.get('publication'));
|
console.log(this.navParams.get('publication'));
|
||||||
|
|
||||||
@@ -124,7 +126,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
}
|
}
|
||||||
console.log('Edit change image');
|
console.log('Edit change image');
|
||||||
console.log(this.publication);
|
console.log(this.publication);
|
||||||
this.publications.UpdatePublication(this.publication.ProcessId, this.publication);
|
this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise();
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -139,14 +141,13 @@ export class NewPublicationPage implements OnInit {
|
|||||||
FileBase64: this.publication.FileBase64,
|
FileBase64: this.publication.FileBase64,
|
||||||
FileExtension: 'jpeg',
|
FileExtension: 'jpeg',
|
||||||
}
|
}
|
||||||
/* console.log('Edit - keep image');
|
console.log('Edit - keep image');
|
||||||
console.log(this.publication); */
|
console.log(this.publication);
|
||||||
this.publications.UpdatePublication(this.publication.ProcessId, this.publication);
|
this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise();
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
this.publication = {
|
this.publication = {
|
||||||
DateIndex: new Date(),
|
DateIndex: new Date(),
|
||||||
DocumentId:null,
|
DocumentId:null,
|
||||||
@@ -161,7 +162,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
/* console.log('Create');
|
/* console.log('Create');
|
||||||
console.log(this.publication); */
|
console.log(this.publication); */
|
||||||
this.publications.CreatePublication(this.folderId, this.publication);
|
this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user