diff --git a/src/frontend/app/printedFolder/printed-folder-modal.component.html b/src/frontend/app/printedFolder/printed-folder-modal.component.html index d027261950d8f7dd387bb63ae302477c41ed9136..c56dcd97d4ac12451b9ba7da52f948091e6a5903 100644 --- a/src/frontend/app/printedFolder/printed-folder-modal.component.html +++ b/src/frontend/app/printedFolder/printed-folder-modal.component.html @@ -66,6 +66,12 @@ {{element.type}} </div> + <div *ngIf="!functions.empty(element.status)"> + <div *ngIf="element.status === 'SIGN'" style="color: green"> + {{lang['attachment_' + element.status]}} + </div> + </div> + <div color="primary" [title]="element.creationDate | fullDate" style="flex:1;justify-content: flex-end;display: flex;font-size: 80%;"> {{element.creationDate | timeAgo : 'full' | ucfirst}} @@ -84,4 +90,4 @@ <div mat-dialog-actions class="actions"> <button mat-raised-button color="primary" [disabled]="isLoadingResults || isEmptySelection()" (click)="onSubmit()">{{lang.validate}}</button> -</div> \ No newline at end of file +</div> diff --git a/src/frontend/app/printedFolder/printed-folder-modal.component.scss b/src/frontend/app/printedFolder/printed-folder-modal.component.scss index 8635fc8cd78082dbe9ddc73f2b77b801f29d74f3..43612314734aa3c06bcdea7464fba7c2507e30d1 100644 --- a/src/frontend/app/printedFolder/printed-folder-modal.component.scss +++ b/src/frontend/app/printedFolder/printed-folder-modal.component.scss @@ -55,7 +55,7 @@ } .attachments { - grid-template-columns: 1fr 2fr 1fr 1fr; + grid-template-columns: 1fr 2fr 1fr 1fr 1fr; } .printedFolderContainer { @@ -71,4 +71,4 @@ .disabled { opacity: 0.5; cursor: not-allowed; -} \ No newline at end of file +} diff --git a/src/frontend/app/printedFolder/printed-folder-modal.component.ts b/src/frontend/app/printedFolder/printed-folder-modal.component.ts index 9cf31f7805f0f3abbee75d0efa46bd9bc5c6a5ec..bdbc57a52b16100d0ecde192f5652ba5db02a921 100644 --- a/src/frontend/app/printedFolder/printed-folder-modal.component.ts +++ b/src/frontend/app/printedFolder/printed-folder-modal.component.ts @@ -35,7 +35,7 @@ export class PrintedFolderModalComponent { notes: [], emails: [], acknowledgementReceipts: [] - } + }; selectedPrintedFolderElement: any = {}; @@ -64,7 +64,7 @@ export class PrintedFolderModalComponent { } getMainDocInfo() { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { this.http.get(`../../rest/resources/${this.data.resId}/fileInformation`).pipe( map((data: any) => { data = { @@ -87,7 +87,7 @@ export class PrintedFolderModalComponent { } getAttachments() { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { this.http.get("../../rest/resources/" + this.data.resId + "/attachments").pipe( map((data: any) => { data.attachments = data.attachments.map((attachment: any) => { @@ -97,7 +97,8 @@ export class PrintedFolderModalComponent { chrono: !this.functions.empty(attachment.chrono) ? attachment.chrono : this.lang.undefined, type: attachment.typeLabel, creationDate: attachment.creationDate, - canConvert : attachment.canConvert + canConvert : attachment.canConvert, + status: attachment.status } }); return data.attachments; @@ -117,7 +118,7 @@ export class PrintedFolderModalComponent { } getEmails() { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { this.http.get(`../../rest/resources/${this.data.resId}/emails?type=email`).pipe( map((data: any) => { data.emails = data.emails.map((item: any) => { @@ -128,7 +129,7 @@ export class PrintedFolderModalComponent { label: !this.functions.empty(item.object) ? item.object : `<i>${this.lang.emptySubject}<i>`, canConvert : true } - }) + }); return data.emails; }), tap((data: any) => { @@ -146,7 +147,7 @@ export class PrintedFolderModalComponent { } getNotes() { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { this.http.get(`../../rest/resources/${this.data.resId}/notes`).pipe( map((data: any) => { data.notes = data.notes.map((item: any) => { @@ -157,7 +158,7 @@ export class PrintedFolderModalComponent { label: item.value, canConvert : true } - }) + }); return data.notes; }), tap((data: any) => { @@ -175,7 +176,7 @@ export class PrintedFolderModalComponent { } getAcknowledgementReceips() { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { this.http.get(`../../rest/resources/${this.data.resId}/acknowledgementReceipts?type=ar`).pipe( map((data: any) => { data = data.map((item: any) => { @@ -200,7 +201,7 @@ export class PrintedFolderModalComponent { label: item.format === 'html' ? this.lang.ARelectronic : this.lang.ARPaper, canConvert : true } - }) + }); return data; }), tap((data: any) => { @@ -267,7 +268,7 @@ export class PrintedFolderModalComponent { withSeparator : this.withSeparator, summarySheet : this.summarySheet, resources : [] - } + }; let resource = { resId : this.data.resId, document : this.mainDocument,