Commit 8c87e402 authored by Cyril Vazquez's avatar Cyril Vazquez

FIX: wrong user display name in life cycle event modl, and user id shown in data

parent bc8d4783
...@@ -283,11 +283,6 @@ class journal ...@@ -283,11 +283,6 @@ class journal
$this->currentEvent = $event; $this->currentEvent = $event;
$user = \laabs::callService('auth/userAccount/read_userAccountId_', $event->accountId);
$event->accountName = $user->accountName;
$event->accountDisplayName = $user->displayName;
return $event; return $event;
} }
......
...@@ -195,11 +195,16 @@ class journal ...@@ -195,11 +195,16 @@ class journal
public function readEvent($event) public function readEvent($event)
{ {
$eventObject = new \stdClass(); $eventObject = new \stdClass();
foreach ($event as $key => $value) { foreach ($event as $key => $value) {
$newKey = $this->translator->getText($key, 'eventInfo'); $newKey = $this->translator->getText($key, 'eventInfo');
$eventObject->$newKey = $value; $eventObject->$newKey = $value;
} }
$user = \laabs::callService('auth/userAccount/read_userAccountId_', $event->accountId);
$eventObject->accountDisplayName = $user->displayName.' ('.$user->accountName.')';
$objectClass = \laabs\dirname($event->objectClass); $objectClass = \laabs\dirname($event->objectClass);
$this->translator->setCatalog('lifeCycle/messages'); $this->translator->setCatalog('lifeCycle/messages');
......
...@@ -156,11 +156,11 @@ msgstr "Description" ...@@ -156,11 +156,11 @@ msgstr "Description"
msgid "Description" msgid "Description"
msgstr "Description" msgstr "Description"
msgid "User identifiant" msgid "User identifier"
msgstr "Identifiant utilisateur" msgstr "Identifiant utilisateur"
msgid "User name" msgid "User name"
msgstr "Nom utilisateur" msgstr "Utilisateur"
# --------------------------------------------------------- # ---------------------------------------------------------
# Event info detail # Event info detail
...@@ -202,9 +202,9 @@ msgid "requesterOrgRegNumber" ...@@ -202,9 +202,9 @@ msgid "requesterOrgRegNumber"
msgstr "Identifiant du demandeur" msgstr "Identifiant du demandeur"
msgctxt "eventInfo" msgctxt "eventInfo"
msgid "accountId" # msgid "accountId"
msgstr "Identifiant technique utilisateur" # msgstr "Identifiant technique utilisateur"
msgctxt "eventInfo" # msgctxt "eventInfo"
msgid "depositorOrgRegNumber" msgid "depositorOrgRegNumber"
msgstr "Identifiant du service versant" msgstr "Identifiant du service versant"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<dt>Timestamp</dt><dd name="timestamp"></dd> <dt>Timestamp</dt><dd name="timestamp"></dd>
<dt name="objectClass"></dt><dd name="objectId"></dd> <dt name="objectClass"></dt><dd name="objectId"></dd>
<dt>User name</dt><dd name="accountDisplayName"></dd> <dt>User name</dt><dd name="accountDisplayName"></dd>
<dt>User identifiant</dt><dd name="accountName"></dd> <dd class='hide' name="accountId"></dd>
<dt>Operation result</dt><dd name="operationResult"></dd> <dt>Operation result</dt><dd name="operationResult"></dd>
</dl> </dl>
</div> </div>
...@@ -105,9 +105,9 @@ eventInfo = { ...@@ -105,9 +105,9 @@ eventInfo = {
var eventInfo = $('#eventInfo'); var eventInfo = $('#eventInfo');
eventInfo.html(''); eventInfo.html('');
$.each(response, function(key, value) { $.each(response, function(key, value) {
if (value != "") { if (value) {
$('<dt></dt>').text(key).appendTo(eventInfo); $('<dt></dt>').text(key).appendTo(eventInfo);
$('<dd></dd>').text(value).css('word-break', 'break-all').appendTo(eventInfo); $('<dd></dd>').html(value).css('word-break', 'break-all').appendTo(eventInfo);
} else { } else {
console.log("cocuou"); console.log("cocuou");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment