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
+1 -1
View File
@@ -365,7 +365,7 @@
</div>
<div class="schedule-details">
<div class="description">
<p class="m-0">{{event.event.Subject}} ....</p>
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="location">{{event.event.Location}}</div>
@@ -352,8 +352,12 @@ export class EditEventPage implements OnInit {
this.toastService._successMessage();
}, error => {
if(error.status != 0)
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
});
} else {
this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => {
@@ -376,8 +380,12 @@ export class EditEventPage implements OnInit {
this.toastService._successMessage();
}, error => {
if(error.status != 0)
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
});
}
@@ -176,7 +176,7 @@ export class NewEventPage implements OnInit {
}
window.onresize = (event) => {
if( window.innerWidth >= 1024){
if( window.innerWidth >= 1024) {
this.modalController.dismiss();
}
};
@@ -186,7 +186,6 @@ export class NewEventPage implements OnInit {
}
setDefaultTime() {
console.log(this.CalendarDate)
this.postEvent.StartDate = this.roundTimeQuarterHour(this.CalendarDate);
this.postEvent.EndDate = this.postEvent.StartDate;
}
@@ -446,7 +445,12 @@ export class NewEventPage implements OnInit {
this.modalController.dismiss(data);
} 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()
}
@@ -85,7 +85,7 @@
<div *ngIf="loadedEvent.Body.Text">
<h5>Detalhes</h5>
<ion-item lines="none" class="ion-no-margin ion-no-padding">
<div class="width-100 text" >{{ loadedEvent.Body.Text }}</div>
<pre class="width-100 text">{{ loadedEvent.Body.Text }} </pre>
</ion-item>
<div class="line"></div>
</div>
@@ -189,11 +189,7 @@ 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.addEventToDb(res);
loader.remove()
+1 -1
View File
@@ -20,7 +20,7 @@
<!-- <ion-content class="main " ng-controller="AppController"> -->
<ion-content ng-controller="AppController">
<ion-refresher slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
+8 -2
View File
@@ -126,13 +126,19 @@ export class EventsPage implements OnInit {
}
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
this.RefreshEvents();
this.LoadList();
}
onSegmentChange() {
this.doRefresh();
this.RefreshEvents();
this.LoadList();
}
@@ -126,11 +126,6 @@ export class DespachoPrPage implements OnInit {
"activityInstanceName": res.activityInstanceName,
}
this.fulltask = res;
this.updateProcessOnDB(res);
let thedate = new Date(this.task.CreateDate);
@@ -279,7 +274,12 @@ export class DespachoPrPage implements OnInit {
await this.processes.CompleteTask(body).toPromise()
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()
@@ -304,7 +304,12 @@ export class DespachoPrPage implements OnInit {
await this.processes.CompleteTask(body).toPromise()
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()
@@ -326,7 +331,12 @@ export class DespachoPrPage implements OnInit {
this.toastService._successMessage('Processo criado')
} catch (error) {
this.toastService._badRequest('Processo não criado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não criado')
}
}
finally {
loader.remove()
@@ -351,7 +361,12 @@ export class DespachoPrPage implements OnInit {
await this.processes.CompleteTask(body).toPromise()
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()
@@ -376,7 +391,12 @@ export class DespachoPrPage implements OnInit {
await this.processes.CompleteTask(body).toPromise()
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()
@@ -395,9 +415,14 @@ export class DespachoPrPage implements OnInit {
this.toastService._successMessage('Processo enviado para pendentes')
this.goBack()
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')
}
});
}
@@ -10,7 +10,7 @@
<ion-label *ngIf="loggeduser.Profile =='PR'" >Despachos</ion-label>
</div>
<div class="theicon btn-refresh">
<button class="btn-no-color" (click)="doRefresh()">
<button 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 @@
</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"
@@ -35,7 +35,7 @@
<ion-list>
<div
class="expediente ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of listToPresent; let i = index"
*ngFor = "let task of despachoprstore.list; let i = index"
(click)="goToDespachoPr(task.SerialNumber)"
>
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
@@ -19,6 +19,7 @@ import { BackgroundService } from 'src/app/services/background.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
@Component({
selector: 'app-despachos-pr',
@@ -53,6 +54,8 @@ export class DespachosPrPage implements OnInit {
despachoprstore = DespachosprStore
listToPresent = [];
customTaskPipe = new CustomTaskPipe()
constructor(
private processes: ProcessesService,
private modalController: ModalController,
@@ -65,7 +68,6 @@ export class DespachosPrPage implements OnInit {
public ThemeService: ThemeService
) {
this.loggeduser = SessionStore.user;
this.profile = 'mdgpr';
}
@@ -82,7 +84,7 @@ export class DespachosPrPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -113,8 +115,9 @@ export class DespachosPrPage implements OnInit {
async LoadList() {
this.processes.GetTasksList("Despacho do Presidente da República", false).subscribe(async res => {
this.skeletonLoader = true
this.skeletonLoader = true
try {
let result = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
this.despachoList = [];
@@ -124,7 +127,7 @@ export class DespachosPrPage implements OnInit {
let despachosPr;
let despachos = this.sortService.sortArrayByDate(result);
if(this.loggeduser.Profile != "PR") {
if(SessionStore.user.Profile != "PR") {
if(SessionStore.user.Profile != 'Consultant') {
@@ -132,9 +135,8 @@ export class DespachosPrPage implements OnInit {
} else {
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Gerar Diploma" || data.activityInstanceName == "Retificar Diploma");
}
} else if (this.loggeduser.Profile == "PR") {
} else if (SessionStore.user.Profile == "PR") {
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
}
@@ -157,18 +159,24 @@ export class DespachosPrPage implements OnInit {
"DocumentsQty": element.totalDocuments,
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
"WorkflowName": element.workflowDisplayName,
"FolderID": element?.workflowInstanceDataFields?.FolderID,
"activityInstanceName": element.activityInstanceName,
"Status": element?.workflowInstanceDataFields?.Status,
}
this.despachoList.push(task);
});
this.despachoList = this.sortService.sortDate(this.despachoList, 'CreateDate')
this.listToPresent = this.despachoList
this.despachoprstore.reset(this.despachoList)
}, (error) => {
} catch(error) {
this.getFromDB()
})
}
this.skeletonLoader = false
}
@@ -181,9 +189,9 @@ export class DespachosPrPage implements OnInit {
let despachosPr;
if(this.loggeduser.Profile != 'PR') {
if(SessionStore.user.Profile != 'PR') {
despachosPr = await process.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
} else if (this.loggeduser.Profile == 'PR') {
} else if (SessionStore.user.Profile == 'PR') {
despachosPr = await process.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
}
@@ -215,8 +223,12 @@ export class DespachosPrPage implements OnInit {
})
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.LoadList();
}, 1000)
@@ -279,7 +279,12 @@ export class DespachoPage implements OnInit {
this.toastService._successMessage('Processo criado')
this.close();
} catch (error) {
this.toastService._badRequest("Processo não criado")
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest("Processo não criado")
}
}
finally {
loader.remove()
@@ -295,7 +300,12 @@ export class DespachoPage implements OnInit {
this.toastService._successMessage('Processo descartado')
this.close();
} 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()
@@ -322,7 +332,12 @@ export class DespachoPage implements OnInit {
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()
@@ -348,7 +363,12 @@ export class DespachoPage 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()
}
@@ -33,7 +33,7 @@
<ion-list>
<div
class="expediente ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of listToPresent; let i = index"
*ngFor = "let task of despachoStore.list; let i = index"
(click)="GoToDespacho(task.SerialNumber)"
>
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
@@ -110,7 +110,12 @@ export class DiplomaAssinarPage implements OnInit {
}, (error)=>{
try {
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')
}
this.goBack()
} catch (e) {
window.history.back();
@@ -176,7 +181,12 @@ export class DiplomaAssinarPage 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()
@@ -73,19 +73,23 @@ export class DiplomasAssinarPage implements OnInit {
}, 1000);
}
async LoadList(){
async LoadList() {
this.skeletonLoader = true
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
try {
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
let diplomasAssinar = diplomas.filter(data => data.activityInstanceName == "Assinar Diploma");
let diplomasAssinar = diplomas.filter(data => data.activityInstanceName == "Assinar Diploma");
this.deplomasStore.resetDiplomasParaAssinar(diplomasAssinar)
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate')
} catch(error) {
this.deplomasStore.resetDiplomasParaAssinar(diplomasAssinar)
}
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate')
this.skeletonLoader = false
this.showLoader = false;
@@ -57,10 +57,9 @@ export class DiplomasGerarPage implements OnInit {
goToDiploma(serialNumber:any){
this.router.navigate(['/home/gabinete-digital/diplomas-gerar',serialNumber,'gabinete-digital']);
}
goToDiploma(serialNumber:any) {
this.router.navigate(['/home/gabinete-digital/diplomas-gerar',serialNumber,'gabinete-digital']);
}
async refreshing() {
setTimeout(() => {
@@ -77,24 +76,29 @@ export class DiplomasGerarPage implements OnInit {
async LoadList(){
this.skeletonLoader = true
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
this.diplomasList = [];
let gerarDiploma = diplomas.reverse().filter(data => data.activityInstanceName == "Gerar Diploma" || data.activityInstanceName == "Retificar Diploma");
gerarDiploma.forEach(element => {
let task: customTask = this.customTaskPipe.transform(element)
this.diplomasList.push(task);
});
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate');
this.deplomasStore.resetDiplomaGerar(this.diplomasList);
this.skeletonLoader = false
this.showLoader = false;
this.skeletonLoader = true
try {
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
this.diplomasList = [];
let gerarDiploma = diplomas.reverse().filter(data => data.activityInstanceName == "Gerar Diploma" || data.activityInstanceName == "Retificar Diploma");
gerarDiploma.forEach(element => {
let task: customTask = this.customTaskPipe.transform(element)
this.diplomasList.push(task);
});
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate');
this.deplomasStore.resetDiplomaGerar(this.diplomasList);
} catch(error) {
}
this.skeletonLoader = false
this.showLoader = false;
}
@@ -252,7 +252,12 @@ export class DiplomasGerarPage 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()
}
@@ -314,7 +319,12 @@ export class DiplomasGerarPage 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()
@@ -162,7 +162,12 @@ export class DiplomaPage implements OnInit {
} catch (e) {
window.history.back();
}
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')
}
}
});
@@ -286,7 +291,12 @@ export class DiplomaPage implements OnInit {
})
} 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()
@@ -309,7 +319,12 @@ export class DiplomaPage implements OnInit {
await this.processes.CompleteTask(body).toPromise()
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()
@@ -335,7 +350,12 @@ export class DiplomaPage implements OnInit {
await this.processes.CompleteTask(body).toPromise();
this.toastService._successMessage('Processo concluído')
} 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()
@@ -8,6 +8,7 @@ import { BackgroundService } from 'src/app/services/background.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
import { PermissionService } from 'src/app/services/permission.service';
import { DeplomasStore } from 'src/app/store/deplomas.service';
@Component({
@@ -26,7 +27,8 @@ export class DiplomasPage implements OnInit, OnDestroy {
segment: string;
skeletonLoader = true
deplomasStore = DeplomasStore
constructor(
private processes: ProcessesService,
private router: Router,
@@ -100,9 +102,7 @@ export class DiplomasPage implements OnInit, OnDestroy {
}
async LoadList() {
this.processes.GetTasksList("Despacho do Presidente da República", false).subscribe(async res => {
try {
this.skeletonLoader = true
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
@@ -118,6 +118,8 @@ export class DiplomasPage implements OnInit, OnDestroy {
diplomasList.push(task);
});
this.deplomasStore.resetDiplomasReview(diplomasValidar)
this.diplomasList = this.sortService.sortDate(diplomasList, 'CreateDate');
@@ -132,12 +134,19 @@ export class DiplomasPage implements OnInit, OnDestroy {
});
this.diplomasAssinadoList = this.sortService.sortDate(diplomasAssinadoList, 'CreateDate')
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados);
let diplomasAssinar = diplomas.filter(data => data.activityInstanceName == "Assinar Diploma");
this.deplomasStore.resetDiplomasParaAssinar(diplomasAssinar)
// console.log('DIPLOMAS ASSINADOS', this.diplomasAssinadoList)
}, (error) => {
} catch(error) {
this.skeletonLoader = false
this.getFromDb()
})
}
}
getFromDb() {
@@ -107,7 +107,12 @@ export class ApproveEventModalPage implements OnInit {
})
} catch (error) {
this.toastService._badRequest('Evento não aprovado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não aprovado')
}
}
finally {
loader.remove()
@@ -134,7 +139,12 @@ export class ApproveEventModalPage implements OnInit {
this.router.navigate(['/home/gabinete-digital/event-list']);
})
} catch (error) {
this.toastService._badRequest('Evento não rejeitado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não rejeitado')
}
}
finally {
loader.remove()
@@ -198,7 +208,12 @@ export class ApproveEventModalPage implements OnInit {
this.router.navigate(['/home/gabinete-digital/event-list']);
this.toastService._successMessage()
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
this.router.navigate(['/home/gabinete-digital/event-list']);
}
finally {
@@ -218,7 +218,12 @@ export class ApproveEventPage 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()
@@ -264,7 +269,12 @@ export class ApproveEventPage implements OnInit {
this.toastService._successMessage('Pedido enviado');
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()
}
@@ -285,7 +295,12 @@ export class ApproveEventPage implements OnInit {
await this.toastService._successMessage('Processo rejeitado');
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()
@@ -365,7 +380,12 @@ export class ApproveEventPage implements OnInit {
this.toastService._successMessage();
this.goBack();
} 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()
}
@@ -39,10 +39,10 @@
<div class="content height-100 d-flex flex-column">
<div [ngSwitch]="segment">
<ion-list class="width-100 height-100" *ngSwitchCase="'MDGPR'">
<div *ngIf="eventsMDGPRList" class="overflow-y-auto height-100">
<div *ngIf="eventoaprovacaostore.listmd" class="overflow-y-auto height-100">
<ion-item-sliding>
<ion-item class="Rectangle cursor-pointer" lines="none"
*ngFor="let event of eventsMDGPRList" (click)="goToEventToApproveDetail(event.serialNumber)">
*ngFor="let event of eventoaprovacaostore.listmd" (click)="goToEventToApproveDetail(event.serialNumber)">
<div class="content-mdgpr-{{event.workflowInstanceDataFields.Agenda}} width-100">
<div class="approve-event-time">
@@ -65,10 +65,10 @@
<ion-label></ion-label>
<ion-list *ngSwitchCase="'PR'">
<div *ngIf="eventsPRList" class="overflow-y-auto height-100">
<div *ngIf="eventoaprovacaostore.listpr" class="overflow-y-auto height-100">
<ion-item-sliding>
<ion-item class="Rectangle cursor-pointer" lines="none"
*ngFor="let event of eventsPRList" (click)="goToEventToApproveDetail(event.serialNumber)">
*ngFor="let event of eventoaprovacaostore.listpr" (click)="goToEventToApproveDetail(event.serialNumber)">
<div class="content-pr-{{event.workflowInstanceDataFields.Agenda}} width-100">
<div class="approve-event-time">
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
@@ -92,7 +92,7 @@
<div class="height-100" [ngSwitch]="segment">
<div *ngSwitchCase="'MDGPR'" class="d-flex height-100 align-center justify-content-center" >
<div
*ngIf="!skeletonLoader && (!eventsMDGPRList || eventsMDGPRList.length == 0)"
*ngIf="!skeletonLoader && (!eventoaprovacaostore.listmd || eventoaprovacaostore.listmd.length == 0)"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
@@ -101,7 +101,7 @@
<div *ngSwitchCase="'PR'" class="d-flex height-100 align-center justify-content-center">
<div
*ngIf="!skeletonLoader && (!eventsMDGPRList || eventsMDGPRList.length == 0)"
*ngIf="!skeletonLoader && (!eventoaprovacaostore.listmd || eventoaprovacaostore.listmd.length == 0)"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
@@ -36,6 +36,7 @@ export class EventListPage implements OnInit {
skeletonLoader = true
eventaprovacaostore = EventoAprovacaoStore;
eventoaprovacaostore = EventoAprovacaoStore;
constructor(
private processes: ProcessesService,
@@ -147,7 +148,7 @@ export class EventListPage implements OnInit {
}
async LoadToApproveEvents() {
this.processes.GetTasksList('Agenda Oficial MDGPR', false).subscribe(async res => {
// this.processes.GetTasksList('Agenda Oficial MDGPR', false).subscribe(async res => {
this.showLoader = true;
this.skeletonLoader = true
@@ -156,11 +157,10 @@ export class EventListPage implements OnInit {
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
this.eventsMDGPRList = this.sortService.sortDate(this.eventsMDGPRList, 'taskStartDate')
this.eventsMDGPRList = this.sortService.sortArrayByDate(this.eventsMDGPRList)
// this.eventsMDGPRList = ( this.eventsMDGPRList || []).filter(function(item) {
// return item.activityInstanceName != 'Editar Evento'
// })
this.eventoaprovacaostore.resetmd(this.eventsMDGPRList);
this.storage.set('event-to-aproveMD',this.eventsMDGPRList).then(() => {
@@ -171,11 +171,10 @@ export class EventListPage implements OnInit {
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise();
let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise();
this.eventsPRList = prEventsOficial.concat(prEventsPessoal);
this.eventsPRList = this.sortService.sortDate(this.eventsPRList, 'taskStartDate')
this.eventsPRList = this.sortService.sortArrayByDate(this.eventsPRList)
// this.eventsPRList = (this.eventsPRList || []).filter(function(item) {
// return item.activityInstanceName != 'Editar Evento'
// })
this.eventoaprovacaostore.resetpr(this.eventsPRList);
this.storage.set('event-to-aprovePR',this.eventsPRList).then(() => {
@@ -185,9 +184,9 @@ export class EventListPage implements OnInit {
this.showLoader = false;
this.skeletonLoader = false
}, (error) => {
this.getEventToAproveFromDB();
})
// }, (error) => {
// this.getEventToAproveFromDB();
// })
}
@@ -150,12 +150,12 @@ export class BookMeetingModalPage implements OnInit {
this.postData.Category = 'Reunião'
if(!this.CalendarName) {
if(!this.CalendarOwnerName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
this.CalendarOwnerName = 'Meu calendario';
console.log(this.eventService.calendarNamesAry)
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
this.CalendarOwnerName = this.eventService.calendarNamesAry[0]
}
}
@@ -176,6 +176,7 @@ export class BookMeetingModalPage implements OnInit {
this.getRecurrenceTypes();
}
getRecurrenceTypes() {
this.calendarService.getRecurrenceTypes().subscribe(res=>{
@@ -208,8 +209,8 @@ export class BookMeetingModalPage implements OnInit {
}
setDefaultTime() {
this.postData.StartDate = new Date()
this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
this.postData.StartDate = this.roundTimeQuarterHour();
this.postData.EndDate = (new Date(this.postData.StartDate.getTime() + 15 * 60000))
}
getAttachments() {
@@ -318,7 +319,12 @@ export class BookMeetingModalPage implements OnInit {
this.toastService._successMessage('Reunião criada');
} catch (error) {
this.toastService._badRequest('Reunião não criada')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Reunião não criada')
}
}
finally {
loader.remove()
@@ -338,7 +344,11 @@ export class BookMeetingModalPage implements OnInit {
this.toastService._successMessage('Reunião criada');
} 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()
}
@@ -351,6 +361,7 @@ export class BookMeetingModalPage implements OnInit {
selectedCalendarId () {
if (this.calendarService.calendarNamesType[this.CalendarOwnerName]?.['Oficial'] && this.postData.CalendarName == 'Oficial') {
@@ -501,8 +512,8 @@ export class BookMeetingModalPage implements OnInit {
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
roundTimeQuarterHour(timeToReturn?) {
var timeToReturn = timeToReturn || new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
@@ -515,14 +526,14 @@ export class BookMeetingModalPage implements OnInit {
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
} else {
if(minutes > m) {
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
} else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
@@ -534,7 +545,7 @@ export class BookMeetingModalPage implements OnInit {
return timeToReturn;
}
setStartDate(){
setStartDate() {
this.postData.StartDate = this.roundTimeQuarterHour();
}
@@ -109,7 +109,7 @@
appearance="fill"
class="width-100 d-block"
appearance="none">
<mat-select [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de evento*">
<mat-select [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de assunto*">
<mat-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</mat-option>
</mat-select>
</mat-form-field>
@@ -320,7 +320,12 @@ export class ExpedientTaskModalPage implements OnInit {
this.modalController.dismiss(action_despacho);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
loader.remove()
}
@@ -354,7 +359,12 @@ export class ExpedientTaskModalPage implements OnInit {
this.modalController.dismiss(action_parecer);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
loader.remove()
}
@@ -385,7 +395,12 @@ export class ExpedientTaskModalPage implements OnInit {
this.toastService._successMessage('Processo efetuado');
this.modalController.dismiss(action_deferimento);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
loader.remove()
}
@@ -423,8 +438,12 @@ export class ExpedientTaskModalPage implements OnInit {
await this.toastService._successMessage('Processo efetuado');
this.modalController.dismiss(action_despacho_pr);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
//loader.remove()
}
@@ -461,8 +480,12 @@ export class ExpedientTaskModalPage implements OnInit {
await this.toastService._successMessage('Pedido enviado');
this.modalController.dismiss(action_parecer_pr);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
loader.remove()
}
@@ -92,8 +92,8 @@
<div class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons">
<div *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="option-desc"> <div *ngIf="loggeduser.Profile == 'MDGPR'">Enviar para o PR</div> </div>
<button *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks]) && loggeduser.Profile == 'MDGPR'" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc"> <div>Enviar para o PR</div> </div>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc"> <div>Solicitar revisão</div> </div>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc"> <div>Outras opções</div> </div>
@@ -90,6 +90,8 @@ export class ExpedienteDetailPage implements OnInit {
private userAuth: AuthService,
) {
this.loggeduser = SessionStore.user
console.log('SessionStore', SessionStore)
this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) {
this.serialNumber = params["params"].SerialNumber;
@@ -242,7 +244,12 @@ export class ExpedienteDetailPage 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()
}
@@ -267,7 +274,12 @@ export class ExpedienteDetailPage 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()
}
@@ -334,7 +346,12 @@ export class ExpedienteDetailPage implements OnInit {
},
(error) => {
loader.remove()
this.toastService._badRequest('Processo não enviado para pendentes')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não enviado para pendentes')
}
});
}
@@ -391,7 +408,12 @@ export class ExpedienteDetailPage implements OnInit {
} catch (e) {
window.history.back();
}
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')
}
}
});
@@ -482,8 +504,13 @@ export class ExpedienteDetailPage implements OnInit {
loader.remove()
await this.attachmentsService.AddAttachment(body).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()
}
}
});
}
@@ -519,7 +546,12 @@ export class ExpedienteDetailPage 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()
}
@@ -553,7 +585,12 @@ export class ExpedienteDetailPage 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()
}
@@ -572,7 +609,12 @@ export class ExpedienteDetailPage 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()
}
@@ -586,7 +628,12 @@ export class ExpedienteDetailPage 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()
}
@@ -36,7 +36,7 @@
<ion-list>
<div
class="expediente ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of listToPresent"
*ngFor = "let task of expedientegbstore.list"
(click)="goToExpediente(task.SerialNumber)"
>
<div class="item width-100">
@@ -9,7 +9,7 @@ import { Platform } from '@ionic/angular';
import { BackgroundService } from '../../../services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
import { SortService } from 'src/app/services/functions/sort.service';
import {Storage } from '@ionic/storage';
import { Storage } from '@ionic/storage';
@Component({
selector: 'app-expediente',
@@ -73,7 +73,7 @@ export class ExpedientePage implements OnInit {
const result = res
this.taskslist = new Array();
let ress = result.filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
let ress = result.filter((data: any) => data.workflowInstanceDataFields.Status == "" || data.workflowInstanceDataFields.Status == "Active");
ress.forEach((element: any) => {
@@ -86,7 +86,8 @@ export class ExpedientePage implements OnInit {
})
this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate')
this.expedientegbstore.reset(this.listToPresent);
this.skeletonLoader = false;
}, (error) => {
this.getEventsFromLocalDb();
@@ -143,7 +143,12 @@ export class ExpedientePrPage implements OnInit {
},
(error)=>{
loader.remove()
this.toastService._badRequest('Processo não enviado para pendentes')
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não enviado para pendentes')
}
});
}
@@ -309,7 +314,12 @@ export class ExpedientePrPage 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()
}
@@ -334,7 +344,12 @@ export class ExpedientePrPage 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()
}
@@ -455,7 +470,12 @@ export class ExpedientePrPage 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()
}
@@ -492,7 +512,12 @@ export class ExpedientePrPage 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()
}
@@ -75,14 +75,12 @@ export class ExpedientesPrPage implements OnInit {
this.skeletonLoader = false
this.showLoader =false
this.taskslist = new Array();
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')
this.expedienteGdStore.reset(this.taskslist);
this.skeletonLoader = false
})
@@ -147,14 +147,14 @@
<fa-icon class="icon-selected" icon="align-justify"></fa-icon>
</div>
<p class="text-center exp-card-title ">Todas as tarefas</p>
<p class="text-center exp-card-content"> {{ getAllProcessCount }} <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> {{ getAllProcessCount }} <span class="title1">Documentos</span></p>
</div>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.aprove_event])" (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="box-hover exp-card d-flex flex-column">
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
</div>
<p class="text-center exp-card-title ">Eventos para Aprovação</p>
<p class="text-center exp-card-content">{{eventoaprovacaostore.countMd + eventoaprovacaostore.countPr}} <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> {{eventoaprovacaostore.countMd + eventoaprovacaostore.countPr}} <span class="title1">Documentos</span></p>
</div>
<div (click)="openExpedientListPage(); selectedElement='Correspondence'" [class.active]="selectedElement == 'Correspondence'" class="box-hover exp-card d-flex flex-column justify-center">
@@ -166,7 +166,7 @@
<ion-icon hidden *ngIf="ThemeService.currentTheme == 'doneIt' && selectedElement == 'Correspondence'" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-correspondencia-hover.svg"></ion-icon>
</div>
<p class="text-center exp-card-title ">Expediente</p>
<p class="text-center exp-card-content">{{expedientegbstore.count}} <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> {{expedientegbstore.count}} <span class="title1">Documentos</span></p>
</div>
<div [class.active]="selectedElementF('Pending')" (click)="openPendentesPage(); selectedElement='Pending'" class="box-hover exp-card d-flex flex-column justify-center" >
@@ -179,7 +179,7 @@
</div>
<p *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Pendentes</p>
<p *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Meus Pendentes</p>
<p class="text-center exp-card-content"><span class="number">{{pendentesstore.count}} </span> <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> <span class="number">{{pendentesstore.count}} </span> <span class="title1">Documentos</span></p>
</div>
<div *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" [class.active]="selectedElement == 'Dispatches'" class="box-hover exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'">
@@ -191,7 +191,7 @@
<ion-icon hidden *ngIf="ThemeService.currentTheme == 'doneIt' && selectedElement == 'Dispatches'" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-despachos-presidente-hover.svg"></ion-icon>
</div>
<p class="text-center exp-card-title ">Despachos</p>
<p class="text-center exp-card-content">{{despachoStore.count}} <span class="title1">Documentos</span> </p>
<p class="text-center exp-card-content"> {{despachoStore.count}} <span class="title1">Documentos</span> </p>
</div>
<div (click)="openPedidosPage('parecer'); selectedElement='RequestsForOpinion'" [class.active]="selectedElement == 'RequestsForOpinion'" class="box-hover exp-card d-flex flex-column justify-center">
@@ -204,7 +204,7 @@
</div>
<p *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Pedidos de Parecer</p>
<p *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Pedidos de Parecer solicitados por mim</p>
<p class="text-center exp-card-content">{{pedidosstore.countparecer}} <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> {{pedidosstore.countparecer}} <span class="title1">Documentos</span></p>
</div>
<div (click)="openPedidosPage('deferimento'); selectedElement = 'RequestForApproval'" [class.active]="selectedElement == 'RequestForApproval'" class="box-hover exp-card d-flex flex-column justify-center">
@@ -217,7 +217,7 @@
<ion-icon hidden *ngIf="ThemeService.currentTheme == 'doneIt' && selectedElement == 'RequestForApproval'" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-expediente-deferimento-hover.svg"></ion-icon>
</div>
<p class="text-center exp-card-title ">Pedidos de Deferimento</p>
<p class="text-center exp-card-content">{{pedidosstore.countdeferimento}} <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> {{pedidosstore.countdeferimento}} <span class="title1">Documentos</span></p>
</div>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks, p.permissionList.Gabinete.pr_tasks])" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="box-hover exp-card-long width-100 d-flex flex-column justify-center">
@@ -231,11 +231,12 @@
<!-- <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p> -->
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do {{ environment.despachoLabel }}</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && !p.userPermission([p.permissionList.Gabinete.md_tasks])">Despachos criados por mim</p>
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
<p class="text-center exp-card-content"> {{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
</div>
</div>
</div>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
@@ -244,7 +245,7 @@
</div>
<p class="text-center exp-card-title " >Diplomas por Validar</p>
<!-- <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Assinar</p> -->
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
<p class="text-center exp-card-content"> {{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
</div>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks, p.permissionList.Gabinete.pr_tasks])" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
@@ -255,7 +256,7 @@
</div>
<p class="text-center exp-card-title " *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas assinados PR</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" >Diplomas</p>
<p class="text-center exp-card-content">{{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> {{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p>
</div>
<div *ngIf="SessionStore.user.Profile == 'Consultant' && environment.presidencial" (click)="openDiplomaPorElaborar('gerarDiplomas'); selectedElement='gerarDiplomas'" [class.active]="selectedElement == 'gerarDiplomas'" class="box-hover exp-card d-flex flex-column justify-center">
@@ -268,7 +269,7 @@
</div>
<p class="text-center exp-card-title" >Diplomas por elaborar</p>
<p class="text-center exp-card-content">{{ deplomasStore.DiplomaGerarList.length }} <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> {{ deplomasStore.DiplomaGerarList.length }} <span class="title1">Documentos</span></p>
</div>
@@ -281,8 +282,21 @@
<ion-icon hidden *ngIf="ThemeService.currentTheme == 'doneIt' && selectedElement == 'DiplomasParaAssinar' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-expediente-diploma-hover.svg"></ion-icon>
</div>
<p class="text-center exp-card-title">Diplomas para Assinar</p>
<p class="text-center exp-card-content">{{ deplomasStore.diplomasParaAssinartCount }} <span class="title1">Documentos</span></p>
<p class="text-center exp-card-content"> {{ deplomasStore.diplomasParaAssinartCount }} <span class="title1">Documentos</span></p>
</div>
<!-- <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasParaAssinar'" [class.active]="selectedElement == 'DiplomasParaAssinar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasParaAssinar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasParaAssinar' " src="assets/images/theme/gov/icons-expediente-diploma-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-expediente-diploma.svg"></ion-icon>
<ion-icon hidden *ngIf="ThemeService.currentTheme == 'doneIt' && selectedElement == 'DiplomasParaAssinar' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-expediente-diploma-hover.svg"></ion-icon>
</div>
<p class="text-center exp-card-title">Diplomas por Assinar </p>
<p class="text-center exp-card-content"> {{ deplomasStore.diplomasParaAssinartCount }} <span class="title1">Documentos</span></p>
</div> -->
</div>
<div *ngIf="!loadCount" class="width-100">
@@ -165,6 +165,8 @@ export class GabineteDigitalPage implements OnInit {
this.segmentVista = "boxview"
}
this.LoadCounts();
const pathname = window.location.pathname
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == pathname) {
@@ -183,6 +185,7 @@ export class GabineteDigitalPage implements OnInit {
}
});
this.hideRefreshButton();
// this.waitForDomService.selector({
@@ -193,84 +196,87 @@ export class GabineteDigitalPage implements OnInit {
// }
// })
this.backgroundservice.registerBackService('Online', () => {
// this.loadAllProcesses();
});
setTimeout(() => {
this.backgroundservice.registerBackService('Online', () => {
// this.loadAllProcesses();
});
// this.NotificationsService.registerCallback({
// type:'despachos',
// funx:() => {
// // this.loadCount();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'despachos',
// funx:() => {
// // this.loadCount();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'*',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification *')
// }
// })
// this.NotificationsService.registerCallback({
// type:'*',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification *')
// }
// })
// this.NotificationsService.registerCallback({
// type:'despachos-pr',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'expediente',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'gabinete-digital',
// funx:() => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'parecer',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'deferimento',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas-assinar',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'expedientes-pr',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'despachos-pr',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'expediente',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'gabinete-digital',
// funx:() => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'parecer',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'deferimento',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas-assinar',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'expedientes-pr',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
}, 100);
}
async loadAllProcesses() {
@@ -614,7 +620,8 @@ export class GabineteDigitalPage implements OnInit {
loadNum = 0
async LoadCounts() {
this.updateAllProcess()
let expedientes;
this.showLoader = true
@@ -629,7 +636,7 @@ export class GabineteDigitalPage implements OnInit {
this.loadNum++;
expedientes = (expedientes || [] ).filter(data => data.workflowInstanceDataFields.Status == "Active")
expedientes = (expedientes || [] ).filter(data => data.workflowInstanceDataFields.Status == "" || data.workflowInstanceDataFields.Status == "Active")
expedientes = expedientes.filter((item) => {
return item.activityInstanceName != 'Retificar Expediente'
@@ -127,7 +127,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="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="loggeduser.Profile == 'MDGPR' && !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>
</div>
@@ -136,7 +136,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="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="loggeduser.Profile == 'MDGPR' && !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>
</div>
@@ -162,7 +162,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="loggeduser.Profile != 'PR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="loggeduser.Profile != '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>
</div>
@@ -162,7 +162,8 @@ export class PedidoPage implements OnInit {
let thedate = new Date(res.taskStartDate);
this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
this.processes.GetTaskParticipants(res.workflowInstanceDataFields.FolderID).subscribe(users => {
this.processes.GetTaskParticipants(res.workflowInstanceDataFields.FolderID).subscribe((users = []) => {
this.updateProcessInterveners(users)
this.intervenientes = users.filter(user => {
return user.Type == 'I';
@@ -182,7 +183,12 @@ export class PedidoPage implements OnInit {
} catch (e) {
window.history.back();
}
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')
}
}
});
@@ -373,7 +379,12 @@ export class PedidoPage 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()
}
@@ -393,7 +404,12 @@ export class PedidoPage 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()
}
@@ -418,7 +434,12 @@ export class PedidoPage 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()
}
@@ -430,9 +451,14 @@ export class PedidoPage implements OnInit {
this.processes.SetTaskToPending(this.serialnumber).subscribe(res => {
this.goBack();
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')
}
});
}
@@ -38,13 +38,13 @@
<div class="width-100" [ngSwitch]="segment">
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div *ngIf="listToPresentparecerList">
<div *ngIf="pedidosstorage.listparecer">
<ion-list *ngSwitchCase="'parecer'">
<!-- *ngFor = "let task of pedidosstorage.listparecer; let i = index"
(click)="viewExpedientDetail(task.SerialNumber)" -->
<div
class="expediente ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of listToPresentparecerList"
*ngFor = "let task of pedidosstorage.listparecer"
(click)="goToPedido(task.SerialNumber)"
>
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
@@ -78,11 +78,11 @@
</ion-list>
</div>
<div *ngIf="listToPresentdeferimentoList">
<div *ngIf="pedidosstorage.listdeferimento">
<ion-list *ngSwitchCase="'deferimento'">
<div
class="expediente ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of listToPresentdeferimentoList"
*ngFor = "let task of pedidosstorage.listdeferimento"
(click)="goToPedido(task.SerialNumber)"
>
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
@@ -27,7 +27,7 @@
</ion-refresher>
<app-task-list class="height-100"
[taskList] = listToPresent
[taskList] = pendentesstore.list
[skeletonLoader] = skeletonLoader
(viewTaskDetail)="viewTaskDetails($event)"
> </app-task-list>
@@ -106,6 +106,7 @@ export class PendentesPage implements OnInit {
pendentesList = removeDuplicate(pendentesList)
pendentesList = this.sortService.sortDate(pendentesList, 'CreateDate');
this.pendentesstore.reset(pendentesList);
this.listToPresent = pendentesList;
this.storage.set('pendente-list',pendentesList).then(() => {
@@ -119,7 +119,12 @@ export class EditActionPage implements OnInit {
this.updateDesktopComponent.emit();
this.toastService._successMessage('Acção presidencial atualizada')
} 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()
}
@@ -255,8 +255,13 @@ export class PublicationsPage implements OnInit {
try {
await this.publications.DeletePresidentialAction(id).toPromise();
this.toastService._successMessage()
} catch (e) {
this.toastService._badRequest()
} 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()