mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
general review
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<ion-header class="ion-no-border px-20">
|
||||
<ion-toolbar class="px-10">
|
||||
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
|
||||
<ion-title class="pa-0">Pesquisar contactos</ion-title>
|
||||
</ion-toolbar>
|
||||
<ion-searchbar search-icon="undefined" #Searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
@@ -87,7 +87,7 @@
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end">
|
||||
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Adicionar</ion-label>
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user