-
- {{ attachment.DocDate | date: 'dd/MM/yy' }}
+
+
-
-
@@ -41,7 +44,6 @@
Assinar
-
diff --git a/src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.scss b/src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.scss
index bd74b43cf..f267b61a8 100644
--- a/src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.scss
+++ b/src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.scss
@@ -1,7 +1,16 @@
+@import '~src/function.scss';
-
+.subject {
+ font-size: rem(18);
+ width: 100%;
+ color:#0d89d1;
+ padding-bottom: 5px;
+}
+ /* SPAN */
+ .user{
+ font-size: rem(15);
+ }
.card-text {
- max-width: 350px;
border: 1px solid #3498db;
color: #3498db;
background: white;
@@ -14,7 +23,9 @@
margin: 0px;
}
-
+ .subject {
+ max-width: 230px;
+ }
}
iframe {
@@ -29,6 +40,10 @@ iframe {
.user, .date {
color: #3498db !important;
}
+
+ .subject {
+ max-width: unset !important;
+ }
}
.document-type{
diff --git a/src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.ts b/src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.ts
index eab778d51..af0560682 100644
--- a/src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.ts
+++ b/src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.ts
@@ -66,45 +66,50 @@ export class ViewerAttachmentPage implements OnInit {
}
try {
- setTimeout(async ()=> {
- this.selectedIndex = i;
- const linkRequest = await this.middlewareRepositoryService.getViewerLink({
- ApplicationId: viewerAttachment.ApplicationId,
- DocId: viewerAttachment.DocId
- })
+ this.selectedIndex = i;
- // alert(`ApplicationId:${viewerAttachment.ApplicationId}, DocId: ${viewerAttachment.DocId}`)
+ this.iframeContainer.nativeElement.style.display = 'none'
- if(linkRequest.isOk()) {
+ const requestI = this.selectedIndex
- // Optionally, you can add new content or recreate the iframe
- var newIframe = document.createElement('iframe');
- if(linkRequest.value.includes("http")) {
- newIframe.src = linkRequest.value;
+ const linkRequest = await this.middlewareRepositoryService.getViewerLink({
+ ApplicationId: viewerAttachment.ApplicationId,
+ DocId: viewerAttachment.DocId
+ })
- newIframe.width = '100%'
- newIframe.height = '100%'
- this.iframeContainer.nativeElement.innerHTML = ""
+ if(linkRequest.isOk() && requestI == this.selectedIndex) {
- setTimeout
- this.iframeContainer.nativeElement.appendChild(newIframe)
+ // Optionally, you can add new content or recreate the iframe
+ var newIframe = document.createElement('iframe');
+ if(linkRequest.value.includes("http")) {
+ newIframe.src = linkRequest.value;
- } else {
- this.iframeContainer.nativeElement.innerHTML = "Sem documento"
- }
+ newIframe.width = '100%'
+ newIframe.height = '100%'
+ this.iframeContainer.nativeElement.innerHTML = ""
+
+ this.iframeContainer.nativeElement.appendChild(newIframe)
- this.loading = false
- this.iframeContainer.nativeElement.style.display = 'flex'
} else {
-
- this.loading = false
- this.iframeContainer.nativeElement.style.display = 'none'
+ this.iframeContainer.nativeElement.innerHTML = "Sem documento"
}
- }, 1000)
+ this.loading = false
+ this.iframeContainer.nativeElement.style.display = 'flex'
+ } else if (requestI != this.selectedIndex) {
+
+ } else {
+
+ this.loading = false
+ this.iframeContainer.nativeElement.style.display = 'none'
+ }
+
} catch (error) {
- this.clickDocument(viewerAttachment, i);
+ setTimeout(async ()=> {
+ this.clickDocument(viewerAttachment, i);
+ }, 1000)
+
}