feat: add settings data upload and single-name user forms

Allow SuperAdmins to upload import JSON from settings, and update user UI for merged name, gender, and extended profile fields.
This commit is contained in:
2026-08-15 01:31:47 +03:30
parent 833584b1b4
commit 6b5549019c
11 changed files with 268 additions and 27 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
<div class="flex flex-column gap-3">
<div>
<span class="text-muted text-xs block mb-1">نام کاربر / دانشجو</span>
<span class="font-bold text-color text-base">{{ payment.user?.name || payment.userName || 'کاربر' }} {{ payment.user?.surname || '' }}</span>
<span class="font-bold text-color text-base">{{ payment.user?.name || payment.userName || 'کاربر' }}</span>
</div>
<div v-if="payment.classes && payment.classes.length">
<span class="text-muted text-xs block mb-1">کلاسهای مربوطه</span>
+2 -2
View File
@@ -22,7 +22,7 @@
<Column field="user" header="نام دانشجو / کاربر">
<template #body="{ data }">
<router-link :to="`/payments/view/${data._id || data.id}`" class="font-bold text-color hover:text-primary">
{{ data.user?.name || data.userName || 'کاربر' }} {{ data.user?.surname || '' }}
{{ data.user?.name || data.userName || 'کاربر' }}
</router-link>
</template>
</Column>
@@ -196,7 +196,7 @@ const fetchDropdownData = async () => {
]);
const uData = uRes.data || uRes;
const rawUsers = uData.items || uData.users || uData || [];
usersList.value = rawUsers.map(u => ({ ...u, fullName: `${u.name} ${u.surname}` }));
usersList.value = rawUsers.map(u => ({ ...u, fullName: u.name || '' }));
const cData = cRes.data || cRes;
classesList.value = cData.items || cData.classes || cData || [];