mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
save
This commit is contained in:
+29
-29
@@ -56,7 +56,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
taskDate: Date;
|
||||
taskDescription: string;
|
||||
|
||||
|
||||
loadedAttachments:any;
|
||||
documents:SearchDocument[] = [];
|
||||
|
||||
@@ -104,7 +104,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
this.task = this.navParams.get('task');
|
||||
|
||||
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
|
||||
this.selectedTypes = ['99999850'];
|
||||
@@ -123,7 +123,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
|
||||
|
||||
};
|
||||
|
||||
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
@@ -139,7 +139,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.postData);
|
||||
|
||||
|
||||
this.taskDate = new Date(this.task.taskStartDate);
|
||||
if(!this.task.hasOwnProperty('isEvent')) {
|
||||
this.getAttachments();
|
||||
@@ -162,7 +162,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
|
||||
getSubjectType() {
|
||||
this.processes.GetSubjectType().subscribe(res=>{
|
||||
console.log(res);
|
||||
@@ -197,7 +197,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
// CalendarName: new FormControl(this.postEvent.CalendarName, [
|
||||
// Validators.required
|
||||
// ]),
|
||||
// Categories: new FormControl(this.postEvent.Categories[0], [
|
||||
// Categories: new FormControl(this.postEvent.Categories, [
|
||||
// Validators.required
|
||||
// ]),
|
||||
// IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||
@@ -209,7 +209,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
})
|
||||
}
|
||||
//
|
||||
//
|
||||
async saveTask(){
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
@@ -239,7 +239,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
UserType: val.IsRequired?"I": "CC"
|
||||
};
|
||||
})
|
||||
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: []
|
||||
@@ -271,7 +271,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs,
|
||||
}
|
||||
|
||||
|
||||
console.log(this.postData);
|
||||
|
||||
try {
|
||||
@@ -279,7 +279,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss();
|
||||
|
||||
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
@@ -288,7 +288,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
break;
|
||||
|
||||
|
||||
case '1':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
@@ -299,7 +299,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs
|
||||
}
|
||||
|
||||
|
||||
let action_parecer = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Tratado",
|
||||
@@ -313,7 +313,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
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 {
|
||||
@@ -324,7 +324,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
@@ -372,7 +372,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
AttachmentList: docs,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
|
||||
let action_despacho_pr = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Tratado",
|
||||
@@ -394,7 +394,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
break;
|
||||
|
||||
|
||||
case '1':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
@@ -405,7 +405,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs
|
||||
}
|
||||
|
||||
|
||||
let action_parecer_pr = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Tratado",
|
||||
@@ -453,11 +453,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
cssClass: 'attendee modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
|
||||
|
||||
if(data){
|
||||
data = data['data'];
|
||||
|
||||
@@ -472,11 +472,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.showAttendees = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async setIntervenient(data) {
|
||||
this.taskParticipants = data;
|
||||
}
|
||||
|
||||
|
||||
async setIntervenientCC(data) {
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
@@ -485,7 +485,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.adding = 'intervenient'
|
||||
this.openAttendees();
|
||||
}
|
||||
|
||||
|
||||
async addParticipantsCc() {
|
||||
this.adding = "CC";
|
||||
this.openAttendees();
|
||||
@@ -507,14 +507,14 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
console.log('Expedient Discard closed');
|
||||
this.modalController.dismiss(res['data'])
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -523,13 +523,13 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
if(this.adding == "intervenient"){
|
||||
this.taskParticipants = data;
|
||||
} else if (this.adding == "CC") {
|
||||
|
||||
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async closeComponent() {
|
||||
this.showAttendees = false;
|
||||
@@ -586,4 +586,4 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user