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