mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user