This commit is contained in:
tiago.kayaya
2021-04-28 11:12:17 +01:00
8 changed files with 172 additions and 48 deletions
@@ -80,6 +80,7 @@ export class ExpedientTaskModalPage implements OnInit {
DeadlineType: '',
};
this.postData.DispatchFolder = this.dispatchFolder;
this.postData.UsersSelected = this.participants;
/* By Default TypeDeadline should be 'Normal' */
@@ -96,10 +97,16 @@ export class ExpedientTaskModalPage implements OnInit {
}
ngOnInit() {
this.taskDate = new Date(this.task.taskStartDate);
this.getAttachments();
if(!this.task.hasOwnProperty('isEvent')) {
// if not
this.getAttachments();
}
this.getSubjectType();
}
close(){
@@ -107,13 +114,13 @@ export class ExpedientTaskModalPage implements OnInit {
this.modalController.dismiss(null);
}
getSubjectType(){
getSubjectType() {
this.processes.GetSubjectType().subscribe(res=>{
console.log(res);
this.subjectTypes = res;
});
}
cancelTask(){
cancelTask() {
this.modalController.dismiss(null);
}
@@ -140,8 +147,8 @@ export class ExpedientTaskModalPage implements OnInit {
};
})
if(this.taskParticipants.length > 0){
switch (this.taskType){
if(this.taskParticipants.length > 0) {
switch (this.taskType) {
case '0':
this.postData = {
DistributionType: "Paralelo",
@@ -152,7 +159,7 @@ export class ExpedientTaskModalPage implements OnInit {
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
console.log(this.postData);
console.log('this.postData', this.postData, this.taskType);
this.processes.postDespatcho(this.postData);
break;
case '1':
@@ -182,23 +189,26 @@ export class ExpedientTaskModalPage implements OnInit {
this.processes.postDeferimento(this.postData);
break;
}
this.modalController.dismiss('openDiscart');
/* this.distartExpedientModal();
this.close(); */
}
else{
else {
this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");
}
}
getAttachments(){
getAttachments() {
this.attachmentsService.getAttachmentsBySerial(this.task.serialNumber).subscribe(res=>{
this.loadedAttachments = res;
console.log(res);
});
}
async addParticipants(){
async addParticipants() {
/* console.log('HERES'); */
@@ -241,7 +251,7 @@ export class ExpedientTaskModalPage implements OnInit {
}
}
async addParticipantsCc(){
async addParticipantsCc() {
this.adding = "CC";
this.contacts = this.taskParticipantsCc;
@@ -282,7 +292,7 @@ export class ExpedientTaskModalPage implements OnInit {
}
async distartExpedientModal(){
async distartExpedientModal() {
const modal = await this.modalController.create({
component: DiscartExpedientModalPage,
componentProps: {
@@ -304,7 +314,7 @@ export class ExpedientTaskModalPage implements OnInit {
});
}
async setContact(data:EventPerson[]){
async setContact(data:EventPerson[]) {
if(this.adding == "intervenient"){
this.taskParticipants = data;
@@ -315,15 +325,15 @@ export class ExpedientTaskModalPage implements OnInit {
}
async setIntervenient(data){
async setIntervenient(data) {
this.taskParticipants = data;
}
async setIntervenientCC(data){
async setIntervenientCC(data) {
this.taskParticipantsCc = data;
}
async closeComponent(){
async closeComponent() {
this.showAttendees = false;
}
@@ -14,6 +14,7 @@ import { BookMeetingModalPage } from '../book-meeting-modal/book-meeting-modal.p
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 { ProcessTask } from 'src/app/models/task';
@Component({
selector: 'app-expediente-detail',
@@ -91,6 +92,9 @@ export class ExpedienteDetailPage implements OnInit {
"FsId": res.workflowInstanceDataFields.FsId,
"DocId": res.workflowInstanceDataFields.DocId,
}
console.log('task', this.fulltask);
this.fulltask = res;
console.log('GetTask', res);
@@ -339,9 +339,42 @@ ion-content{
.active {
color: white !important;
fill: white !important;
background: #42b9fe !important;
box-sizing: border-box;
.exp-card-title {
color: white !important;
color: rgb(255, 255, 255) !important;
}
}
svg path::part(native) {
color: white !important;
fill: white !important;
}
svg path::part(button):hover {
color: white !important;
fill: rgb(255, 255, 255) !important;
}
svg{
path{
fill: rgb(255, 255, 255) !important
}
}
}
.active ion-icon::part(button) {
color: white !important;
fill: rgb(255, 255, 255) !important;
}
.active ion-icon::part(native) {
color: white !important;
fill: rgb(255, 255, 255) !important;
}
.active ion-icon{
color: white !important;
fill: red !important;
}