general review

This commit is contained in:
Peter Maquiran
2023-08-21 17:36:32 +01:00
parent dd1ba46b0d
commit a02bcb13a3
14 changed files with 131 additions and 93 deletions
@@ -184,8 +184,9 @@ export class NewPublicationPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
const response = await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.httpErroHandle.httpsSucessMessagge('Criar publicação')
console.log({response})
this.goBack();
} catch (error) {
@@ -212,9 +213,10 @@ export class NewPublicationPage implements OnInit {
try {
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
const response = await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.httpErroHandle.httpsSucessMessagge('Criar publicação')
console.log({response})
this.goBack();
} catch (error) {
@@ -241,9 +243,10 @@ export class NewPublicationPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
const response =await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.httpErroHandle.httpsSucessMessagge('Criar publicação')
console.log({response})
this.goBack();
} catch (error) {
this.httpErroHandle.httpStatusHandle(error)
@@ -254,7 +257,9 @@ export class NewPublicationPage implements OnInit {
}
this.PublicationFolderService.loadPublication(this.publication.DocumentId, this.publication.ProcessId)
this.PublicationFolderService.deletePost(this.publication.DocumentId, this.publication.ProcessId)
}
else {
@@ -144,6 +144,15 @@ export class ViewPublicationsPage implements OnInit {
for( let publicationId of loadLater) {
await this.loadPublication(publicationId, folderId)
}
for(let localPublication of this.publicationFolderService.publicationList[folderId]) {
const apiPublication = publicationIds.includes(localPublication.DocumentId)
if(!apiPublication) {
this.publicationFolderService.deletePost(folderId, localPublication.DocumentId)
}
}
this.showLoader = false;