From d302023477c91afccbd346a26d37ea8417ed05fd Mon Sep 17 00:00:00 2001 From: padreug Date: Wed, 22 Oct 2025 18:35:19 +0200 Subject: [PATCH] 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. --- templates/castle/index.html | 5 +++-- views_api.py | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/templates/castle/index.html b/templates/castle/index.html index fac863f..771cb06 100644 --- a/templates/castle/index.html +++ b/templates/castle/index.html @@ -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 @@ >