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() { ngOnInit() {
this.setTitle(); this.setTitle();
console.log(this.folderId);
// this.takePicture(); // this.takePicture();
} }
@@ -189,7 +191,7 @@ async takePicture() {
if(this.publicationType == '3') { if(this.publicationType == '3') {
console.log(this.navParams.get('publication')); console.log(this.navParams.get('publication'));
if(this.capturedImage != '') { if(this.capturedImage != ''){
this.publication = { this.publication = {
DateIndex: this.publication.DateIndex, DateIndex: this.publication.DateIndex,
DocumentId:this.publication.DocumentId, DocumentId:this.publication.DocumentId,
@@ -208,11 +210,11 @@ async takePicture() {
console.log(this.publication); console.log(this.publication);
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise() await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.toastService.successMessage("Publicação criado") this.toastService.successMessage("Publicação editada")
this.close(); this.close();
} catch (error) { } catch (error) {
this.toastService.badRequest("Publicação não criado") this.toastService.badRequest("Publicação não editada")
} finally { } finally {
loader.remove() loader.remove()
} }
@@ -281,7 +283,9 @@ async takePicture() {
else { else {
const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss') const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss')
console.log(date) console.log(date);
console.log(this.folderId);
this.publication = { this.publication = {
DateIndex: date, DateIndex: date,
@@ -196,7 +196,7 @@ export class ViewPublicationsPage implements OnInit {
component: NewPublicationPage, component: NewPublicationPage,
componentProps: { componentProps: {
publicationType: publicationType, publicationType: publicationType,
folderId: folderId, folderId: this.folderId,
}, },
cssClass: 'new-publication modal modal-desktop', cssClass: 'new-publication modal modal-desktop',
backdropDismiss: false backdropDismiss: false