mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add integration of create new event from expedient
This commit is contained in:
@@ -2,9 +2,10 @@ import { Participant } from './participant.model';
|
||||
import { Folder } from './folder.model';
|
||||
|
||||
export class Despacho{
|
||||
distributionType: string;
|
||||
deadline: Date;
|
||||
userEmail: string;
|
||||
participants: Participant;
|
||||
dispatchFolder: Folder;
|
||||
DistributionType: string;
|
||||
CountryCode: string;
|
||||
TypeDeadline: string;
|
||||
UserEmail: string;
|
||||
UsersSelected: Participant[];
|
||||
DispatchFolder: Folder;
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
export class Folder{
|
||||
nad:string;
|
||||
message:string;
|
||||
sourceSecFsId:string;
|
||||
souceType:string;
|
||||
sourceId:string;
|
||||
Nad:number;
|
||||
Subject: string;
|
||||
Message:string;
|
||||
SourceSecFsId:string;
|
||||
SouceType:string;
|
||||
SourceId:string;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
export class Participant{
|
||||
id: string;
|
||||
type: string;
|
||||
deadline: Date;
|
||||
UserId: string;
|
||||
UserType: string;
|
||||
|
||||
/* Deadline: Date; */
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { EventBody } from './eventbody.model';
|
||||
import { Participant } from './participant.model';
|
||||
|
||||
export class ProcessEvent{
|
||||
EventId: string;
|
||||
Subject: string;
|
||||
Body: EventBody;
|
||||
Location: string;
|
||||
CalendarId: string;
|
||||
CalendarName: string;
|
||||
StartDate: Date;
|
||||
EndDate: Date;
|
||||
EventType: string;
|
||||
Participants: Participant[];
|
||||
IsMeeting: boolean;
|
||||
IsRecurring: boolean;
|
||||
AppointmentState: number;
|
||||
TimeZone: string;
|
||||
Organizer: string;
|
||||
Categories: string[];
|
||||
HasAttachments: boolean;
|
||||
}
|
||||
+1
-1
@@ -58,7 +58,7 @@ export class AddParticipantsCcModalPage implements OnInit {
|
||||
saveTask(){
|
||||
this.modalController.dismiss(this.contacts.filter(function(contact) {
|
||||
if(contact.IsRequired){
|
||||
console.log(contact);
|
||||
/* console.log(contact); */
|
||||
}
|
||||
|
||||
return contact.IsRequired == true;
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ export class AddParticipantsModalPage implements OnInit {
|
||||
saveTask(){
|
||||
this.modalController.dismiss(this.contacts.filter(function(contact) {
|
||||
if(contact.IsRequired){
|
||||
console.log(contact);
|
||||
/* console.log(contact); */
|
||||
}
|
||||
|
||||
return contact.IsRequired == true;
|
||||
|
||||
+33
-14
@@ -1,10 +1,14 @@
|
||||
<ion-content>
|
||||
<ion-item lines="none">
|
||||
<ion-label class="title">Convocar Reunião</ion-label>
|
||||
</ion-item>
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="header-content">
|
||||
<div class="header-title">
|
||||
<label>Convocar Reunião</label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="ion-item-container">
|
||||
<ion-input placeholder="Assunto" value="{{task.Folio}}"></ion-input>
|
||||
<ion-input placeholder="Assunto" [(ngModel)]="postData.Subject"></ion-input>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
@@ -13,7 +17,21 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input placeholder="Venue"></ion-input>
|
||||
<ion-input placeholder="Localização" [(ngModel)]="postData.Location"></ion-input>
|
||||
</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 [(ngModel)]="postData.CalendarName" placeholder="Selecione repetição" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="Oficial">Oficial</ion-select-option>
|
||||
<ion-select-option value="Pessoal">Pessoal</ion-select-option>
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,7 +42,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input placeholder="Data início"></ion-input>
|
||||
<ion-input placeholder="Data início" [(ngModel)]="postData.StartDate"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,7 +53,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input placeholder="Data fim"></ion-input>
|
||||
<ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,11 +64,12 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select value="Não se repete" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option naoRepete="Reunião">Não se repete</ion-select-option>
|
||||
<ion-select-option semanal="Viagem">Semanal</ion-select-option>
|
||||
<ion-select-option diario="Viagem">Diário</ion-select-option>
|
||||
<ion-select-option anual="Viagem">Anual</ion-select-option>
|
||||
<ion-select [(ngModel)]="postData.IsRecurring" placeholder="Selecione repetição" value="false" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="false">Não se repete</ion-select-option>
|
||||
<ion-select-option value="true">Repete</ion-select-option>
|
||||
<!-- <ion-select-option value="true">Semanal</ion-select-option>
|
||||
<ion-select-option value="true">Diário</ion-select-option>
|
||||
<ion-select-option value="true">Anual</ion-select-option> -->
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,7 +123,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input placeholder="Detalhes"></ion-input>
|
||||
<ion-input [(ngModel)]="postData.Body.Text" placeholder="Detalhes"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+15
-12
@@ -1,18 +1,21 @@
|
||||
ion-content{
|
||||
--padding-top: 20px;
|
||||
--padding-start: 15px;
|
||||
--padding-end: 20px;
|
||||
.header-content{
|
||||
width: 360px;
|
||||
overflow: auto;
|
||||
margin: 25px auto;
|
||||
}
|
||||
.title{
|
||||
.header-title{
|
||||
width: 264px;
|
||||
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;
|
||||
margin: 0 5px 0 5px;
|
||||
padding: 0;
|
||||
color:#000;
|
||||
float: left;
|
||||
}
|
||||
ion-content{
|
||||
--padding-top: 0px;
|
||||
--padding-start: 15px;
|
||||
--padding-end: 20px;
|
||||
}
|
||||
.container-div{
|
||||
margin-bottom: 15px;
|
||||
|
||||
+99
-5
@@ -3,6 +3,11 @@ import { Router } from '@angular/router';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AddParticipantsCcModalPage } from '../add-participants-cc-modal/add-participants-cc-modal.page';
|
||||
import { AddParticipantsModalPage } from '../add-participants-modal/add-participants-modal.page';
|
||||
import { Event } from 'src/app/models/event.model'
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-book-meeting-modal',
|
||||
@@ -13,17 +18,35 @@ export class BookMeetingModalPage implements OnInit {
|
||||
task: any;
|
||||
taskParticipants: any;
|
||||
taskParticipantsCc: any;
|
||||
taskDocId:string;
|
||||
|
||||
postEvent: Event;
|
||||
postData: Event;
|
||||
eventBody: EventBody;
|
||||
eventAttendees: EventPerson[];
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private router:Router,
|
||||
private navParams: NavParams,
|
||||
) { }
|
||||
private processes:ProcessesService,
|
||||
private calendarService: EventsService,
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.postData = new Event();
|
||||
this.eventBody = new EventBody;
|
||||
this.postData.Body = this.eventBody;
|
||||
|
||||
/* Initialize 'Subject' with the title of the expedient */
|
||||
this.postData.Subject = this.task.Folio;
|
||||
this.postData.CalendarName = "Oficial";
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.task = this.navParams.get('task');
|
||||
console.log(this.task)
|
||||
console.log(this.task.SerialNumber);
|
||||
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
@@ -34,6 +57,39 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
saveTask(){
|
||||
this.eventBody={
|
||||
BodyType: '0',
|
||||
Text: this.postData.Body.Text,
|
||||
}
|
||||
this.postData = {
|
||||
EventId: '',
|
||||
Subject: this.postData.Subject,
|
||||
Body: this.eventBody,
|
||||
Location: this.postData.Location,
|
||||
CalendarId: '',
|
||||
CalendarName: this.postData.CalendarName,
|
||||
StartDate: new Date(),
|
||||
EndDate: new Date(),
|
||||
EventType: 'Reunião',
|
||||
Attendees: this.eventAttendees,
|
||||
IsMeeting: false,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 0,
|
||||
TimeZone: 'UTC',
|
||||
Organizer: null,
|
||||
Categories: null,
|
||||
HasAttachments: true,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
this.processes.GetTask(this.task.SerialNumber).subscribe(res =>{
|
||||
this.taskDocId = res.workflowInstanceDataFields.DocId;
|
||||
this.calendarService.postExpedientEvent(this.taskDocId, this.postData);
|
||||
});
|
||||
|
||||
this.close();
|
||||
|
||||
/* this.processes.postExpedientEvent(this.postData); */
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +106,26 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipants = res.data;
|
||||
/* console.log(this.taskParticipants.data); */
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
|
||||
|
||||
if (newattendees != null)
|
||||
{
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
"EmailAddress": newattendee.EmailAddress,
|
||||
"Name": newattendee.Name,
|
||||
"IsRequired": true
|
||||
};
|
||||
if (this.eventAttendees == null)
|
||||
{
|
||||
this.eventAttendees = new Array();
|
||||
}
|
||||
this.eventAttendees.push(att);
|
||||
|
||||
});
|
||||
}
|
||||
this.postData.Attendees = this.eventAttendees;
|
||||
});
|
||||
}
|
||||
async addParticipantsCc(){
|
||||
@@ -66,7 +141,26 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipantsCc = res.data;
|
||||
/* console.log(this.taskParticipants.data); */
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
|
||||
|
||||
if (newattendees != null)
|
||||
{
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
"EmailAddress": newattendee.EmailAddress,
|
||||
"Name": newattendee.Name,
|
||||
"IsRequired": false
|
||||
};
|
||||
if (this.eventAttendees == null)
|
||||
{
|
||||
this.eventAttendees = new Array();
|
||||
}
|
||||
this.eventAttendees.push(att);
|
||||
|
||||
});
|
||||
}
|
||||
this.postData.Attendees = this.eventAttendees;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -3,7 +3,7 @@
|
||||
<ion-label class="title">{{modalTitle[taskType]}}</ion-label>
|
||||
</ion-item>
|
||||
<div class="ion-item-container">
|
||||
<ion-input placeholder="Assunto" [(ngModel)]="taskSubject"></ion-input>
|
||||
<ion-input placeholder="Assunto" [(ngModel)]="postData.DispatchFolder.Subject"></ion-input>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
@@ -12,7 +12,7 @@
|
||||
<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)]="taskDescription"></ion-input>
|
||||
<ion-input class="add-border" placeholder="Descrição" [(ngModel)]="postData.DispatchFolder.Message"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -23,11 +23,11 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select value="Normal" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option Pessoal="Reunião">Normal</ion-select-option>
|
||||
<ion-select-option Oficial="Viagem">Urgente</ion-select-option>
|
||||
<ion-select-option Oficial="Viagem">Muito Urgente</ion-select-option>
|
||||
<ion-select-option Oficial="Viagem">Urgentíssimo</ion-select-option>
|
||||
<ion-select placeholder="Prazo" [(ngModel)]="postData.TypeDeadline" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="99999861">Normal</ion-select-option>
|
||||
<ion-select-option value="99999862">Urgente</ion-select-option>
|
||||
<ion-select-option value="99999863">Muito Urgente</ion-select-option>
|
||||
<ion-select-option value="99999864">Urgentíssimo</ion-select-option>
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+93
-102
@@ -4,11 +4,13 @@ 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 { StorageService } from 'src/app/services/storage.service';
|
||||
import { AddParticipantsCcModalPage } from '../add-participants-cc-modal/add-participants-cc-modal.page';
|
||||
import { AddParticipantsModalPage } from '../add-participants-modal/add-participants-modal.page';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expedient-task-modal',
|
||||
@@ -22,15 +24,17 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
'Solicitar Parecer',
|
||||
'Solicitar Deferimento'
|
||||
];
|
||||
taskType:number;
|
||||
taskType:string;
|
||||
task: any;
|
||||
taskParticipants: any;
|
||||
taskParticipantsCc: any;
|
||||
taskSubject: string;
|
||||
taskDate: Date;
|
||||
taskDescription: string;
|
||||
user: string;
|
||||
|
||||
postData: Despacho;
|
||||
dispatchFolder: Folder;
|
||||
participants: Participant[];
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -39,127 +43,83 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private authService: AuthService,
|
||||
) {
|
||||
this.user = environment.defaultuser +'@'+ environment.domain;
|
||||
this.task = this.navParams.get('task');
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
this.postData = new Despacho();
|
||||
this.participants = this.participants = new Array();
|
||||
this.dispatchFolder = {
|
||||
Nad: 30,
|
||||
Subject: '',
|
||||
Message: '',
|
||||
SourceSecFsId: '8',
|
||||
SouceType: 'DOC',
|
||||
SourceId: '',
|
||||
|
||||
};
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
this.postData.TypeDeadline = '99999861';
|
||||
/* Initialize 'Subject' with the title of the expedient */
|
||||
this.postData.DispatchFolder.Subject = this.task.workflowInstanceFolio;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
|
||||
this.task = this.navParams.get('task');
|
||||
console.log(this.task);
|
||||
this.taskSubject = this.task.workflowInstanceFolio;
|
||||
this.taskDate = new Date(this.task.taskStartDate);
|
||||
|
||||
this.authService.userData$.subscribe((res:any)=>{
|
||||
/* this.authService.userData$.subscribe((res:any)=>{
|
||||
console.log(res);
|
||||
});
|
||||
|
||||
console.log(this.user); */
|
||||
}
|
||||
|
||||
close(){
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
/* if(this.modalTitle[this.taskType]){
|
||||
|
||||
} */
|
||||
cancelTask(){
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
saveTask(){
|
||||
switch (this.modalTitle[this.taskType])
|
||||
console.log(this.taskType);
|
||||
|
||||
switch (this.taskType)
|
||||
{
|
||||
case "Efectuar Despacho":
|
||||
/* this.postData = {
|
||||
distributionType: "Paralelo",
|
||||
deadline: new Date ('2020-11-13T12:55:39.5281471+01:00'),
|
||||
userEmail: "gilson.manuel@gabinetedigital.local",
|
||||
usersSelected: Participant;
|
||||
dispatchFolder: Folder;
|
||||
} */
|
||||
let body = {
|
||||
"distributionType": "Paralelo",
|
||||
"deadline": "2020-11-13T12:55:39.5281471+01:00",
|
||||
"userEmail": "gilson.manuel@gabinetedigital.local",
|
||||
"dispatchFolder": {
|
||||
"Nad": 30,
|
||||
"Subject": this.taskSubject,
|
||||
"Message": this.taskDescription,
|
||||
"SourceSecFsId": this.task.workflowInstanceDataFields.FsId,
|
||||
"SourceType": "DOC",
|
||||
"SourceId": this.task.workflowInstanceDataFields.DocId,
|
||||
},
|
||||
"usersSelected": [
|
||||
{
|
||||
"UserId": "GABINETEDIGITAL\\gilson.manuel",
|
||||
"UserType": "CC",
|
||||
"DeadLine": "2020-11-13T12:55:39.5381237+01:00"
|
||||
},
|
||||
{
|
||||
"UserId": "GABINETEDIGITAL\\tiago.kayaya",
|
||||
"UserType": "I",
|
||||
"DeadLine": "2020-11-13T12:55:39.5381237+01:00"
|
||||
}
|
||||
]
|
||||
case '0':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
TypeDeadline: this.postData.TypeDeadline,
|
||||
UserEmail: this.user,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
this.processes.postDespatcho(body);
|
||||
console.log(this.postData);
|
||||
/* this.processes.postDespatcho(this.postData); */
|
||||
break;
|
||||
case "Solicitar Parecer":
|
||||
console.log('Parecer');
|
||||
let bodyp = {
|
||||
"distributionType": "Paralelo",
|
||||
"deadline": "2020-11-13T12:55:39.5281471+01:00",
|
||||
"userEmail": "gilson.manuel@gabinetedigital.local",
|
||||
"dispatchFolder": {
|
||||
"Nad": 30,
|
||||
"Subject": this.taskSubject,
|
||||
"Message": this.taskDescription,
|
||||
"SourceSecFsId": this.task.workflowInstanceDataFields.FsId,
|
||||
"SourceType": "DOC",
|
||||
"SourceId": this.task.workflowInstanceDataFields.DocId,
|
||||
},
|
||||
"usersSelected": [
|
||||
{
|
||||
"UserId": "GABINETEDIGITAL\\gilson.manuel",
|
||||
"UserType": "CC",
|
||||
"DeadLine": "2020-11-13T12:55:39.5381237+01:00"
|
||||
},
|
||||
{
|
||||
"UserId": "GABINETEDIGITAL\\tiago.kayaya",
|
||||
"UserType": "I",
|
||||
"DeadLine": "2020-11-13T12:55:39.5381237+01:00"
|
||||
}
|
||||
]
|
||||
case '1':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
TypeDeadline: this.postData.TypeDeadline,
|
||||
UserEmail: this.user,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
this.processes.postParecer(bodyp);
|
||||
/* this.processes.postParecer(this.postData); */
|
||||
break;
|
||||
case "Solicitar Deferimento":
|
||||
console.log('Deferimento');
|
||||
let bodyd = {
|
||||
"distributionType": "Paralelo",
|
||||
"deadline": "2020-11-13T12:55:39.5281471+01:00",
|
||||
"userEmail": "gilson.manuel@gabinetedigital.local",
|
||||
"dispatchFolder": {
|
||||
"Nad": 30,
|
||||
"Subject": this.taskSubject,
|
||||
"Message": this.taskDescription,
|
||||
"SourceSecFsId": this.task.workflowInstanceDataFields.FsId,
|
||||
"SourceType": "DOC",
|
||||
"SourceId": this.task.workflowInstanceDataFields.DocId,
|
||||
},
|
||||
"usersSelected": [
|
||||
{
|
||||
"UserId": "GABINETEDIGITAL\\gilson.manuel",
|
||||
"UserType": "CC",
|
||||
"DeadLine": "2020-11-13T12:55:39.5381237+01:00"
|
||||
},
|
||||
{
|
||||
"UserId": "GABINETEDIGITAL\\tiago.kayaya",
|
||||
"UserType": "I",
|
||||
"DeadLine": "2020-11-13T12:55:39.5381237+01:00"
|
||||
}
|
||||
]
|
||||
case '2':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
TypeDeadline: this.postData.TypeDeadline,
|
||||
UserEmail: this.user,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
this.processes.postDeferimento(bodyd);
|
||||
/* this.processes.postDeferimento(this.postData); */
|
||||
break;
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
@@ -179,7 +139,23 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipants = res.data;
|
||||
/* console.log(this.taskParticipants.data); */
|
||||
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
|
||||
if(newattendees!= null){
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
'UserId': 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);
|
||||
});
|
||||
}
|
||||
async addParticipantsCc(){
|
||||
@@ -195,8 +171,23 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipantsCc = res.data;
|
||||
|
||||
/* console.log(this.taskParticipants.data); */
|
||||
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
|
||||
if(newattendees!= null){
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
'UserId': 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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,6 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
});
|
||||
console.log(this.serialnumber);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -115,4 +115,18 @@ export class EventsService {
|
||||
|
||||
return this.http.delete(`${puturl}`, options)
|
||||
}
|
||||
postExpedientEvent(docId:any, body:any){
|
||||
const geturl = environment.apiURL + 'Calendar/CreateEventExpediente';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("DocId", docId);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.post<any>(`${geturl}`, body, options).toPromise().then(res =>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,19 @@ export class ProcessesService {
|
||||
};
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
FindTask(serialnumber:string): Observable<any>
|
||||
{
|
||||
const geturl = environment.apiURL + 'Tasks/FindExpedient';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("serialNumber", serialnumber);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
GetMDOficialTasks(): Observable<any>
|
||||
{
|
||||
@@ -125,6 +138,9 @@ export class ProcessesService {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user