Enhances user balance display with username

Improves the display of user balances in the admin panel by including the username alongside the user ID. This provides a more user-friendly and easily identifiable representation of user data.

The username is fetched from the user table, and if no username is set the first 16 characters of the user id is shown.
This commit is contained in:
padreug 2025-10-22 18:35:19 +02:00
parent 224d520d84
commit d302023477
2 changed files with 23 additions and 4 deletions

View file

@ -122,7 +122,7 @@
flat
:rows="allUserBalances"
:columns="[
{name: 'user', label: 'User ID', field: 'user_id', align: 'left'},
{name: 'user', label: 'User', field: 'username', align: 'left'},
{name: 'balance', label: 'Amount Owed', field: 'balance', align: 'right'}
]"
row-key="user_id"
@ -131,7 +131,8 @@
>
<template v-slot:body-cell-user="props">
<q-td :props="props">
<div class="text-caption">{% raw %}{{ props.row.user_id.substring(0, 16) }}...{% endraw %}</div>
<div>{% raw %}{{ props.row.username }}{% endraw %}</div>
<div class="text-caption text-grey">{% raw %}{{ props.row.user_id.substring(0, 16) }}...{% endraw %}</div>
</q-td>
</template>
<template v-slot:body-cell-balance="props">