All changes i made

This commit is contained in:
Eudes Inácio
2023-02-27 09:34:36 +01:00
77 changed files with 8025 additions and 6717 deletions
@@ -4,6 +4,7 @@ import * as moment from 'moment';
import { PublicationFolder } from 'src/app/models/publicationfolder';
import { PublicationsService } from 'src/app/services/publications.service';
import { ToastService } from 'src/app/services/toast.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
@Component({
selector: 'app-edit-action',
@@ -40,6 +41,7 @@ export class EditActionPage implements OnInit {
constructor(
private publicationsService: PublicationsService,
private toastService: ToastService,
private httpErrorHandle: HttpErrorHandle,
) {
this.folder = new PublicationFolder();
}
@@ -107,15 +109,11 @@ export class EditActionPage implements OnInit {
await this.publicationsService.UpdatePresidentialAction(body).toPromise()
this.close();
this.updateDesktopComponent.emit();
this.toastService._successMessage('Acção presidencial atualizada')
this.httpErrorHandle.httpsSucessMessagge('Editar Acção')
this.getActions.emit()
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
}
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}