Improves user display in audit log and requests
Uses usernames instead of user IDs in the audit log and approval request listings to improve readability. If a user is not found, it displays a truncated version of the user ID.
This commit is contained in:
parent
d1f22dfda8
commit
762f5cc411
2 changed files with 6 additions and 2 deletions
|
|
@ -857,6 +857,10 @@ window.app = Vue.createApp({
|
||||||
const account = this.accounts.find(a => a.id === accountId)
|
const account = this.accounts.find(a => a.id === accountId)
|
||||||
return account ? account.name : 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() {
|
async loadReconciliationSummary() {
|
||||||
if (!this.isSuperUser) return
|
if (!this.isSuperUser) return
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
{% raw %}{{ formatDate(entry.entry_date) }}{% endraw %}
|
{% raw %}{{ formatDate(entry.entry_date) }}{% endraw %}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption v-if="entry.meta && entry.meta.user_id">
|
<q-item-label caption v-if="entry.meta && entry.meta.user_id">
|
||||||
User: {% raw %}{{ entry.meta.user_id.substring(0, 16) }}...{% endraw %}
|
User: {% raw %}{{ getUserName(entry.meta.user_id) }}{% endraw %}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption v-if="entry.reference" class="text-grey">
|
<q-item-label caption v-if="entry.reference" class="text-grey">
|
||||||
Ref: {% raw %}{{ entry.reference }}{% endraw %}
|
Ref: {% raw %}{{ entry.reference }}{% endraw %}
|
||||||
|
|
@ -285,7 +285,7 @@
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>{% raw %}{{ request.description }}{% endraw %}</q-item-label>
|
<q-item-label>{% raw %}{{ request.description }}{% endraw %}</q-item-label>
|
||||||
<q-item-label caption>
|
<q-item-label caption>
|
||||||
User: {% raw %}{{ request.user_id.substring(0, 16) }}...{% endraw %}
|
User: {% raw %}{{ getUserName(request.user_id) }}{% endraw %}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption>
|
<q-item-label caption>
|
||||||
Requested: {% raw %}{{ formatDate(request.created_at) }}{% endraw %}
|
Requested: {% raw %}{{ formatDate(request.created_at) }}{% endraw %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue