mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
general review
This commit is contained in:
@@ -227,8 +227,9 @@ 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.httpErrorHandle.httpsSucessMessagge('Publicação Editada')
|
||||
console.log({response})
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
@@ -255,8 +256,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.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
console.log({response})
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
@@ -281,9 +283,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.httpErrorHandle.httpsSucessMessagge('Publicação Editada')
|
||||
|
||||
console.log({response})
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
@@ -293,7 +295,8 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
this.PublicationFolderService.loadPublication(this.publication.DocumentId, this.publication.ProcessId)
|
||||
this.PublicationFolderService.deletePost(this.publication.DocumentId, this.publication.ProcessId)
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
@@ -169,6 +169,14 @@ 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user