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
$this->currentEvent = $event;
$user = \laabs::callService('auth/userAccount/read_userAccountId_', $event->accountId);
$event->accountName = $user->accountName;
$event->accountDisplayName = $user->displayName;
return $event;
}
......
......@@ -195,11 +195,16 @@ class journal
public function readEvent($event)
{
$eventObject = new \stdClass();
foreach ($event as $key => $value) {
$newKey = $this->translator->getText($key, 'eventInfo');
$eventObject->$newKey = $value;
}
$user = \laabs::callService('auth/userAccount/read_userAccountId_', $event->accountId);
$eventObject->accountDisplayName = $user->displayName.' ('.$user->accountName.')';
$objectClass = \laabs\dirname($event->objectClass);
$this->translator->setCatalog('lifeCycle/messages');
......
......@@ -156,11 +156,11 @@ msgstr "Description"
msgid "Description"
msgstr "Description"
msgid "User identifiant"
msgid "User identifier"
msgstr "Identifiant utilisateur"
msgid "User name"
msgstr "Nom utilisateur"
msgstr "Utilisateur"
# ---------------------------------------------------------
# Event info detail
......@@ -202,9 +202,9 @@ msgid "requesterOrgRegNumber"
msgstr "Identifiant du demandeur"
msgctxt "eventInfo"
msgid "accountId"
msgstr "Identifiant technique utilisateur"
msgctxt "eventInfo"
# msgid "accountId"
# msgstr "Identifiant technique utilisateur"
# msgctxt "eventInfo"
msgid "depositorOrgRegNumber"
msgstr "Identifiant du service versant"
......
......@@ -17,7 +17,7 @@
<dt>Timestamp</dt><dd name="timestamp"></dd>
<dt name="objectClass"></dt><dd name="objectId"></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>
</dl>
</div>
......@@ -105,9 +105,9 @@ eventInfo = {
var eventInfo = $('#eventInfo');
eventInfo.html('');
$.each(response, function(key, value) {
if (value != "") {
if (value) {
$('<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 {
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