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