This commit is contained in:
Peter Maquiran
2022-07-14 17:33:12 +01:00
13 changed files with 77 additions and 21 deletions
@@ -254,6 +254,7 @@
placeholder="Choose a date"
[(ngModel)]="eventProcess.workflowInstanceDataFields.LastOccurrence"
[disabled]="disabled"
[min]="eventProcess.workflowInstanceDataFields.EndDate"
>
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #occurrrence
@@ -36,12 +36,13 @@
<span class="date">{{loadedEvent.Location}}</span>
<div *ngIf="loadedEvent.Organizer">
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false">
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false || sesseionStora.user.Profile =='PR'">
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
</div>
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true">
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true && sesseionStora.user.Profile !='PR'">
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #f05d5e;">{{loadedEvent.CalendarName}}</span>
</div>
@@ -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() {