mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix despacho from a task
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { CreateProcessPage } from './create-process.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: CreateProcessPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class CreateProcessPageRoutingModule {}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { CreateProcessPageRoutingModule } from './create-process-routing.module';
|
||||
|
||||
import { CreateProcessPage } from './create-process.page';
|
||||
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
|
||||
import { EmptyContainerPage } from 'src/app/shared/empty-container/empty-container.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
CreateProcessPageRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
CreateProcessPage,
|
||||
AttendeeModalPage,
|
||||
EmptyContainerPage,
|
||||
]
|
||||
})
|
||||
export class CreateProcessPageModule {}
|
||||
@@ -0,0 +1,145 @@
|
||||
<ion-content class="height-100">
|
||||
<div class="main-content d-flex height-100">
|
||||
<div class="content d-flex flex-column width-100">
|
||||
<ion-item lines="none">
|
||||
<ion-label class="title">{{modalTitle[taskType]}}</ion-label>
|
||||
</ion-item>
|
||||
<div class="ion-item-container width-100">
|
||||
<ion-input placeholder="Assunto" [(ngModel)]="postData.DispatchFolder.Subject"></ion-input>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input class="add-border" placeholder="Descrição" [(ngModel)]="postData.DispatchFolder.Message"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Prazo" [(ngModel)]="postData.Priority" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</ion-select-option>
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Tipo" [(ngModel)]="postData.SubjectTypeId" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label *ngIf="taskParticipants.length == 0" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipants();">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label *ngIf="taskParticipantsCc.length == 0" class="list-people-title">Com conhecimento</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipantsCc();">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div hidden class="ion-item-container-no-border">
|
||||
<ion-label>
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loadedAttachments">
|
||||
<ion-item>
|
||||
<ion-label>Documentos Anexados</ion-label>
|
||||
</ion-item>
|
||||
<ion-list>
|
||||
<ion-item *ngFor="let attachment of loadedAttachments">
|
||||
<ion-label>
|
||||
<h4 class="attach-title-item">{{attachment.Description}}</h4>
|
||||
<p><span class="span-left">{{attachment.Stakeholders}}</span><span class="span-right"> {{ attachment.CreateDate | date: 'dd/MM/yyyy' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="postData" class="aside-right flex-column height-100">
|
||||
<app-empty-container
|
||||
[texto]="emptyTextDescription"
|
||||
*ngIf="!showAttendees"
|
||||
class="d-flex height-100 flex-column">
|
||||
</app-empty-container>
|
||||
<app-attendee-modal
|
||||
*ngIf="showAttendees"
|
||||
class="d-flex flex-column height-100"
|
||||
[adding]="adding"
|
||||
[taskParticipants]="taskParticipants"
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
(closeComponent)="closeComponent()"
|
||||
(setIntervenient)="setIntervenient($event)"
|
||||
(setIntervenientCC)="setIntervenientCC($event)"
|
||||
(setContact)="setContact($event)"
|
||||
></app-attendee-modal>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="cancelTask()">Cancelar</button>
|
||||
<button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@@ -0,0 +1,128 @@
|
||||
.content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
float: left;
|
||||
|
||||
.title{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: normal;
|
||||
color: #000000;
|
||||
//margin: 8px 0 8px 0px;
|
||||
}
|
||||
.container-div{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.ion-item-container{
|
||||
//width: 360px;
|
||||
margin: 15px auto;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.ion-item-container-no-border{
|
||||
//width: 360px;
|
||||
//margin: 15px auto;
|
||||
}
|
||||
.ion-item-class-2{
|
||||
//width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
}
|
||||
.ion-icon-class{
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
float: left;
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
}
|
||||
ion-select{
|
||||
padding-left: 5px;
|
||||
margin-left: 0;
|
||||
}
|
||||
.ion-input-class{
|
||||
width: calc(100% - 45px);
|
||||
height: 45px;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
float: left;
|
||||
}
|
||||
.ion-input-class-no-height{
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
overflow: auto;
|
||||
}
|
||||
.list-people{
|
||||
width: 256px;
|
||||
float: left;
|
||||
|
||||
}
|
||||
.add-people{
|
||||
width: 45px;
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
color: #797979;
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
}
|
||||
|
||||
.attach-title-item{
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color:#0d89d1;
|
||||
}
|
||||
/* SPAN */
|
||||
.span-left{
|
||||
float: left;
|
||||
font-size: 15x;
|
||||
}
|
||||
.span-right{
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
.container-footer{
|
||||
margin:0 auto;
|
||||
overflow: auto;
|
||||
.button-cancel {
|
||||
width: 170px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #e0e9ee;
|
||||
--color: #061b52;
|
||||
margin:10px;
|
||||
}
|
||||
.button-save {
|
||||
width: 170px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #42b9fe;
|
||||
--color:#ffffff;
|
||||
margin:10px;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
@media only screen and (min-width: 1024px){
|
||||
.aside-content{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { CreateProcessPage } from './create-process.page';
|
||||
|
||||
describe('CreateProcessPage', () => {
|
||||
let component: CreateProcessPage;
|
||||
let fixture: ComponentFixture<CreateProcessPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CreateProcessPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(CreateProcessPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,370 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { Despacho } from 'src/app/models/despacho.model';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { Participant } from 'src/app/models/participant.model';
|
||||
import { Folder } from 'src/app/models/folder.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AddParticipantsModalPage } from 'src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page';
|
||||
import { AddParticipantsCcModalPage } from 'src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-process',
|
||||
templateUrl: './create-process.page.html',
|
||||
styleUrls: ['./create-process.page.scss'],
|
||||
})
|
||||
export class CreateProcessPage implements OnInit {
|
||||
modalTitle: string[] = [
|
||||
'Efectuar Despacho',
|
||||
'Solicitar Parecer',
|
||||
'Solicitar Deferimento'
|
||||
];
|
||||
taskType:string;
|
||||
task: any;
|
||||
|
||||
taskParticipants: any = [];
|
||||
taskParticipantsCc: any = [];
|
||||
|
||||
taskDate: Date;
|
||||
taskDescription: string;
|
||||
user: string;
|
||||
loadedAttachments:any;
|
||||
subjectTypes:any;
|
||||
|
||||
postData: Despacho;
|
||||
dispatchFolder: Folder;
|
||||
participants: Participant[];
|
||||
|
||||
contacts= [];
|
||||
// trigger hide and show for attendee component
|
||||
showAttendees= false;
|
||||
|
||||
adding: "intervenient" | "CC" = "intervenient";
|
||||
profile: string;
|
||||
|
||||
emptyTextDescription = "Sem intervenientes selecionados";
|
||||
showEmptyContainer = true;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private router:Router,
|
||||
private processes:ProcessesService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private navParams: NavParams,
|
||||
private alertController: AlertService,
|
||||
private authService: AuthService) {
|
||||
this.user = environment.defaultuser +'@'+ environment.domain;
|
||||
this.task = this.navParams.get('task');
|
||||
|
||||
console.log('task', this.task)
|
||||
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
|
||||
this.postData = new Despacho();
|
||||
this.participants = this.participants = new Array();
|
||||
this.dispatchFolder = {
|
||||
Nad: 30,
|
||||
Subject: '',
|
||||
Message: '',
|
||||
SourceSecFsId: '361',
|
||||
SouceType: 'FOLDER',
|
||||
SourceId: this.task.workflowInstanceDataFields.FolderID,
|
||||
DeadlineType: '',
|
||||
|
||||
};
|
||||
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
this.postData.Priority = '99999861';
|
||||
/* By Default TypeDeadline should be 'Economia' */
|
||||
this.postData.SubjectTypeId = '99999844';
|
||||
/* Initialize 'Subject' with the title of the expedient */
|
||||
this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject;
|
||||
this.profile = this.navParams.get('profile');
|
||||
}
|
||||
|
||||
async setAdding(type: "intervenient" | "CC"){
|
||||
this.adding = type;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.taskDate = new Date(this.task.taskStartDate);
|
||||
|
||||
if(!this.task.hasOwnProperty('isEvent')) {
|
||||
// if not
|
||||
this.getAttachments();
|
||||
}
|
||||
|
||||
this.getSubjectType();
|
||||
|
||||
console.log('CHEGOU');
|
||||
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
getSubjectType() {
|
||||
this.processes.GetSubjectType().subscribe(res=>{
|
||||
console.log(res);
|
||||
this.subjectTypes = res;
|
||||
});
|
||||
}
|
||||
cancelTask() {
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
}
|
||||
saveTask(){
|
||||
|
||||
if(this.postData.Priority=='99999861'){
|
||||
this.dispatchFolder.DeadlineType = 'Normal';
|
||||
}
|
||||
else if(this.postData.Priority=='99999862'){
|
||||
this.dispatchFolder.DeadlineType = 'Urgente';
|
||||
}
|
||||
else if(this.postData.Priority=='99999863'){
|
||||
this.dispatchFolder.DeadlineType = 'Muito Urgente';
|
||||
}
|
||||
else if(this.postData.Priority=='99999864'){
|
||||
this.dispatchFolder.DeadlineType = 'Urgentíssimo';
|
||||
}
|
||||
|
||||
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
attendees = attendees.map(function(val) {
|
||||
return {
|
||||
UserEmail: val.EmailAddress,
|
||||
UserType: val.IsRequired?"I": "CC"
|
||||
};
|
||||
})
|
||||
|
||||
if(this.taskParticipants.length > 0) {
|
||||
switch (this.taskType) {
|
||||
case '0':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
this.processes.postDespatcho(this.postData);
|
||||
break;
|
||||
case '1':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
this.processes.postParecer(this.postData);
|
||||
break;
|
||||
case '2':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
this.processes.postDeferimento(this.postData);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
this.modalController.dismiss();
|
||||
/* this.distartExpedientModal();
|
||||
this.close(); */
|
||||
}
|
||||
else {
|
||||
this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getAttachments() {
|
||||
this.attachmentsService.getAttachmentsBySerial(this.task.serialNumber).subscribe(res=>{
|
||||
this.loadedAttachments = res;
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
async addParticipants() {
|
||||
/* console.log('HERES'); */
|
||||
|
||||
|
||||
this.adding = "intervenient";
|
||||
this.contacts = this.taskParticipants;
|
||||
|
||||
if(window.innerWidth <=800){
|
||||
|
||||
this.showAttendees=false;
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.participants
|
||||
},
|
||||
cssClass: 'add-participants-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipants = res.data;
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
if(newattendees!= null){
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
'UserEmail': newattendee.EmailAddress,
|
||||
'UserType': 'I',
|
||||
};
|
||||
if(this.participants == null){
|
||||
this.participants = new Array();
|
||||
}
|
||||
this.participants.push(att);
|
||||
});
|
||||
}
|
||||
this.postData.UsersSelected = this.participants;
|
||||
console.log(this.postData);
|
||||
});
|
||||
} else {
|
||||
this.showAttendees=true
|
||||
}
|
||||
}
|
||||
|
||||
async addParticipantsCc() {
|
||||
|
||||
this.adding = "CC";
|
||||
this.contacts = this.taskParticipantsCc;
|
||||
|
||||
if(window.innerWidth <=800){
|
||||
this.showAttendees=false;
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsCcModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.participants
|
||||
},
|
||||
cssClass: 'add-participants-cc-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipantsCc = res.data;
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
if(newattendees!= null){
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
'UserEmail': newattendee.EmailAddress,
|
||||
'UserType': 'CC',
|
||||
};
|
||||
if(this.participants == null){
|
||||
this.participants = new Array();
|
||||
}
|
||||
this.participants.push(att);
|
||||
});
|
||||
}
|
||||
this.postData.UsersSelected = this.participants;
|
||||
console.log(this.postData);
|
||||
});
|
||||
} else {
|
||||
this.showAttendees=true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.task.serialNumber,
|
||||
folderId: this.task.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
console.log('Expedient Discard closed');
|
||||
this.modalController.dismiss(res['data'])
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async setContact(data:EventPerson[]) {
|
||||
|
||||
if(this.adding == "intervenient"){
|
||||
this.taskParticipants = data;
|
||||
} else if (this.adding == "CC") {
|
||||
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async setIntervenient(data) {
|
||||
this.taskParticipants = data;
|
||||
}
|
||||
|
||||
async setIntervenientCC(data) {
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
async closeComponent() {
|
||||
this.showAttendees = false;
|
||||
}
|
||||
|
||||
async viewExpedientDetail() {
|
||||
console.log(this.profile);
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
componentProps:{
|
||||
serialNumber: this.task.serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
/* console.log('!refresh list'); */
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user