mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
+1
-32
@@ -45,7 +45,6 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
|
||||
constructor(
|
||||
private activateRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
private attachments: AttachmentsService,
|
||||
@@ -59,35 +58,17 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private animationController: AnimationController,
|
||||
) {
|
||||
|
||||
this.activateRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = "mdgpr";
|
||||
|
||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
||||
if (!paramMap["params"].SerialNumber) {
|
||||
console.log('HERE');
|
||||
|
||||
return;
|
||||
}
|
||||
console.log(paramMap);
|
||||
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
});
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
}
|
||||
@@ -115,7 +96,6 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log('HERE');
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
switch (params["params"].caller) {
|
||||
case 'events':
|
||||
@@ -155,8 +135,6 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
async LoadTaskDetail(serial: string) {
|
||||
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
/* console.log(res); */
|
||||
|
||||
this.task = {
|
||||
"SerialNumber": res.serialNumber,
|
||||
"Folio": res.workflowInstanceDataFields.Subject,
|
||||
@@ -171,11 +149,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
"WorkflowName": res.workflowDisplayName,
|
||||
"Status": res.workflowInstanceDataFields.Status,
|
||||
}
|
||||
|
||||
//console.log('task', this.task);
|
||||
|
||||
this.fulltask = res;
|
||||
//console.log('GetTask', res);
|
||||
|
||||
let thedate = new Date(this.task.CreateDate);
|
||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
@@ -188,8 +162,6 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.cc = users.filter(user=>{
|
||||
return user.Type == 'CC';
|
||||
});
|
||||
console.log(users);
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
@@ -201,14 +173,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
async LoadRelatedEvents(serial: string) {
|
||||
if (this.eventsList == null) {
|
||||
this.attachments.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
console.log(res);
|
||||
res.forEach(att => {
|
||||
if (this.eventsList == null) {
|
||||
this.eventsList = new Array();
|
||||
}
|
||||
this.events.getEvent(att.ParentId).subscribe(event => {
|
||||
this.eventsList.push(event);
|
||||
console.log(this.eventsList);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -217,7 +187,6 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
viewDocument(){
|
||||
this.processes.GetDocumentUrl(this.task.DocId, this.task.FsId).subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
Reference in New Issue
Block a user