This commit is contained in:
tiago.kayaya
2021-11-09 12:21:23 +01:00
parent cafe397f2c
commit f7c8942444
2 changed files with 9 additions and 5 deletions
@@ -80,6 +80,8 @@ export class NewPublicationPage implements OnInit {
ngOnInit() {
this.setTitle();
console.log(this.folderId);
// this.takePicture();
}
@@ -189,7 +191,7 @@ async takePicture() {
if(this.publicationType == '3') {
console.log(this.navParams.get('publication'));
if(this.capturedImage != '') {
if(this.capturedImage != ''){
this.publication = {
DateIndex: this.publication.DateIndex,
DocumentId:this.publication.DocumentId,
@@ -208,11 +210,11 @@ async takePicture() {
console.log(this.publication);
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.toastService.successMessage("Publicação criado")
this.toastService.successMessage("Publicação editada")
this.close();
} catch (error) {
this.toastService.badRequest("Publicação não criado")
this.toastService.badRequest("Publicação não editada")
} finally {
loader.remove()
}
@@ -281,7 +283,9 @@ async takePicture() {
else {
const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss')
console.log(date)
console.log(date);
console.log(this.folderId);
this.publication = {
DateIndex: date,
@@ -196,7 +196,7 @@ export class ViewPublicationsPage implements OnInit {
component: NewPublicationPage,
componentProps: {
publicationType: publicationType,
folderId: folderId,
folderId: this.folderId,
},
cssClass: 'new-publication modal modal-desktop',
backdropDismiss: false