diff --git a/frontend/src/pages/admin/ProfilesPage.vue b/frontend/src/pages/admin/ProfilesPage.vue
index 81a3a1f..719e013 100644
--- a/frontend/src/pages/admin/ProfilesPage.vue
+++ b/frontend/src/pages/admin/ProfilesPage.vue
@@ -15,7 +15,6 @@
class="sticky-header-table"
:rows="adminStore.profiles"
:columns="columns"
- v-model:pagination="pagination"
row-key="user_id"
:loading="adminStore.loading"
flat
@@ -24,7 +23,7 @@
>
-
+ {{ statusLabel(props.value) }}
@@ -103,9 +102,9 @@
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch, type ComponentPublicInstance } from 'vue';
import { useI18n } from 'vue-i18n';
import type { QTableColumn } from 'quasar';
-import ProfileStatusBadge from '@/components/ProfileStatusBadge.vue';
import { useAdminStore, type Profile } from '@/stores/admin-store';
import { useLayoutStore } from '@/stores/layout-store';
+import { statusInfo } from '@/stores/profiles-store';
import CreateProfileDialog from './dialogs/CreateProfileDialog.vue';
import EditProfileDialog from './dialogs/EditProfileDialog.vue';
import UpdateRoleDialog from './dialogs/UpdateRoleDialog.vue';
@@ -118,9 +117,6 @@ const { t } = useI18n();
const profilesPage = ref(null);
const profilesTable = ref(null);
const profilesTableHeight = ref(610);
-const pagination = ref({
- rowsPerPage: 0,
-});
const editDialogOpen = ref(false);
const editingProfile = ref(null);
@@ -177,6 +173,12 @@ const columns = computed(() => [
},
]);
+function statusLabel(status: number) {
+ const key = `status.${status}`;
+ const translated = t(key);
+ return translated === key ? t('status.unknown', { status }) : translated;
+}
+
function getElement(component: ComponentPublicInstance | null) {
return component?.$el instanceof HTMLElement ? component.$el : null;
}
@@ -189,15 +191,12 @@ function updateProfilesTableHeight() {
return;
}
- const pageRect = page.getBoundingClientRect();
const tableRect = table.getBoundingClientRect();
const pageStyle = window.getComputedStyle(page);
- const pageMinHeight = parseFloat(pageStyle.minHeight);
- const pageHeight = Number.isFinite(pageMinHeight) && pageMinHeight > 0 ? pageMinHeight : pageRect.height;
const pagePaddingBottom = parseFloat(pageStyle.paddingBottom) || 0;
- const tableTopInPage = tableRect.top - pageRect.top;
+ const availableHeight = window.innerHeight - tableRect.top - pagePaddingBottom;
- profilesTableHeight.value = Math.max(0, Math.floor(pageHeight - tableTopInPage - pagePaddingBottom));
+ profilesTableHeight.value = Math.max(0, Math.floor(availableHeight));
}
async function updateProfilesTableHeightAfterRender() {