mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Fix get files
This commit is contained in:
@@ -77,10 +77,10 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
/* this.serialnumber = paramMap.get('SerialNumber'); */
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
// this.LoadRelatedEvents(this.serialnumber);
|
||||
});
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
// this.LoadRelatedEvents(this.serialnumber);
|
||||
}
|
||||
|
||||
close(){
|
||||
@@ -156,22 +156,22 @@ export class DespachoPrPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial: string) {
|
||||
if (this.eventsList == null) {
|
||||
this.attachmentsService.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);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
// async LoadRelatedEvents(serial: string) {
|
||||
// if (this.eventsList == null) {
|
||||
// this.attachmentsService.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);
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
viewDocument(docId:string){
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
|
||||
@@ -56,15 +56,12 @@
|
||||
<div class="bottom-content width-100">
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item *ngFor="let attachment of attachments"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer">
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)">
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
|
||||
<ion-label class="d-block" (click)="viewDocument(Document.DocId)">
|
||||
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -71,10 +71,10 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
/* this.serialnumber = paramMap.get('SerialNumber'); */
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
// this.LoadRelatedEvents(this.serialnumber);
|
||||
});
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
// this.LoadRelatedEvents(this.serialnumber);
|
||||
}
|
||||
|
||||
close() {
|
||||
@@ -167,20 +167,20 @@ export class DespachoPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial: string) {
|
||||
if (this.eventsList == null) {
|
||||
this.attachmentsService.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
res.forEach(att => {
|
||||
if (this.eventsList == null) {
|
||||
this.eventsList = new Array();
|
||||
}
|
||||
this.events.getEvent(att.ParentId).subscribe(event => {
|
||||
this.eventsList.push(event);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
// async LoadRelatedEvents(serial: string) {
|
||||
// if (this.eventsList == null) {
|
||||
// this.attachmentsService.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
// res.forEach(att => {
|
||||
// if (this.eventsList == null) {
|
||||
// this.eventsList = new Array();
|
||||
// }
|
||||
// this.events.getEvent(att.ParentId).subscribe(event => {
|
||||
// this.eventsList.push(event);
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
viewDocument(docId:string){
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
|
||||
+9
-7
@@ -60,13 +60,15 @@
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item *ngFor="let attachment of attachments"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer">
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)">
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
</ion-label>
|
||||
class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
>
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)"
|
||||
>
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
@@ -60,13 +60,14 @@
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item *ngFor="let attachment of attachments"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer">
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)">
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
</ion-label>
|
||||
class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
>
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)">
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
+2
-13
@@ -74,7 +74,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
this.LoadRelatedEvents(this.serialNumber);
|
||||
|
||||
}
|
||||
|
||||
close() {
|
||||
@@ -294,18 +294,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial: string) {
|
||||
if (this.eventsList == null) {
|
||||
this.attachments.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
res.forEach(att => {
|
||||
if (this.eventsList == null) {
|
||||
this.eventsList = new Array();
|
||||
}
|
||||
this.events.getEvent(att.ParentId).subscribe(event => {
|
||||
this.eventsList.push(event);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
viewDocument(DocId:string) {
|
||||
|
||||
@@ -56,15 +56,9 @@ export class ExpedientePage implements OnInit {
|
||||
this.skeletonLoader = true
|
||||
|
||||
try {
|
||||
const expedientePr: object[] = await this.processes.GetTasksList("Expediente", false).toPromise()
|
||||
const expedienteMD: object[] = await this.processes.GetTasksList("Expediente", false).toPromise()
|
||||
const expediente: object[] = await this.processes.GetTasksList("Expediente", false).toPromise()
|
||||
|
||||
const result = expedientePr.concat(expedienteMD)
|
||||
|
||||
console.log('result', result);
|
||||
console.log('expedientePr', expedientePr)
|
||||
console.log('expedienteMD', expedienteMD)
|
||||
|
||||
const result = expediente
|
||||
|
||||
this.taskslist = new Array();
|
||||
let res = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
||||
@@ -87,9 +81,11 @@ export class ExpedientePage implements OnInit {
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
|
||||
console.log(this.taskslist);
|
||||
this.expedienteStorage.reset(this.taskslist);
|
||||
this.skeletonLoader = false;
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.goBack()
|
||||
|
||||
@@ -60,13 +60,15 @@
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item *ngFor="let attachment of attachments"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer">
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)">
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
</ion-label>
|
||||
class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
>
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)"
|
||||
>
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
@@ -184,7 +184,7 @@ export class PedidoPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
viewDocument(docId:string){
|
||||
viewDocument(docId:string) {
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
|
||||
Reference in New Issue
Block a user