mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
integrate expediente-pr
This commit is contained in:
+19
-11
@@ -115,16 +115,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.taskDate = new Date(this.task.taskStartDate);
|
||||
|
||||
if(!this.task.hasOwnProperty('isEvent')) {
|
||||
// if not
|
||||
this.getAttachments();
|
||||
}
|
||||
|
||||
this.getSubjectType();
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
@@ -132,15 +127,15 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
getSubjectType() {
|
||||
getSubjectType(){
|
||||
this.processes.GetSubjectType().subscribe(res=>{
|
||||
console.log(res);
|
||||
this.subjectTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
cancelTask() {
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
}
|
||||
|
||||
async saveTask(){
|
||||
@@ -157,9 +152,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
else if(this.postData.Priority=='99999864'){
|
||||
this.dispatchFolder.DeadlineType = 'Urgentíssimo';
|
||||
}
|
||||
|
||||
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
attendees = attendees.map(function(val) {
|
||||
return {
|
||||
UserEmail: val.EmailAddress,
|
||||
@@ -205,7 +198,14 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
// console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise()
|
||||
switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
|
||||
break;
|
||||
case 'PR':
|
||||
this.taskResult = await this.processes.postDespatchoPr(this.postData).toPromise();
|
||||
break;
|
||||
}
|
||||
await this.successMessage('Processo efetuado')
|
||||
} catch (error) {
|
||||
await this.badRequest('Processo não efetuado')
|
||||
@@ -239,7 +239,15 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
//console.log(this.postData);
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise()
|
||||
switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
||||
break;
|
||||
case 'PR':
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
break;
|
||||
}
|
||||
|
||||
await this.successMessage('Processo efetuado')
|
||||
} catch (error) {
|
||||
await this.badRequest('Processo não efetuado')
|
||||
|
||||
Reference in New Issue
Block a user