diff --git a/static/js/index.js b/static/js/index.js
index 746faf6..2517657 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -857,6 +857,10 @@ window.app = Vue.createApp({
const account = this.accounts.find(a => a.id === accountId)
return account ? account.name : accountId
},
+ getUserName(userId) {
+ const user = this.users.find(u => u.user_id === userId)
+ return user ? user.username : userId.substring(0, 16) + '...'
+ },
async loadReconciliationSummary() {
if (!this.isSuperUser) return
diff --git a/templates/castle/index.html b/templates/castle/index.html
index 5462904..b5d6a01 100644
--- a/templates/castle/index.html
+++ b/templates/castle/index.html
@@ -79,7 +79,7 @@
{% raw %}{{ formatDate(entry.entry_date) }}{% endraw %}
- User: {% raw %}{{ entry.meta.user_id.substring(0, 16) }}...{% endraw %}
+ User: {% raw %}{{ getUserName(entry.meta.user_id) }}{% endraw %}
Ref: {% raw %}{{ entry.reference }}{% endraw %}
@@ -285,7 +285,7 @@
{% raw %}{{ request.description }}{% endraw %}
- User: {% raw %}{{ request.user_id.substring(0, 16) }}...{% endraw %}
+ User: {% raw %}{{ getUserName(request.user_id) }}{% endraw %}
Requested: {% raw %}{{ formatDate(request.created_at) }}{% endraw %}