add delegar verification

This commit is contained in:
Eudes Inácio
2024-03-02 12:38:30 +01:00
parent f428b17286
commit 805825d3f5
16 changed files with 84 additions and 23 deletions
+1
View File
@@ -68,6 +68,7 @@ export class fullTask {
workflowInstanceFolio: string
workflowInstanceID: number
workflowName: string
isDelegated: boolean
}
export const activityInstanceNameArray = [
@@ -135,6 +135,15 @@
</div>
</div>
<div class="container-div">
<div>
<ion-item>
<ion-label>Todo dia</ion-label>
<ion-checkbox [(ngModel)]="allDayCheck" (ionChange)="onCheckboxChange($event)"></ion-checkbox>
</ion-item>
</div>
</div>
<div class="container-div width-100">
<div class="ion-item-class-2 width-100">
<div class="ion-icon-class">
@@ -163,7 +172,8 @@
</div>
</div>
<div class="container-div width-100">
<div *ngIf="!allDayCheck" class="container-div width-100">
<div class="ion-item-class-2 width-100 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
@@ -88,6 +88,7 @@ export class EditEventPage implements OnInit {
sesseionStora = SessionStore
environment = environment
allDayCheck: boolean = false;
constructor(
private modalController: ModalController,
@@ -112,6 +113,7 @@ export class EditEventPage implements OnInit {
this.caller = this.navParams.get('caller');
this.initCalendarName = this.postEvent.CalendarName;
this.allDayCheck = this.postEvent.IsAllDayEvent;
@@ -648,4 +650,28 @@ export class EditEventPage implements OnInit {
}
return string;
}
onCheckboxChange(event: any) {
if (this.allDayCheck) {
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
console.log('Recurso ativado!!');
} else {
this.postEvent.IsAllDayEvent = this.allDayCheck;
console.log('Recurso desativado');
}
}
setAlldayTime(timeToReturn) {
let date: any = new Date(timeToReturn) || new Date();
let newdate = new Date();
date.setHours(0)
date.setMinutes(0)
date.setSeconds(0);
return date
}
}
@@ -116,7 +116,7 @@
<div>
<ion-item>
<ion-label>Todo dia</ion-label>
<ion-checkbox [(ngModel)]="recursoAtivado" (ionChange)="onCheckboxChange($event)"></ion-checkbox>
<ion-checkbox [(ngModel)]="allDayCheck" (ionChange)="onCheckboxChange($event)"></ion-checkbox>
</ion-item>
</div>
</div>
@@ -131,7 +131,19 @@
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
<mat-form-field appearance="none" class="date-hour-picker">
<!-- <mat-form-field appearance="none" class="date-hour-picker">
<input matInput [matDatepicker]="picker1"
placeholder="Data Inicio*"
[(ngModel)]="postEvent.StartDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker> -->
<input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Data Inicio*"
[(ngModel)]="postEvent.StartDate"
@@ -142,6 +154,8 @@
[stepHour]="1"
[stepMinute]="15"
[hideTime]="!allDayCheck"
[disabled]="true"
>
</ngx-mat-datetime-picker>
@@ -881,15 +881,14 @@ export class NewEventPage implements OnInit {
onCheckboxChange(event: any) {
if (this.allDayCheck) {
this.allDayCheck = !this.allDayCheck
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
console.log('Recurso desativado');
} else {
this.allDayCheck = !this.allDayCheck
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.StartDate = this.setAlldayTime(this.CalendarDate)
console.log('Recurso ativado!!');
} else {
this.postEvent.IsAllDayEvent = this.allDayCheck;
console.log('Recurso desativado');
}
}
@@ -27,7 +27,7 @@
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc">Outras opções</div>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && !isDelegated" (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
@@ -48,6 +48,7 @@ export class DespachoPrPage implements OnInit {
dropButton = false
selectedIndex = 0
isDelegated:boolean = false;
showOptions = false
@@ -120,7 +121,8 @@ export class DespachoPrPage implements OnInit {
async LoadTaskDetail(serial: string) {
this.processes.GetTask(serial).subscribe((res: fullTask) => {
this.TaskService.loadDiplomas();
console.log('is delegate despach pr',res.isDelegated)
this.isDelegated = res.isDelegated
this.task = {
"SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceDataFields.Subject,
@@ -24,7 +24,7 @@
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' ">Reencaminhar para Área Jurídica</div>
<button (click)="openAddNoteModal('Gerar Diploma')" *ngIf="task.WorkflowName == 'Despacho do Presidente da República'" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button>
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' " >Outras opções</div>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="!isDelegated" (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 (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
@@ -34,7 +34,7 @@
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Reexecutar Despacho'">
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="!isDelegated" (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 (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
@@ -59,6 +59,7 @@ export class DespachoPage implements OnInit {
dropButton = true
showOptions = false
isDelegated = false;
constructor(private activateRoute: ActivatedRoute,
@@ -136,7 +137,8 @@ export class DespachoPage implements OnInit {
} catch (error) {
console.log(error)
}
console.log('is Delegated',res.isDelegated)
this.isDelegated = res.isDelegated;
this.task = {
"SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceDataFields.Subject,
@@ -25,7 +25,7 @@
<div class="aside-right-container flex-column height-100 overflow-y-auto">
<div class="buttons">
<button (click)="enviarDiploma({note: '', documents: [], serialnumber: task.SerialNumber})" class="btn-cancel" shape="round" >Enviar Diploma</button>
<button (click)="openDelegarModal()" class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="!isDelegated" (click)="openDelegarModal()" class="btn-cancel" shape="round" >Delegar</button>
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para pendentes</button>
<div class="solid"></div>
@@ -36,6 +36,7 @@ export class DiplomasGerarPage implements OnInit {
attachments:any;
customDate: any;
caller:string;
isDelegated: boolean;
showOptions = false
constructor(
@@ -101,6 +102,8 @@ export class DiplomasGerarPage implements OnInit {
this.processes.GetTask(serial).subscribe(res => {
this.TaskService.loadDiplomas()
console.log('is delegated', res.isDelegated)
this.isDelegated = res.isDelegated;
this.task = {
"SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceDataFields.Subject,
@@ -23,7 +23,7 @@
<div class="solid"></div>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Arquivar</button>
<div hidden class="solid"></div>
<button hidden class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="!isDelegated" hidden class="btn-cancel" shape="round" >Delegar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento <br />(Gestão Documental)</button>
</div>
@@ -35,7 +35,7 @@
<button (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 hidden class="solid"></div>
<button hidden class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="!isDelegated" hidden class="btn-cancel" shape="round" >Delegar</button>
</div>
</div>
@@ -44,6 +44,7 @@ export class ExpedientePrPage implements OnInit {
loggeduser: LoginUserRespose;
documents: SearchList[] = [];
attachments:any;
isDelegated: boolean;
constructor(
private processes: ProcessesService,
@@ -115,7 +116,8 @@ export class ExpedientePrPage implements OnInit {
let date = new Date(res.taskStartDate);
date.setMonth(date.getMonth() + 1);
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
console.log('is delegated expeidente pr',res.isDelegated)
this.isDelegated = res.isDelegated
this.TaskService.loadExpedientes();
this.task = {
"SerialNumber": res.serialNumber,
@@ -60,7 +60,7 @@
<div *ngIf="task.WorkflowName == 'Pedido de Deferimento'">
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Deferimento'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="!isDelegated" (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 != 'PR' && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
@@ -69,7 +69,7 @@
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Reapreciar Deferimento'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="!isDelegated" (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 != 'PR' && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
@@ -78,7 +78,7 @@
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Deferimento'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button *ngIf="!isDelegated" (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 hidden (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
@@ -51,6 +51,7 @@ export class PedidoPage implements OnInit {
taskArrayActions = [];
showOptions = false
isDelegated: boolean;
constructor(private activatedRoute: ActivatedRoute,
private processes: ProcessesService,
private menu: MenuController,
@@ -106,7 +107,8 @@ export class PedidoPage implements OnInit {
this.fulltask = res
this.TaskService.loadPedidos();
console.log('is delegated pedido', res.isDelegated)
this.isDelegated = res.isDelegated
if (res.workflowDisplayName == 'Pedido de Parecer' || res.workflowDisplayName == 'Pedido de Parecer do Presidente') {
let date = new Date(res.taskStartDate);