diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts
index c3a0ffca6..1609edf62 100644
--- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts
+++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts
@@ -209,15 +209,6 @@ export class ExpedientTaskModalPage implements OnInit {
Priority: new FormControl(this.postData.Priority, [
Validators.required,
]),
- // CalendarName: new FormControl(this.postEvent.CalendarName, [
- // Validators.required
- // ]),
- // Categories: new FormControl(this.postEvent.Categories, [
- // Validators.required
- // ]),
- // IsRecurring: new FormControl(this.postEvent.IsRecurring, [
- // Validators.required
- // ]),
participantes: new FormControl(this.taskParticipants, [
Validators.required
]),
@@ -298,195 +289,6 @@ export class ExpedientTaskModalPage implements OnInit {
this.dispatchFolder.SubjectTypes = this.selectedTypes;
const loader = this.toastService.loading()
- // switch (this.loggeduser.Profile) {
- // case 'MDGPR':
- // if(this.taskParticipants.length > 0) {
- // switch (this.taskType) {
- // case '0': // Despacho
- // this.postData = {
- // DistributionType: "Paralelo",
- // CountryCode: 'AO',
- // Priority: this.postData.Priority,
- // UserEmail: this.loggeduser.Email,
- // UsersSelected: attendees,
- // DispatchFolder: this.dispatchFolder,
- // AttachmentList: docs,
- // }
-
- // let action_despacho = {
- // "serialNumber": this.task.serialNumber,
- // "action": "Tratado",
- // "ActionTypeId": 94,
- // "dataFields": {
- // "Note": "",
- // }
- // }
-
-
-
- // try {
-
- // this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
- // await this.toastService._successMessage('Processo efetuado');
- // this.modalController.dismiss(action_despacho);
-
- // } catch (error) {
- // await this.toastService._badRequest('Processo não efetuado')
- // } finally {
- // loader.remove()
- // }
-
-
- // break;
-
- // case '1': // Parecer
- // this.postData = {
- // DistributionType: "Paralelo",
- // CountryCode: 'AO',
- // Priority: this.postData.Priority,
- // UserEmail: this.loggeduser.Email,
- // UsersSelected: attendees,
- // DispatchFolder: this.dispatchFolder,
- // AttachmentList: docs
- // }
-
- // let action_parecer = {
- // "serialNumber": this.task.serialNumber,
- // "action": "Tratado",
- // "ActionTypeId": 92,
- // "dataFields": {
- // "Note": "",
- // }
- // }
-
- // try {
- // this.taskResult = await this.processes.postParecer(this.postData).toPromise();
- // await this.toastService._successMessage('Pedido enviado');
- // this.modalController.dismiss(action_parecer);
-
- // } catch (error) {
- // await this.toastService._badRequest('Processo não efetuado')
- // } finally {
- // loader.remove()
- // }
- // break;
- // case '2': // Deferimento
- // this.postData = {
- // DistributionType: "Paralelo",
- // CountryCode: 'AO',
- // Priority: this.postData.Priority,
- // UserEmail: this.loggeduser.Email,
- // UsersSelected: attendees,
- // DispatchFolder: this.dispatchFolder,
- // AttachmentList: docs
- // }
- // //
- // let action_deferimento = {
- // "serialNumber": this.task.serialNumber,
- // "action": "Tratado",
- // "ActionTypeId": 93,
- // "dataFields": {
- // "Note": "",
- // }
- // }
-
- // try {
-
- // this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
- // this.toastService._successMessage('Processo efetuado');
- // this.modalController.dismiss(action_deferimento);
- // } catch (error) {
- // await this.toastService._badRequest('Processo não efetuado')
- // } finally {
- // loader.remove()
- // }
-
-
- // break;
- // }
- // }
- // else {
- // this.alertController.presentAlert("Lista de i-ntervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");
- // }
- // break;
- // case 'PR':
- // switch (this.taskType) {
- // case '0': // despacho
- // this.postData = {
- // DistributionType: "Paralelo",
- // CountryCode: 'AO',
- // Priority: this.postData.Priority,
- // UserEmail: this.loggeduser.Email,
- // UsersSelected: attendees,
- // DispatchFolder: this.dispatchFolder,
- // AttachmentList: docs,
- // }
-
-
- // let action_despacho_pr = {
- // "serialNumber": this.task.serialNumber,
- // "action": "Tratado",
- // "ActionTypeId": 99999881 ,
- // "dataFields": {
- // "Note": "",
- // }
- // }
-
- // if(this.postData.DispatchFolder.Message){
- // try {
- // this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
- // await this.toastService._successMessage('Processo efetuado');
- // this.modalController.dismiss(action_despacho_pr);
- // } catch (error) {
-
- // await this.toastService._badRequest('Processo não efetuado')
- // } finally {
- // //loader.remove()
- // }
- // }
- // else{
- // this.validateField = true;
- // this.toastService._badRequest('Por favor adicione uma descrição');
- // }
- // loader.remove();
- // break;
-
- // case '1': // parecer
- // this.postData = {
- // DistributionType: "Paralelo",
- // CountryCode: 'AO',
- // Priority: this.postData.Priority,
- // UserEmail: this.loggeduser.Email,
- // UsersSelected: attendees,
- // DispatchFolder: this.dispatchFolder,
- // AttachmentList: docs
- // }
-
- // let action_parecer_pr = {
- // "serialNumber": this.task.serialNumber,
- // "action": "Tratado",
- // "ActionTypeId": 99999881,
- // "dataFields": {
- // "Note": "",
- // }
- // }
-
- // try {
- // this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
- // await this.toastService._successMessage('Pedido enviado');
- // this.modalController.dismiss(action_parecer_pr);
- // } catch (error) {
-
- // await this.toastService._badRequest('Processo não efetuado')
- // } finally {
- // loader.remove()
- // }
-
- // break;
- // }
- // break;
- // }
-
if(this.loggeduser.Profile != 'PR') {
if(this.taskParticipants.length > 0) {
switch (this.taskType) {
@@ -506,12 +308,10 @@ export class ExpedientTaskModalPage implements OnInit {
"action": "Tratado",
"ActionTypeId": 94,
"dataFields": {
- "Note": "",
+ "Note": this.postData.DispatchFolder.Subject,
}
}
-
-
try {
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
@@ -543,7 +343,7 @@ export class ExpedientTaskModalPage implements OnInit {
"action": "Tratado",
"ActionTypeId": 92,
"dataFields": {
- "Note": "",
+ "Note": this.postData.DispatchFolder.Subject,
}
}
@@ -570,11 +370,11 @@ export class ExpedientTaskModalPage implements OnInit {
}
//
let action_deferimento = {
- "serialNumber": this.task.serialNumber,
- "action": "Tratado",
- "ActionTypeId": 93,
- "dataFields": {
- "Note": "",
+ "serialNumber": this.task.serialNumber,
+ "action": "Tratado",
+ "ActionTypeId": 93,
+ "dataFields": {
+ "Note": this.postData.DispatchFolder.Subject,
}
}
@@ -612,7 +412,7 @@ export class ExpedientTaskModalPage implements OnInit {
"action": "Tratado",
"ActionTypeId": 99999881 ,
"dataFields": {
- "Note": "",
+ "Note": this.postData.DispatchFolder.Subject,
}
}
@@ -651,7 +451,7 @@ export class ExpedientTaskModalPage implements OnInit {
"action": "Tratado",
"ActionTypeId": 99999881,
"dataFields": {
- "Note": "",
+ "Note": this.postData.DispatchFolder.Subject,
}
}
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts
index 5b37105c1..3c977a90f 100644
--- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts
+++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts
@@ -32,6 +32,7 @@ import { BackgroundService } from 'src/app/services/background.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { DataService } from 'src/app/services/data.service';
import { Storage } from '@ionic/storage';
+import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
@Component({
selector: 'app-gabinete-digital',
@@ -113,7 +114,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
//
// pipe
-
+ expedienteTaskPipe = new ExpedienteTaskPipe();
+
loadCount = false
customTaskPipe = new CustomTaskPipe()
@@ -161,12 +163,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
}
ngDoCheck(): void {
- /* if( window.innerWidth < 701) {
- this.segmentVista = "listview";
- }
- else{
- this.segmentVista = "boxview";
- } */
+
}
closeAllDesktopComponent() {
@@ -344,13 +341,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
const totalHours = Math.floor(totalMinutes / 60);
const totalDays = Math.floor(totalHours / 24);
- //const hours = totalHours - (totalDays * 24);
- //const minutes = totalMinutes - (totalDays * 24 * 60) - (hours * 60);
- // const seconds = totalSeconds - (totalDays * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60);
-
- // let diffDays = totalDays;
- // let diffMinutes = minutes;
-
if (totalDays == 0) {
if (allday) {
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " (todo dia)";
@@ -358,7 +348,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
return customDate;
}
else {
- //customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+" ("+minutes+" mins)";
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " | " + this.getCustomHours(end);
return customDate;
}
@@ -562,7 +551,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
let allProcessesList = allPreocesses_;
- console.log(allProcessesList)
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Conhecimento')
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Revisar Diploma')
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Gerar Diploma')
@@ -615,10 +603,16 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
this.allProcessesList = removeDuplicate(this.allProcessesList);
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate')
- let expedientes = await this.processesbackend.GetTaskListExpediente(false).toPromise();
+ let expedientes: any = await this.processesbackend.GetTaskListExpediente(false).toPromise();
expedientes = expedientes.filter(data => data.workflowInstanceDataFields.Status == "Active")
+
+ expedientes = expedientes.filter((item) => {
+ return item.activityInstanceName != 'Retificar Expediente'
+ });
+
+ expedientes = expedientes.map((element) => this.expedienteTaskPipe.transform(element));
- this.expedientegbstore.count = expedientes.length
+ this.expedientegbstore.count = expedientes.length;
this.expedientegbstore.reset(expedientes);
diff --git a/src/app/shared/agenda/approve-event/approve-event.page.html b/src/app/shared/agenda/approve-event/approve-event.page.html
index 792d1d6a0..e3f5efea6 100644
--- a/src/app/shared/agenda/approve-event/approve-event.page.html
+++ b/src/app/shared/agenda/approve-event/approve-event.page.html
@@ -1,20 +1,5 @@
-
-
-
-