This commit is contained in:
tiago.kayaya
2021-08-20 17:01:20 +01:00
14 changed files with 333 additions and 116 deletions
@@ -29,9 +29,24 @@
<div class="overflow-y-auto">
<div class="upper-content ml-45">
<div class="content-location">
<p><span class="date">{{loadedEvent.Location}}</span><span class="label">{{loadedEvent.CalendarName}}</span></p>
<span class="date">{{loadedEvent.Location}}</span>
<div *ngIf="loadedEvent.Organizer">
<div *ngIf="loadedEvent.Organizer.Name == 'Agenda do Presidente da República' ">
<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="loadedEvent.Organizer.Name == 'Agenda do Ministro e Director do Gabinete do 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>
</div>
</div>
<div class="content-details">
<ion-label>
<p>{{customDate}}</p>
@@ -4,17 +4,84 @@
<ion-content>
<div class="main-content d-flex height-100">
<div class="content d-flex flex-column" *ngIf="task">
<div class="main-header">
<div class="title-content width-100 d-flex justify-space-between align-center">
<div class=" btn-dismiss font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
</div>
<div class="middle d-flex align-center flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label>
</div>
<div class="div-icon" (click)="openOptions()">
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
</div>
</div>
</div>
<div class="upper-content">
<div class="content-details">
<ion-label>
<p><span class="date">{{customDate}}</span><span class="label">{{ task.activityInstanceName }}</span></p>
<p><span class="color-red">{{ task.DeadlineType }}</span></p>
</ion-label>
</div>
</div>
<div class="line"></div>
<div class="overflow-y-auto" style="margin-right: -20px; margin-right: -20px;">
<div class="middle-content">
<h5 *ngIf="intervenientes">Intervenientes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<ion-label>
<div *ngFor="let interveniente of intervenientes">
<p>{{interveniente.Name}}</p>
</div>
</ion-label>
</ion-item>
<div *ngIf="cc.length > 0">
<h5>Com conhecimento</h5>
<ion-item class="ion-no-margin ion-no-padding">
<ion-label>
<div *ngFor="let c of cc">
<p>{{c.Name}}</p>
</div>
</ion-label>
</ion-item>
</div>
<div *ngIf="fulltask.workflowInstanceDataFields.TaskMessage">
<h5>Detalhes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<p [innerHTML]="fulltask.workflowInstanceDataFields.TaskMessage"></p>
</ion-item>
</div>
</div>
<div class="bottom-content width-100">
<ion-list>
<h5>Documentos Anexados</h5>
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId)">
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
</ion-label>
</ion-item>
</ion-list>
</div>
</div>
</div>
<app-task-details class="content d-flex flex-column"
[task]="task"
[intervenientes]="intervenientes"
[cc]="cc"
[customDate]="customDate"
[fulltask]="fulltask"
(openOptions)="openOptions($event)"
(goBack)="goBack()"
(viewDocument)="viewDocument($event)"
></app-task-details>
[task]="task"
[intervenientes]="intervenientes"
[cc]="cc"
[customDate]="customDate"
[fulltask]="fulltask"
(openOptions)="openOptions($event)"
(goBack)="goBack()"
(viewDocument)="viewDocument($event)"
>
<div *ngIf="task" class="aside-right flex-column height-100">
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
@@ -48,7 +115,6 @@
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
</div>
</div>
</div>
</ion-content>
@@ -1,15 +1,10 @@
import { Component, OnInit } from '@angular/core';
import { ProcessesService } from 'src/app/services/processes.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { formatDate } from '@angular/common';
import { Event } from '../../../../models/event.model';
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
import { momentG } from 'src/plugin/momentG'
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
@@ -23,6 +18,7 @@ import { ToastService } from 'src/app/services/toast.service';
import { ForwardPage } from 'src/app/modals/forward/forward.page';
import { PermissionService } from 'src/app/OtherService/permission.service';
import { Location } from '@angular/common';
import { PedidoService } from 'src/app/Rules/pedido.service';
@Component({
@@ -45,13 +41,10 @@ export class PedidoPage implements OnInit {
intervenientes: any;
cc: any = [];
loggeduser: User;
fromPeddingList = false
constructor(private activatedRoute: ActivatedRoute,
private processes: ProcessesService,
private iab: InAppBrowser,
private attachmentsService: AttachmentsService,
private events: EventsService,
private menu: MenuController,
private router: Router,
private modalController: ModalController,
@@ -61,7 +54,8 @@ export class PedidoPage implements OnInit {
private animationController: AnimationController,
private toastService: ToastService,
public p: PermissionService,
private location: Location
private location: Location,
private pedidoService: PedidoService
) {
this.loggeduser = authService.ValidatedUser;
@@ -218,6 +212,8 @@ export class PedidoPage implements OnInit {
this.goBack()
}
alert(JSON.stringify(res)+' nada')
}))
}
@@ -247,25 +243,20 @@ export class PedidoPage implements OnInit {
}
async arquivar(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Arquivo",
"ActionTypeId": 95,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
await this.pedidoService.arquivar({serialNumber: this.serialnumber,
documents,
note
}).toPromise()
this.toastService.successMessage('Processo arquivado')
this.close();
} catch (error) {
this.toastService.badRequest()
} finally {
} finally {
loader.remove()
}
@@ -348,22 +339,22 @@ export class PedidoPage implements OnInit {
modal.onDidDismiss();
}
async viewEventDetail(eventId: any) {
// async viewEventDetail(eventId: any) {
const modal = await this.modalController.create({
component: ViewEventPage,
componentProps: {
eventId: eventId,
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((res) => {
if (res) {
}
});
}
// const modal = await this.modalController.create({
// component: ViewEventPage,
// componentProps: {
// eventId: eventId,
// },
// cssClass: 'modal modal-desktop',
// backdropDismiss: false
// });
// await modal.present();
// modal.onDidDismiss().then((res) => {
// if (res) {
// }
// });
// }
async distartExpedientModal(){
console.log(this.fulltask);
@@ -491,11 +482,11 @@ export class PedidoPage implements OnInit {
await this.repreciar(res.data.note, docs);
this.goBack();
}
else if(actionName == 'Arquivar'){
else if(actionName == 'Arquivar') {
await this.arquivar(res.data.note, docs);
this.goBack();
}
else if(actionName == 'Assignar'){
else if(actionName == 'Assignar') {
await this.assignar(res.data.note, docs);
}
}