diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts
index 2aed50f40..c48f8c170 100644
--- a/src/app/modals/create-process/create-process.page.ts
+++ b/src/app/modals/create-process/create-process.page.ts
@@ -54,7 +54,6 @@ export class CreateProcessPage implements OnInit {
taskDate: Date;
taskDescription: string;
- user: string;
loadedAttachments:any;
subjectTypes:any;
selectedTypes: string[]=[];
@@ -91,7 +90,6 @@ export class CreateProcessPage implements OnInit {
private toastService: ToastService,
) {
this.loggeduser = userAuth.ValidatedUser;
- this.user = environment.defaultuser +'@'+ environment.domain;
this.task = this.navParams.get('task');
console.log('task', this.task)
@@ -180,6 +178,8 @@ export class CreateProcessPage implements OnInit {
}
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
+ console.log(attendees);
+
attendees = attendees.map(function(val) {
return {
UserEmail: val.EmailAddress,
@@ -187,6 +187,8 @@ export class CreateProcessPage implements OnInit {
};
});
+ console.log(attendees);
+
const DocumentToSave = this.documents.map((e) => {
return {
ApplicationId: e.ApplicationType,
@@ -204,14 +206,14 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
console.log('this.postData', this.postData, this.taskType);
try {
- await this.processes.postDespatcho(this.postData).toPromise();
+ //await this.processes.postDespatcho(this.postData).toPromise();
this.FinalizarDespacho('Despacho criado');
} catch (error) {
this.toastService.badRequest('Processo não efectuado');
@@ -223,14 +225,14 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
console.log(this.postData);
try {
- await this.processes.postParecer(this.postData).toPromise();
+ //await this.processes.postParecer(this.postData).toPromise();
this.FinalizarParecer('Pedido de Parecer enviado');
}
catch (error) {
@@ -243,7 +245,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -273,7 +275,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -292,7 +294,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -313,7 +315,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
diff --git a/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts b/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts
index 82c65d7d6..e43640af9 100644
--- a/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts
+++ b/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts
@@ -30,6 +30,7 @@ constructor(
private activatedRoute: ActivatedRoute,
) {
this.activatedRoute.queryParams.subscribe(params => {
+ console.log('Cria');
if(params['segment'] == 'validar') {
this.segment = 'validar';
@@ -42,12 +43,15 @@ constructor(
}
ngOnInit() {
- this.LoadList();
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == this.router.url) {
+ console.log('Atualiza');
+
this.LoadList();
}
});
+ console.log('Init');
+ this.LoadList();
}
segmentChanged(ev: any) {
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 04b74559d..aaa148321 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
@@ -60,7 +60,6 @@ export class ExpedientTaskModalPage implements OnInit {
taskDate: Date;
taskDescription: string;
- user: string;
loadedAttachments:any;
documents:SearchDocument[] = [];
@@ -105,7 +104,6 @@ export class ExpedientTaskModalPage implements OnInit {
) {
this.loggeduser = userAuth.ValidatedUser;
- this.user = environment.defaultuser +'@'+ environment.domain;
this.task = this.navParams.get('task');
console.log('task', this.task)
@@ -230,7 +228,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs,
@@ -261,7 +259,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -289,7 +287,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -325,7 +323,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs,
@@ -356,7 +354,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
- UserEmail: this.user,
+ UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html
index 93612b97b..34a7e03a5 100644
--- a/src/app/pages/gabinete-digital/gabinete-digital.page.html
+++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html
@@ -150,15 +150,14 @@