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';
|
import { Folder } from './folder.model';
|
||||||
|
|
||||||
export class Despacho{
|
export class Despacho{
|
||||||
distributionType: string;
|
DistributionType: string;
|
||||||
deadline: Date;
|
CountryCode: string;
|
||||||
userEmail: string;
|
TypeDeadline: string;
|
||||||
participants: Participant;
|
UserEmail: string;
|
||||||
dispatchFolder: Folder;
|
UsersSelected: Participant[];
|
||||||
|
DispatchFolder: Folder;
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
export class Folder{
|
export class Folder{
|
||||||
nad:string;
|
Nad:number;
|
||||||
message:string;
|
Subject: string;
|
||||||
sourceSecFsId:string;
|
Message:string;
|
||||||
souceType:string;
|
SourceSecFsId:string;
|
||||||
sourceId:string;
|
SouceType:string;
|
||||||
|
SourceId:string;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
export class Participant{
|
export class Participant{
|
||||||
id: string;
|
UserId: string;
|
||||||
type: string;
|
UserType: string;
|
||||||
deadline: Date;
|
|
||||||
|
/* 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(){
|
saveTask(){
|
||||||
this.modalController.dismiss(this.contacts.filter(function(contact) {
|
this.modalController.dismiss(this.contacts.filter(function(contact) {
|
||||||
if(contact.IsRequired){
|
if(contact.IsRequired){
|
||||||
console.log(contact);
|
/* console.log(contact); */
|
||||||
}
|
}
|
||||||
|
|
||||||
return contact.IsRequired == true;
|
return contact.IsRequired == true;
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ export class AddParticipantsModalPage implements OnInit {
|
|||||||
saveTask(){
|
saveTask(){
|
||||||
this.modalController.dismiss(this.contacts.filter(function(contact) {
|
this.modalController.dismiss(this.contacts.filter(function(contact) {
|
||||||
if(contact.IsRequired){
|
if(contact.IsRequired){
|
||||||
console.log(contact);
|
/* console.log(contact); */
|
||||||
}
|
}
|
||||||
|
|
||||||
return contact.IsRequired == true;
|
return contact.IsRequired == true;
|
||||||
|
|||||||
+33
-14
@@ -1,10 +1,14 @@
|
|||||||
<ion-content>
|
<ion-header class="ion-no-border">
|
||||||
<ion-item lines="none">
|
<div class="header-content">
|
||||||
<ion-label class="title">Convocar Reunião</ion-label>
|
<div class="header-title">
|
||||||
</ion-item>
|
<label>Convocar Reunião</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
<div class="ion-item-container">
|
<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>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
@@ -13,7 +17,21 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -24,7 +42,7 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +53,7 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,11 +64,12 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class">
|
||||||
<ion-select value="Não se repete" interface="action-sheet" Cancel-text="Cancelar" required>
|
<ion-select [(ngModel)]="postData.IsRecurring" placeholder="Selecione repetição" value="false" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||||
<ion-select-option naoRepete="Reunião">Não se repete</ion-select-option>
|
<ion-select-option value="false">Não se repete</ion-select-option>
|
||||||
<ion-select-option semanal="Viagem">Semanal</ion-select-option>
|
<ion-select-option value="true">Repete</ion-select-option>
|
||||||
<ion-select-option diario="Viagem">Diário</ion-select-option>
|
<!-- <ion-select-option value="true">Semanal</ion-select-option>
|
||||||
<ion-select-option anual="Viagem">Anual</ion-select-option>
|
<ion-select-option value="true">Diário</ion-select-option>
|
||||||
|
<ion-select-option value="true">Anual</ion-select-option> -->
|
||||||
</ion-select>
|
</ion-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -104,7 +123,7 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class">
|
||||||
<ion-input placeholder="Detalhes"></ion-input>
|
<ion-input [(ngModel)]="postData.Body.Text" placeholder="Detalhes"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+15
-12
@@ -1,18 +1,21 @@
|
|||||||
ion-content{
|
.header-content{
|
||||||
--padding-top: 20px;
|
width: 360px;
|
||||||
--padding-start: 15px;
|
overflow: auto;
|
||||||
--padding-end: 20px;
|
margin: 25px auto;
|
||||||
}
|
}
|
||||||
.title{
|
.header-title{
|
||||||
|
width: 264px;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
font-weight: normal;
|
margin: 0 5px 0 5px;
|
||||||
font-stretch: normal;
|
padding: 0;
|
||||||
font-style: normal;
|
color:#000;
|
||||||
line-height: normal;
|
float: left;
|
||||||
letter-spacing: normal;
|
}
|
||||||
color: #000000;
|
ion-content{
|
||||||
margin: 8px 0 8px 0px;
|
--padding-top: 0px;
|
||||||
|
--padding-start: 15px;
|
||||||
|
--padding-end: 20px;
|
||||||
}
|
}
|
||||||
.container-div{
|
.container-div{
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
|||||||
+99
-5
@@ -3,6 +3,11 @@ import { Router } from '@angular/router';
|
|||||||
import { ModalController, NavParams } from '@ionic/angular';
|
import { ModalController, NavParams } from '@ionic/angular';
|
||||||
import { AddParticipantsCcModalPage } from '../add-participants-cc-modal/add-participants-cc-modal.page';
|
import { AddParticipantsCcModalPage } from '../add-participants-cc-modal/add-participants-cc-modal.page';
|
||||||
import { AddParticipantsModalPage } from '../add-participants-modal/add-participants-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({
|
@Component({
|
||||||
selector: 'app-book-meeting-modal',
|
selector: 'app-book-meeting-modal',
|
||||||
@@ -13,17 +18,35 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
task: any;
|
task: any;
|
||||||
taskParticipants: any;
|
taskParticipants: any;
|
||||||
taskParticipantsCc: any;
|
taskParticipantsCc: any;
|
||||||
|
taskDocId:string;
|
||||||
|
|
||||||
postEvent: Event;
|
postData: Event;
|
||||||
|
eventBody: EventBody;
|
||||||
|
eventAttendees: EventPerson[];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private router:Router,
|
private router:Router,
|
||||||
private navParams: NavParams,
|
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() {
|
ngOnInit() {
|
||||||
this.task = this.navParams.get('task');
|
console.log(this.task)
|
||||||
|
console.log(this.task.SerialNumber);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
@@ -34,6 +57,39 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
this.modalController.dismiss(null);
|
this.modalController.dismiss(null);
|
||||||
}
|
}
|
||||||
saveTask(){
|
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) => {
|
modal.onDidDismiss().then((res) => {
|
||||||
this.taskParticipants = res.data;
|
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(){
|
async addParticipantsCc(){
|
||||||
@@ -66,7 +141,26 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
|
|
||||||
modal.onDidDismiss().then((res) => {
|
modal.onDidDismiss().then((res) => {
|
||||||
this.taskParticipantsCc = res.data;
|
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-label class="title">{{modalTitle[taskType]}}</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<div class="ion-item-container">
|
<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>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -23,11 +23,11 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class">
|
||||||
<ion-select value="Normal" interface="action-sheet" Cancel-text="Cancelar" required>
|
<ion-select placeholder="Prazo" [(ngModel)]="postData.TypeDeadline" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||||
<ion-select-option Pessoal="Reunião">Normal</ion-select-option>
|
<ion-select-option value="99999861">Normal</ion-select-option>
|
||||||
<ion-select-option Oficial="Viagem">Urgente</ion-select-option>
|
<ion-select-option value="99999862">Urgente</ion-select-option>
|
||||||
<ion-select-option Oficial="Viagem">Muito Urgente</ion-select-option>
|
<ion-select-option value="99999863">Muito Urgente</ion-select-option>
|
||||||
<ion-select-option Oficial="Viagem">Urgentíssimo</ion-select-option>
|
<ion-select-option value="99999864">Urgentíssimo</ion-select-option>
|
||||||
</ion-select>
|
</ion-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+93
-102
@@ -4,11 +4,13 @@ import { ModalController, NavParams } from '@ionic/angular';
|
|||||||
import { Despacho } from 'src/app/models/despacho.model';
|
import { Despacho } from 'src/app/models/despacho.model';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { Participant } from 'src/app/models/participant.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 { AuthService } from 'src/app/services/auth.service';
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
import { StorageService } from 'src/app/services/storage.service';
|
import { StorageService } from 'src/app/services/storage.service';
|
||||||
import { AddParticipantsCcModalPage } from '../add-participants-cc-modal/add-participants-cc-modal.page';
|
import { AddParticipantsCcModalPage } from '../add-participants-cc-modal/add-participants-cc-modal.page';
|
||||||
import { AddParticipantsModalPage } from '../add-participants-modal/add-participants-modal.page';
|
import { AddParticipantsModalPage } from '../add-participants-modal/add-participants-modal.page';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-expedient-task-modal',
|
selector: 'app-expedient-task-modal',
|
||||||
@@ -22,15 +24,17 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
'Solicitar Parecer',
|
'Solicitar Parecer',
|
||||||
'Solicitar Deferimento'
|
'Solicitar Deferimento'
|
||||||
];
|
];
|
||||||
taskType:number;
|
taskType:string;
|
||||||
task: any;
|
task: any;
|
||||||
taskParticipants: any;
|
taskParticipants: any;
|
||||||
taskParticipantsCc: any;
|
taskParticipantsCc: any;
|
||||||
taskSubject: string;
|
|
||||||
taskDate: Date;
|
taskDate: Date;
|
||||||
taskDescription: string;
|
taskDescription: string;
|
||||||
|
user: string;
|
||||||
|
|
||||||
postData: Despacho;
|
postData: Despacho;
|
||||||
|
dispatchFolder: Folder;
|
||||||
|
participants: Participant[];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -39,127 +43,83 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
private authService: AuthService,
|
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.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() {
|
ngOnInit() {
|
||||||
this.taskType = this.navParams.get('taskAction');
|
|
||||||
this.task = this.navParams.get('task');
|
this.task = this.navParams.get('task');
|
||||||
console.log(this.task);
|
|
||||||
this.taskSubject = this.task.workflowInstanceFolio;
|
|
||||||
this.taskDate = new Date(this.task.taskStartDate);
|
this.taskDate = new Date(this.task.taskStartDate);
|
||||||
|
/* this.authService.userData$.subscribe((res:any)=>{
|
||||||
this.authService.userData$.subscribe((res:any)=>{
|
|
||||||
console.log(res);
|
console.log(res);
|
||||||
});
|
});
|
||||||
|
console.log(this.user); */
|
||||||
}
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||||
this.modalController.dismiss(null);
|
this.modalController.dismiss(null);
|
||||||
}
|
}
|
||||||
/* if(this.modalTitle[this.taskType]){
|
|
||||||
|
|
||||||
} */
|
|
||||||
cancelTask(){
|
cancelTask(){
|
||||||
this.modalController.dismiss(null);
|
this.modalController.dismiss(null);
|
||||||
}
|
}
|
||||||
saveTask(){
|
saveTask(){
|
||||||
switch (this.modalTitle[this.taskType])
|
console.log(this.taskType);
|
||||||
|
|
||||||
|
switch (this.taskType)
|
||||||
{
|
{
|
||||||
case "Efectuar Despacho":
|
case '0':
|
||||||
/* this.postData = {
|
this.postData = {
|
||||||
distributionType: "Paralelo",
|
DistributionType: "Paralelo",
|
||||||
deadline: new Date ('2020-11-13T12:55:39.5281471+01:00'),
|
CountryCode: 'AO',
|
||||||
userEmail: "gilson.manuel@gabinetedigital.local",
|
TypeDeadline: this.postData.TypeDeadline,
|
||||||
usersSelected: Participant;
|
UserEmail: this.user,
|
||||||
dispatchFolder: Folder;
|
UsersSelected: this.participants,
|
||||||
} */
|
DispatchFolder: this.dispatchFolder,
|
||||||
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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
this.processes.postDespatcho(body);
|
console.log(this.postData);
|
||||||
|
/* this.processes.postDespatcho(this.postData); */
|
||||||
break;
|
break;
|
||||||
case "Solicitar Parecer":
|
case '1':
|
||||||
console.log('Parecer');
|
this.postData = {
|
||||||
let bodyp = {
|
DistributionType: "Paralelo",
|
||||||
"distributionType": "Paralelo",
|
CountryCode: 'AO',
|
||||||
"deadline": "2020-11-13T12:55:39.5281471+01:00",
|
TypeDeadline: this.postData.TypeDeadline,
|
||||||
"userEmail": "gilson.manuel@gabinetedigital.local",
|
UserEmail: this.user,
|
||||||
"dispatchFolder": {
|
UsersSelected: this.participants,
|
||||||
"Nad": 30,
|
DispatchFolder: this.dispatchFolder,
|
||||||
"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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
this.processes.postParecer(bodyp);
|
/* this.processes.postParecer(this.postData); */
|
||||||
break;
|
break;
|
||||||
case "Solicitar Deferimento":
|
case '2':
|
||||||
console.log('Deferimento');
|
this.postData = {
|
||||||
let bodyd = {
|
DistributionType: "Paralelo",
|
||||||
"distributionType": "Paralelo",
|
CountryCode: 'AO',
|
||||||
"deadline": "2020-11-13T12:55:39.5281471+01:00",
|
TypeDeadline: this.postData.TypeDeadline,
|
||||||
"userEmail": "gilson.manuel@gabinetedigital.local",
|
UserEmail: this.user,
|
||||||
"dispatchFolder": {
|
UsersSelected: this.participants,
|
||||||
"Nad": 30,
|
DispatchFolder: this.dispatchFolder,
|
||||||
"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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
this.processes.postDeferimento(bodyd);
|
/* this.processes.postDeferimento(this.postData); */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||||
@@ -179,7 +139,23 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
|
|
||||||
modal.onDidDismiss().then((res) => {
|
modal.onDidDismiss().then((res) => {
|
||||||
this.taskParticipants = res.data;
|
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(){
|
async addParticipantsCc(){
|
||||||
@@ -195,8 +171,23 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
|
|
||||||
modal.onDidDismiss().then((res) => {
|
modal.onDidDismiss().then((res) => {
|
||||||
this.taskParticipantsCc = res.data;
|
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.LoadTaskDetail(this.serialnumber);
|
||||||
this.LoadRelatedEvents(this.serialnumber);
|
this.LoadRelatedEvents(this.serialnumber);
|
||||||
});
|
});
|
||||||
console.log(this.serialnumber);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -115,4 +115,18 @@ export class EventsService {
|
|||||||
|
|
||||||
return this.http.delete(`${puturl}`, options)
|
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);
|
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>
|
GetMDOficialTasks(): Observable<any>
|
||||||
{
|
{
|
||||||
@@ -125,6 +138,9 @@ export class ProcessesService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user