Git pull made

This commit is contained in:
Eudes Inácio
2023-02-02 18:28:17 +01:00
107 changed files with 1262 additions and 525 deletions
@@ -192,7 +192,12 @@ export class ApproveEventPage implements OnInit {
this.toastService._successMessage('Evento enviado para revisão');
this.close();
} catch (error) {
this.toastService._badRequest();
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest();
}
} finally {
loader.remove()
}
@@ -415,7 +415,12 @@ export class EditEventToApprovePage implements OnInit {
this.toastService._successMessage();
this.goToApproveEventList();
} catch (error) {
this.toastService._badRequest();
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest();
}
} finally {
loader.remove()
}
@@ -59,7 +59,7 @@ export class EventListPage implements OnInit {
ngOnChanges() {
this.LoadToApproveEvents();
setTimeout(() => {
this.LoadToApproveEvents();
this.LoadToApproveEventsNoLoader();
}, 3000)
}
@@ -107,6 +107,43 @@ export class EventListPage implements OnInit {
}
}
async LoadToApproveEventsNoLoader() {
try {
if(this.segment == 'MDGPR') {
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
let allEvents = mdEventsOficial.concat(mdEventsPessoal);
if(allEvents.length > 0) {
this.eventsMDGPRList = this.sortService.sortArrayByDate(allEvents).reverse();
}
this.showLoader = false;
}
else if(this.segment == 'PR') {
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise();
let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise();
let allEvents = prEventsOficial.concat(prEventsPessoal);
if(allEvents.length > 0) {
this.eventsPRList = this.sortService.sortArrayByDate(allEvents).reverse();
}
this.showLoader = false;
} else {
let genericEvents = await this.processes.GetTasksList('Agendar Evento', false).toPromise();
if(genericEvents.length > 0) {
this.eventsGenericList = this.sortService.sortArrayByDate(genericEvents).reverse();
}
this.showLoader = false;
}
} catch(erro) {
this.showLoader = false;
}
}
async openApproveModal(eventSerialNumber, data) {
@@ -25,6 +25,7 @@ import { FormGroup, Validators } from '@angular/forms';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { ThemeService } from 'src/app/services/theme.service'
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
import { ServerConnectionService } from 'src/app/services/server-connection.service';
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
@@ -129,6 +130,7 @@ export class NewEventPage implements OnInit {
private dateAdapter: DateAdapter<any>,
public ThemeService: ThemeService,
private chatMethodService: ChatMethodsService,
private ServerConnectionService: ServerConnectionService
// private translate: TranslateService
) {
this.dateAdapter.setLocale('pt');
@@ -529,9 +531,15 @@ export class NewEventPage implements OnInit {
},
error => {
console.log(error, 'error')
loader.remove()
this.showLoader = false
this.toastService._badRequest('Evento não criado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não criado')
}
});
}
@@ -585,10 +593,19 @@ export class NewEventPage implements OnInit {
}
this.toastService._successMessage('Evento criado')
},()=>{
},(error) => {
//const connectionToServer = this.ServerConnectionService.BaseAPI()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não criado')
}
loader.remove()
this.showLoader = false
this.toastService._badRequest('Evento não criado')
});
} else {
@@ -641,10 +658,15 @@ export class NewEventPage implements OnInit {
this.chatMethodService.sendMessage(this.roomId,data);
}
this.toastService._successMessage('Evento criado')
},()=>{
},(error)=>{
loader.remove()
this.showLoader = false
this.toastService._badRequest('Evento não criado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não criado')
}
});
}
@@ -82,7 +82,7 @@
<div *ngIf="loadedEvent.Body.Text">
<h5>Detalhes</h5>
<ion-item lines="none" class="ion-no-margin ion-no-padding">
<div class="text"> {{ loadedEvent.Body.Text }} </div>
<pre class="text">{{ loadedEvent.Body.Text }} </pre>
</ion-item>
<div class="line"></div>
</div>
@@ -105,9 +105,6 @@ export class ViewEventPage implements OnInit {
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
this.eventsService.getEvent(this.eventId).subscribe(res => {
const div = document.createElement("div")
div.innerHTML = res.Body.Text
res.Body.Text = div.innerText
this.loadedEvent = res;
this.today = new Date(res.StartDate);
@@ -2,16 +2,16 @@
<!-- <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> -->
<div class="title">
<div class="thetitle"><ion-label >Todas as tarefas</ion-label></div>
<div class="theicon">
<!-- <div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="refreshing()">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div> -->
</div>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -59,8 +59,12 @@ export class AllProcessesPage implements OnInit {
});
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.updateAllProcess();
}, 1000);
@@ -6,7 +6,7 @@
<ion-label *ngIf="loggeduser.Profile =='PR'" >Despachos</ion-label>
</div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
@@ -14,7 +14,7 @@
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -86,8 +86,13 @@ constructor (
}, 1000);
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.LoadList();
//event.target.complete();
@@ -11,7 +11,7 @@
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -26,7 +26,7 @@ export class DespachosPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?despachos=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -45,8 +45,14 @@ export class DespachosPage implements OnInit {
await this.despachoRule.getList({updateStore: true})
this.skeletonLoader = false;
}
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
doRefresh() {
setTimeout(() => {
this.LoadList();
}, 1000);
@@ -3,14 +3,14 @@
<div class="title">
<div class="thetitle"><ion-label >Diplomas para assinar</ion-label></div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -36,7 +36,7 @@ export class DiplomasAssinarPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -49,7 +49,13 @@ export class DiplomasAssinarPage implements OnInit {
this.router.navigate(['/home/gabinete-digital/diplomas-assinar',serialNumber,'gabinete-digital']);
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.LoadList();
}, 1000);
@@ -3,14 +3,14 @@
<div class="title">
<div class="thetitle"><ion-label >Diplomas por gerar</ion-label></div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -38,7 +38,13 @@ export class DiplomasGerarPage implements OnInit {
this.router.navigate(['/home/gabinete-digital/diplomas-gerar', serialNumber, 'gabinete-digital']);
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.LoadList();
}, 1000);
@@ -3,14 +3,14 @@
<div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -44,7 +44,7 @@ export class ExpedientsPage implements OnInit {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientes=true')) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -94,8 +94,12 @@ export class ExpedientsPage implements OnInit {
})
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.LoadList();
}, 1000)
@@ -3,7 +3,7 @@
<div class="title">
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
@@ -123,8 +123,14 @@ export class DiplomasPage implements OnInit {
this.LoadList();
}, 1000);
}
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
doRefresh() {
this.LoadList();
}
@@ -312,7 +312,12 @@ export class EditEventToApproveComponent implements OnInit {
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
this.toastService._successMessage('Evento editado');
}, error =>{
this.toastService._badRequest('Evento não editado');
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não editado');
}
})
@@ -322,14 +327,24 @@ export class EditEventToApproveComponent implements OnInit {
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
this.toastService._successMessage();
}, error =>{
this.toastService._badRequest();
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest();
}
});
} else if(document['action'] == 'delete') {
delete document.action
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
this.toastService._successMessage()
}, error =>{
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
})
}
@@ -3,7 +3,7 @@
<div class="title width-100">
<div class="title-container d-flex justify-space-between">
<span class="text-center mt-0 aside-title px-20"><label>Eventos para Aprovação</label></span>
<button title="Atualizar" title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
@@ -20,20 +20,20 @@
</div>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<div class="main-content overflow-y-auto height-100" [ngSwitch]="segment" *ngIf="eventsPRList">
<div class="main-content overflow-y-auto height-100" [ngSwitch]="segment" *ngIf="eventaprovacaostore.listpr">
<div *ngSwitchCase="'MDGPR'" class="height-100">
<div *ngIf="eventsMDGPRList">
<div *ngIf="eventaprovacaostore.listmd">
<ion-list class="width-100" *ngIf="eventsMDGPRList.length != 0" >
<ion-list class="width-100" *ngIf="eventaprovacaostore.listmd.length != 0" >
<div
class="expediente item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor="let event of eventsMDGPRList"
*ngFor="let event of eventaprovacaostore.listmd"
(click)="goToEventDetail(event)"
>
<!-- (click)="openApproveModal(event)" -->
@@ -52,9 +52,9 @@
</ion-list>
</div>
<div *ngIf="eventsMDGPRList" class="centered-div">
<div *ngIf="eventaprovacaostore.listmd" class="centered-div">
<div *ngIf="eventsMDGPRList.length == 0">
<div *ngIf="eventaprovacaostore.listmd.length == 0">
<div *ngSwitchCase="'MDGPR'">
<div class="d-flex height-90 align-center justify-content-center"
>
@@ -65,12 +65,12 @@
</div>
</div>
<div *ngSwitchCase="'PR'">
<div *ngIf="eventsPRList.length != 0">
<div *ngIf="eventaprovacaostore.listpr.length != 0">
<ion-list class="width-100" *ngSwitchCase="'PR'">
<div class="width-100" *ngIf="eventsPRList">
<div class="width-100" *ngIf="eventaprovacaostore.listpr">
<div
class="expediente item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor="let event of eventsPRList"
*ngFor="let event of eventaprovacaostore.listpr"
(click)="goToEventDetail(event)"
>
<div class="item event-pr-{{event.workflowInstanceDataFields.Agenda}} width-100">
@@ -90,10 +90,10 @@
</div>
<div *ngIf="eventsPRList.length == 0" class="centered-div d-flex height-90 align-center justify-content-center">
<div *ngIf="eventaprovacaostore.listpr.length == 0" class="centered-div d-flex height-90 align-center justify-content-center">
<div *ngSwitchCase="'PR'" >
<div class="d-flex align-center justify-content-center"
*ngIf="eventsPRList.length < 1">
*ngIf="eventaprovacaostore.listpr.length < 1">
Lista vazia
</div>
</div>
@@ -51,7 +51,7 @@ export class EventsToApprovePage implements OnInit {
'/home/gabinete-digital?eventos=true'.startsWith(event.url)) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadToApproveEvents()
} else {
this.LoadToApproveEvents()
}
@@ -81,7 +81,7 @@ export class EventsToApprovePage implements OnInit {
})
//this.eventaprovacaostore.resetmd(this.sortService.sortDate(this.eventsMDGPRList, 'CreateDate'));
this.eventaprovacaostore.resetmd(this.sortService.sortDate(this.eventsMDGPRList, 'CreateDate'));
}
else if(this.segment == 'PR') {
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise();
@@ -97,7 +97,7 @@ export class EventsToApprovePage implements OnInit {
this.storage.set('event-to-aprovePR',this.eventsPRList).then(() => {
})
//this.eventaprovacaostore.resetpr(this.sortService.sortDate(this.eventsPRList, 'CreateDate'));
this.eventaprovacaostore.resetpr(this.sortService.sortDate(this.eventsPRList, 'CreateDate'));
}
this.showLoader = false;
}
@@ -124,9 +124,13 @@ export class EventsToApprovePage implements OnInit {
this.router.navigate(['/home/gabinete-digital/event-list/approve-event',event.serialNumber, 'gabinete-digital'])
}
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
doRefresh() {
setTimeout(()=>{
this.LoadToApproveEvents();
}, 1000)
@@ -66,11 +66,8 @@ export class ExpedientesPrPage implements OnInit {
this.processes.GetTaskListExpediente(false).subscribe(result => {
this.taskslist = [];
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active");
res.forEach(element => {
let task = this.expedienteTaskPipe.transform(element);
this.taskslist.push(task);
});
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "" || data.workflowInstanceDataFields.Status == "Active");
this.taskslist = res.map((element) => this.expedienteTaskPipe.transform(element));
this.taskslist = this.sortService.sortDate(this.taskslist, 'CreateDate')
@@ -3,14 +3,14 @@
<div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -44,7 +44,7 @@ export class ExpedientsPage implements OnInit {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientes=true')) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -65,17 +65,16 @@ export class ExpedientsPage implements OnInit {
this.taskslist = [];
this.skeletonLoader = false
let res = result.filter(data => data.workflowInstanceDataFields.Status == "Active");
res.forEach(element => {
let task = this.expedienteTaskPipe.transform(element)
this.taskslist.push(task);
let res = result.filter(data => data.workflowInstanceDataFields.Status == "" || data.workflowInstanceDataFields.Status == "Active");
});
this.taskslist = res.map((e) => this.expedienteTaskPipe.transform(e))
this.taskslist = this.sortService.sortDate(this.taskslist, 'CreateDate')
this.addProcessTODb(this.taskslist);
this.taskslist = this.taskslist.filter(function(item) {
return item.activityInstanceName != 'Retificar Expediente'
})
})
this.expedientegbstore.reset(this.taskslist);
}, (error) => {
this.getEventsFromLocalDb();
@@ -94,16 +93,21 @@ export class ExpedientsPage implements OnInit {
})
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
this.LoadList();
}, 1000)
event.target.complete();
}, 2000);
}
goToExpediente(serialNumber: any) {
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
}
setTimeout(() => {
this.LoadList();
}, 1000)
}
goToExpediente(serialNumber: any) {
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
}
}
@@ -3,7 +3,7 @@
<div class="title">
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
@@ -20,7 +20,7 @@
</ion-toolbar>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -59,7 +59,7 @@ export class PedidosPage implements OnInit {
) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -121,7 +121,12 @@ export class PedidosPage implements OnInit {
this.skeletonLoader = false
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.LoadList();
}, 1000);
@@ -3,14 +3,14 @@
<div class="title">
<div class="thetitle"><ion-label >Pendentes</ion-label></div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -42,7 +42,7 @@ export class PendentesPage implements OnInit {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -86,8 +86,14 @@ export class PendentesPage implements OnInit {
this.listToPresent =pendentes
})
}
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
doRefresh() {
setTimeout(()=>{
this.LoadList();
}, 1000)
@@ -107,7 +107,12 @@ export class DeplomaOptionsPage implements OnInit {
this.close();
this.toastService._successMessage()
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -154,7 +159,12 @@ export class DeplomaOptionsPage implements OnInit {
this.close();
this.toastService._successMessage()
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -180,7 +190,11 @@ export class DeplomaOptionsPage implements OnInit {
this.close();
this.toastService._successMessage()
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -205,7 +219,12 @@ export class DeplomaOptionsPage implements OnInit {
await this.processes.CompleteTask(body).toPromise();
this.toastService._successMessage('Processo concluído')
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
}
finally {
loader.remove()
@@ -19,7 +19,7 @@
</div>
<div class="flex-grow-1 width-50 pl-10">
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel width-100" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openTaskProcessModal('2',fulltask)" class="btn-cancel width-100" shape="round" >Pedido de Deferimento</button>
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openTaskProcessModal('2',fulltask)" class="btn-cancel width-100" shape="round" >Pedido de Deferimento</button>
<button (click)="openDelegarModal(task)" class="btn-cancel width-100" shape="round" >Delegar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel width-100" shape="round" >Enviar para Pendentes</button>
</div>
@@ -78,9 +78,14 @@ export class DespachosOptionsPage implements OnInit {
loader.remove()
this.close();
},()=>{
},(error)=>{
loader.remove()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não encontrado')
}
});
}
@@ -173,7 +178,12 @@ export class DespachosOptionsPage implements OnInit {
this.toastService._successMessage()
this.close();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -254,7 +264,12 @@ export class DespachosOptionsPage implements OnInit {
this.toastService._successMessage('Processo arquivado')
this.close();
} catch (error) {
this.toastService._badRequest('Processo não arquivado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não arquivado')
}
} finally {
loader.remove()
}
@@ -281,7 +296,12 @@ export class DespachosOptionsPage implements OnInit {
this.close();
this.toastService._successMessage()
} catch(error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -308,7 +328,12 @@ export class DespachosOptionsPage implements OnInit {
this.toastService._successMessage()
this.close();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -104,10 +104,14 @@ export class DespachosPrOptionsPage implements OnInit {
this.toastService._successMessage()
this.popoverController.dismiss('close')
loader.remove()
},()=>{
},(error)=>{
loader.remove()
this.toastService._badRequest('Processo não encontrado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não encontrado')
}
});
}
@@ -206,7 +210,12 @@ export class DespachosPrOptionsPage implements OnInit {
this.toastService._successMessage()
this.close();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -290,7 +299,12 @@ export class DespachosPrOptionsPage implements OnInit {
this.toastService._successMessage('')
this.close();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
}
finally {
loader.remove()
@@ -92,7 +92,12 @@ export class DiplomasGerarOptionsPage implements OnInit {
this.toastService._successMessage();
this.goBack()
} catch (error) {
this.toastService._badRequest();
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest();
}
} finally {
loader.remove()
}
@@ -3,7 +3,7 @@
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('1')" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
</div>
@@ -30,28 +30,19 @@
margin-bottom: 5px !important;
margin-top: 5px !important;
}
@media only screen and (max-width: 800px) {
.btn-ok, .btn-cancel, .btn-delete{
width: 100% !important;
}
.arrow-right{
display: flex;
justify-content: flex-end;
}
@media only screen and (min-width: 1024px) {
.arrow-right{
display: flex;
justify-content: flex-end;
}
.btn-cancel{
width: 100% !important;
margin-bottom: 10px !important;
}
.btn-delete, .btn-ok{
width: 100% !important;
margin-bottom: 10px !important;
margin-top: 10px !important;
}
/* .solid{
display: block;
} */
.btn-cancel{
width: 100% !important;
margin-bottom: 10px !important;
}
.btn-delete, .btn-ok{
width: 100% !important;
margin-bottom: 10px !important;
margin-top: 10px !important;
}
@@ -142,7 +142,12 @@ export class OptsExpedientePrPage implements OnInit {
this.close();
this.toastService._successMessage()
} catch(error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -180,7 +185,12 @@ export class OptsExpedientePrPage implements OnInit {
this.toastService._successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService._badRequest('Processo não descartado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado')
}
} finally {
loader.remove()
}
@@ -199,7 +209,12 @@ export class OptsExpedientePrPage implements OnInit {
// this.toastService.successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService._badRequest('Processo não descartado');
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado');
}
} finally {
loader.remove()
}
@@ -214,7 +229,12 @@ export class OptsExpedientePrPage implements OnInit {
this.toastService._successMessage();
this.goBack();
} catch (error) {
this.toastService._badRequest();
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest();
}
} finally {
loader.remove()
}
@@ -242,7 +262,12 @@ export class OptsExpedientePrPage implements OnInit {
this.close();
this.toastService._successMessage()
} catch(error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -255,9 +280,13 @@ export class OptsExpedientePrPage implements OnInit {
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
loader.remove()
this.close();
},()=>{
this.toastService._badRequest('Processo não encontrado')
}, (error) => {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não encontrado')
}
loader.remove()
});
}
@@ -295,7 +324,11 @@ export class OptsExpedientePrPage implements OnInit {
// this.toastService.successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService._badRequest('Processo não descartado');
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado');
}
} finally {
loader.remove()
}
@@ -8,15 +8,15 @@
<div class="width-100">
<div class="d-flex width-100">
<div class="flex-grow-1">
<button *ngIf="loggeduser.Profile == 'MDGPR'" class="btn-cancel desk" shape="round"> Enviar para o PR </button>
<button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Enviar para o PR </button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Solicitar revisão </button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round">Outras opções </button>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<!-- <button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button> -->
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
@@ -17,7 +17,6 @@ import { PermissionService } from 'src/app/services/permission.service';
import { ThemeService } from 'src/app/services/theme.service'
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
import { RouteService } from 'src/app/services/route.service';
import { LoginUserRespose } from 'src/app/models/user.model';
import { SessionStore } from 'src/app/store/session.service';
@Component({
@@ -36,7 +35,7 @@ export class OptsExpedientePage implements OnInit {
searchDocumentPipe = new SearchDocumentPipe()
documents:SearchList[] = [];
loggeduser: LoginUserRespose;
SessionStore = SessionStore;
constructor(
private popoverController: PopoverController,
@@ -55,7 +54,7 @@ export class OptsExpedientePage implements OnInit {
}
ngOnInit() {
console.log('SessionStore', SessionStore)
}
async openNewGroupPage(){
@@ -171,8 +170,13 @@ export class OptsExpedientePage implements OnInit {
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
this.toastService._successMessage()
},()=> {
this.toastService._badRequest()
}, (error) => {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
},()=> {
loader.remove()
});
@@ -249,7 +253,12 @@ export class OptsExpedientePage implements OnInit {
this.close();
this.toastService._successMessage()
} catch(error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -259,9 +268,13 @@ export class OptsExpedientePage implements OnInit {
this.close();
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
this.goBack();
},()=>{
this.toastService._badRequest('Processo não encontrado')
},(error)=>{
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não encontrado')
}
});
}
@@ -285,7 +298,12 @@ export class OptsExpedientePage implements OnInit {
this.close();
this.toastService._successMessage('Processo aprovado')
} catch(error) {
this.toastService._badRequest('Processo não aprovado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não aprovado')
}
} finally {
loader.remove()
}
@@ -341,7 +359,12 @@ export class OptsExpedientePage implements OnInit {
await this.processes.CompleteTask(body).toPromise();
this.goBack();
} catch (error) {
this.toastService._badRequest('Processo não descartado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado')
}
} finally {
loader.remove()
}
@@ -376,7 +399,12 @@ export class OptsExpedientePage implements OnInit {
this.toastService._successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService._badRequest('Processo não descartado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado')
}
} finally {
loader.remove()
}
@@ -396,7 +424,12 @@ export class OptsExpedientePage implements OnInit {
this.toastService._successMessage('Processo descartado');
this.goBack();
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado')
}
} finally {
loader.remove()
}
@@ -410,8 +443,12 @@ export class OptsExpedientePage implements OnInit {
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
this.toastService._successMessage();
this.goBack();
} catch (error) {
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -5,7 +5,7 @@
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
@@ -15,7 +15,7 @@
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
@@ -46,7 +46,7 @@
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
@@ -191,7 +191,12 @@ export class RequestOptionsPage implements OnInit {
this.close();
this.toastService._successMessage()
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
}
finally {
loader.remove()
@@ -260,7 +265,12 @@ export class RequestOptionsPage implements OnInit {
this.toastService._successMessage('Processo arquivado')
} catch (error) {
this.toastService._badRequest('Processo não arquivado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não arquivado')
}
} finally {
loader.remove()
}
@@ -1,9 +1,7 @@
<ion-content class="container width-100 ">
<div class="buttons">
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
</div>
</ion-content>
<div class="buttons pa-20">
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
</div>
@@ -111,7 +111,11 @@ export class EditActionPage implements OnInit {
this.getActions.emit()
} catch (error) {
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
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')
}
} finally {
loader.remove()
}
@@ -133,7 +133,12 @@ export class NewActionPage implements OnInit {
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 criar a acção presidencial')
}
} finally {
loader.remove()
}
@@ -159,7 +159,11 @@ export class NewPublicationPage implements OnInit {
this.goBack();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -188,7 +192,11 @@ export class NewPublicationPage implements OnInit {
this.goBack();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -216,7 +224,11 @@ export class NewPublicationPage implements OnInit {
this.goBack();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -247,7 +259,11 @@ export class NewPublicationPage implements OnInit {
this.goBackToViewPublications.emit();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -90,7 +90,11 @@ export class PublicationDetailPage implements OnInit {
this.toastService._successMessage("Publicação eliminado")
this.goBackToViewPublications.emit();
} catch (error) {
this.toastService._badRequest("Publicação não eliminado")
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest("Publicação não eliminado")
}
} finally {
laoder.remove()
}
@@ -26,7 +26,7 @@ export class ViewPublicationsPage implements OnInit {
getpublication = [];
error: any;
@Input() folderId: string;
@Input() folderId: any;
@Output() addNewPublication = new EventEmitter<any>();
@Output() editPublication = new EventEmitter<any>();
@Output() openPublicationDetails= new EventEmitter<any>();
@@ -221,8 +221,13 @@ export class ViewPublicationsPage implements OnInit {
try {
await this.publications.DeletePresidentialAction(folderId).toPromise();
this.toastService._successMessage()
} catch (e) {
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
}
finally {
loader.remove()