Skip to content
Snippets Groups Projects
Commit b3191bc9 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #12033 TIME 0:20 fix css ar type

parent cb3c50e2
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,11 @@ ...@@ -15,9 +15,11 @@
{{lang.sendError}} {{lang.sendError}}
</div> </div>
</ng-template> </ng-template>
<div class="info">
<div class="info" [class.arType]="mail.type === 'aknowledgement_receipt'">
{{mail.object}} {{mail.object}}
</div> </div>
<div class="date"> <div class="date">
{{mail.userInfo}} {{mail.userInfo}}
</div> </div>
......
...@@ -51,4 +51,9 @@ ...@@ -51,4 +51,9 @@
padding: 5px; padding: 5px;
font-style: italic; font-style: italic;
color: $warn color: $warn
}
.arType {
color: #666;
font-style: italic;
} }
\ No newline at end of file
import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core'; import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { LANG } from '../../translate.component'; import { LANG } from '../../translate.component';
import { catchError, tap, finalize } from 'rxjs/operators'; import { catchError, tap, finalize, map } from 'rxjs/operators';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { NotificationService } from '../../notification.service'; import { NotificationService } from '../../notification.service';
...@@ -39,6 +39,28 @@ export class MailResumeComponent implements OnInit { ...@@ -39,6 +39,28 @@ export class MailResumeComponent implements OnInit {
loadMails(resId: number) { loadMails(resId: number) {
this.loading = true; this.loading = true;
this.http.get(`../../rest/externalSummary/${resId}?limit=3`).pipe( this.http.get(`../../rest/externalSummary/${resId}?limit=3`).pipe(
map((data: any) => {
data.elementsSend = data.elementsSend.map((elem: any) => {
let object = elem.object;
let type = elem.type;
if (elem.object === '') {
object = this.lang.ARPaper;
type = 'aknowledgement_receipt';
} else if (elem.object.startsWith("[AR]")) {
object = this.lang.ARelectronic;
type = 'aknowledgement_receipt';
}
return {
object: object,
send_date: elem.send_date,
status: elem.status,
userInfo: elem.userInfo,
type: type
}
});
return data;
}),
tap((data: any) => { tap((data: any) => {
this.mails = data.elementsSend; this.mails = data.elementsSend;
}), }),
......
...@@ -1255,4 +1255,6 @@ export const LANG_EN = { ...@@ -1255,4 +1255,6 @@ export const LANG_EN = {
"newsFeed" : "News feed", "newsFeed" : "News feed",
"sendError" : "Send error", "sendError" : "Send error",
"historyDisabled" : "History disabled", "historyDisabled" : "History disabled",
"ARPaper" : "Paper acknowledgement of receipt",
"ARelectronic" : "Electronic acknowledgement of receipt",
}; };
...@@ -1291,5 +1291,7 @@ export const LANG_FR = { ...@@ -1291,5 +1291,7 @@ export const LANG_FR = {
"mailsSentAlt" : "Éléments envoyés", "mailsSentAlt" : "Éléments envoyés",
"newsFeed" : "Fil d'actualité", "newsFeed" : "Fil d'actualité",
"sendError" : "Erreur d'envoi", "sendError" : "Erreur d'envoi",
"historyDisabled" : "Historique désactivé", "historyDisabled" : "Historique désactivé",
"ARPaper" : "Accusé de réception papier",
"ARelectronic" : "Accusé de réception électronique",
}; };
...@@ -1280,4 +1280,6 @@ export const LANG_NL = { ...@@ -1280,4 +1280,6 @@ export const LANG_NL = {
"newsFeed" : "News feed", //_TO_TRANSLATE "newsFeed" : "News feed", //_TO_TRANSLATE
"sendError" : "Send error", //_TO_TRANSLATE "sendError" : "Send error", //_TO_TRANSLATE
"historyDisabled" : "History disabled", //_TO_TRANSLATE "historyDisabled" : "History disabled", //_TO_TRANSLATE
"ARPaper" : "Paper acknowledgement of receipt", //_TO_TRANSLATE
"ARelectronic" : "Electronic acknowledgement of receipt", //_TO_TRANSLATE
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment