mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
merge
This commit is contained in:
@@ -84,13 +84,13 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && allProcessesList.length == 0"
|
||||
*ngIf="!skeletonLoader && getAllProcessCount == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && allProcessesList.length == 0">
|
||||
<div *ngIf="skeletonLoader && getAllProcessCount == 0">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
|
||||
@@ -80,6 +80,9 @@ export class AllProcessesPage implements OnInit {
|
||||
|
||||
|
||||
get AllProcess() {
|
||||
setTimeout(() => {
|
||||
this.skeletonLoader = false;
|
||||
}, 5000);
|
||||
return this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
|
||||
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr)
|
||||
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list)
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="startDate"
|
||||
[disabled]="disabled"
|
||||
[min]="currentDate"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
@@ -138,6 +139,7 @@
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="endDate"
|
||||
[disabled]="disabled"
|
||||
[min]="currentDate"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #fim
|
||||
@@ -196,6 +198,7 @@
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.LastOccurrence"
|
||||
[disabled]="disabled"
|
||||
[min]="endDate"
|
||||
>
|
||||
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #occurrrence
|
||||
|
||||
@@ -51,6 +51,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
public stepSecond = 5;
|
||||
recurringTypes: any;
|
||||
selectedRecurringType: any;
|
||||
currentDate = new Date()
|
||||
|
||||
showLoader = false
|
||||
|
||||
@@ -181,14 +182,54 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev:any){
|
||||
/*
|
||||
|
||||
this.calculetedLastOccurrence(ev);
|
||||
|
||||
if(ev.length > 1){
|
||||
|
||||
this.selectedRecurringType = ev.filter(data => data != '-1');
|
||||
this.postEvent.EventRecurrence.Type = ev.filter(data => data != '-1');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
this.selectedRecurringType = "-1";
|
||||
} */
|
||||
this.postEvent.EventRecurrence.Type = "-1";
|
||||
}
|
||||
}
|
||||
|
||||
calculetedLastOccurrence(type:number){
|
||||
var valor;
|
||||
var opcao: boolean;
|
||||
if (type == 0) {
|
||||
valor = 7;
|
||||
opcao = true;
|
||||
} else if(type == 1){
|
||||
valor = 30;
|
||||
opcao = true;
|
||||
} else if(type == 2){
|
||||
valor = 1;
|
||||
opcao = false;
|
||||
}else if(type == 3){
|
||||
valor = 5;
|
||||
opcao = false;
|
||||
}
|
||||
this.defineLastOccurrence(valor, opcao);
|
||||
}
|
||||
|
||||
|
||||
defineLastOccurrence(valor:number, opcao:boolean){
|
||||
var time = new Date(this.endDate);
|
||||
if (opcao == true) {
|
||||
time.setDate(time.getDate() + valor);
|
||||
this.eventProcess.workflowInstanceDataFields.LastOccurrence = time;
|
||||
} else {
|
||||
time = new Date(
|
||||
time.getFullYear() + valor,
|
||||
time.getMonth(),
|
||||
time.getDate(),
|
||||
time.getHours(),
|
||||
time.getMinutes()
|
||||
);
|
||||
this.eventProcess.workflowInstanceDataFields.LastOccurrence = time;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
openLastOccurrence() {
|
||||
@@ -237,6 +278,12 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
this.startDate = new Date(this.startDate);
|
||||
this.startDate.setHours(this.startDate.getHours() + 1);
|
||||
|
||||
this.endDate = new Date(this.endDate);
|
||||
this.endDate.setHours(this.endDate.getHours() + 1);
|
||||
|
||||
const event: EventToApproveEdit = {
|
||||
SerialNumber: this.eventProcess.serialNumber,
|
||||
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||
@@ -263,9 +310,9 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
|
||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||
this.toastService.successMessage('Evento editado');
|
||||
this.toastService._successMessage('Evento editado');
|
||||
}, error =>{
|
||||
this.toastService.badRequest('Evento não editado');
|
||||
this.toastService._badRequest('Evento não editado');
|
||||
})
|
||||
|
||||
|
||||
@@ -273,16 +320,16 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
if(document['action'] == 'add') {
|
||||
delete document.action
|
||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
||||
this.toastService.successMessage();
|
||||
this.toastService._successMessage();
|
||||
}, error =>{
|
||||
this.toastService.badRequest();
|
||||
this.toastService._badRequest();
|
||||
});
|
||||
} else if(document['action'] == 'delete') {
|
||||
delete document.action
|
||||
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
}, error =>{
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="MDGPR">
|
||||
Calendário do MDGPR
|
||||
Meu Calendário
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="PR">
|
||||
Presidente da República
|
||||
Calendário Partilhado
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon">
|
||||
<div class="theicon" (click)="refreshing()">
|
||||
<button title="Atualizar" class="btn-no-color" (click)="refreshing()">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -84,6 +84,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1000);
|
||||
|
||||
@@ -95,6 +95,7 @@ export class ExpedientsPage implements OnInit {
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1000)
|
||||
|
||||
Reference in New Issue
Block a user