admin panel beter ui

This commit is contained in:
s.esmaeili
2026-09-19 12:05:59 +03:30
parent 80ccf1a2aa
commit 81987ceae8
196 changed files with 565 additions and 431 deletions
@@ -6,9 +6,11 @@
-->
<div id="page-user-list">
<a-card title="لیست دسته بندی ها">
<ListPageHeader rid="collection.create" add-label="افزودن دسته" @add="openAdd" />
<XTable ref="tbl" :model="model">
<template #add>
<ListPageHeader rid="collection.create" add-label="افزودن دسته" @add="openAdd" />
</template>
<template #image="{ text }">
<img
width="90px"
@@ -141,6 +141,9 @@ async function handleSubmit() {
await api.post('branch', form);
}
message.info('اطلاعات با موفقیت به ثبت رسید.');
if (!id) {
Object.assign(form, { name: '', phone: '', address: '', user_id: undefined });
}
if (asModal) {
emit('success');
emit('update:open', false);
@@ -16,9 +16,11 @@
growing a v-if per caller.
-->
<a-card :title="title">
<ListPageHeader v-if="addRid" :rid="addRid" :add-label="addLabel" @add="openAdd()" />
<XTable ref="tbl" :model="model">
<template v-if="addRid" #add>
<ListPageHeader :rid="addRid" :add-label="addLabel" @add="openAdd()" />
</template>
<template #actions="{ record }">
<div class="flex gap-2">
<a-tooltip v-if="addRid" title="ویرایش">
+4 -2
View File
@@ -6,9 +6,11 @@
-->
<div id="page-user-list">
<a-card title="لیست شهر ها">
<ListPageHeader rid="cities.create" add-label="افزودن شهر" @add="addOpen = true" />
<XTable ref="citiesTable" :model="model">
<template #add>
<ListPageHeader rid="cities.create" add-label="افزودن شهر" @add="addOpen = true" />
</template>
<template #percent="{ text }">
{{ text ?? '-' }}
</template>
@@ -13,19 +13,16 @@
-->
<div id="page-user-list">
<a-card :title="title">
<ListPageHeader
v-if="showAddButton"
rid="persons.create.client"
add-label="افزودن مشتری عمده"
@add="openAdd"
/>
<div v-if="query && query.count && query.total">
{{ query.total }} رکورد یافت شد -
<span class="text-danger">{{ query.count }} رکورد غیر فعال</span>
</div>
<XTable ref="tbl" :model="model" @query="setCount">
<template v-if="showAddButton" #add>
<ListPageHeader rid="persons.create.client" add-label="افزودن مشتری عمده" @add="openAdd" />
</template>
<template #city="{ record }">
<div v-if="record.city && record.city.title">{{ record.city.title }}</div>
<div v-else>-</div>
@@ -1,10 +1,11 @@
<template>
<!--
Ported from legacy views/customer/omde/OmdeList.vue (615 lines).
The only one of OmdeCustomerList's five callers with an add button — see
OmdeCustomerList.vue's showAddButton prop for why it isn't on all five.
Add button removed per request: hide the "افزودن مشتری عمده" action on
this list. OmdeCustomerList.vue's showAddButton prop still exists in case
it needs to come back.
-->
<OmdeCustomerList :title="title" :model="model" show-add-button />
<OmdeCustomerList :title="title" :model="model" />
</template>
<script setup lang="ts">
+4 -2
View File
@@ -8,9 +8,11 @@
<div id="page-user-list">
<a-spin :spinning="loading">
<a-card title="لیست اسناد مالی">
<ListPageHeader rid="document.create" add-label="ثبت سند مالی" @add="openAdd" />
<XTable ref="tbl" :model="model">
<template #add>
<ListPageHeader rid="document.create" add-label="ثبت سند مالی" @add="openAdd" />
</template>
<template #confirmed="{ text }">
<a-tag v-if="text === 1" color="green">تایید شده</a-tag>
<a-tag v-else>تایید نشده</a-tag>
@@ -5,9 +5,11 @@
-->
<div id="page-user-list">
<a-card title="لیست فاکتورها">
<ListPageHeader rid="invoice.create" add-label="افزودن فاکتور" @add="openAdd" />
<XTable ref="tbl" :model="model">
<template #add>
<ListPageHeader rid="invoice.create" add-label="افزودن فاکتور" @add="openAdd" />
</template>
<template #user="{ record }">
{{ record.allocator_user?.name ?? '-' }}
</template>
@@ -8,12 +8,14 @@
-->
<div id="page-user-list">
<a-card title="لیست تخفیف ها">
<div class="list-page-header-row">
<ListPageHeader rid="offers.create" add-label="افزودن تخفیف عمده" @add="openAdd('omde')" />
<ListPageHeader rid="offers.create.tak" add-label="افزودن تخفیف تک" @add="openAdd('tak')" />
</div>
<XTable ref="tbl" :model="model">
<template #add>
<div class="list-page-header-row">
<ListPageHeader rid="offers.create" add-label="افزودن تخفیف عمده" @add="openAdd('omde')" />
<ListPageHeader rid="offers.create.tak" add-label="افزودن تخفیف تک" @add="openAdd('tak')" />
</div>
</template>
<template #sts="{ record }">
<a-tag v-if="record.status === 1" color="green">فعال</a-tag>
<a-tag v-else color="red">غیر فعال</a-tag>
@@ -136,13 +138,7 @@ async function deletePromotion(record: Record<string, any>) {
<style scoped>
.list-page-header-row {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-bottom: 1rem;
}
/* ListPageHeader's own margin-bottom would double up when two sit side by side */
.list-page-header-row :deep(.list-page-header) {
margin-bottom: 0;
}
</style>
+5 -3
View File
@@ -6,10 +6,12 @@
-->
<div id="page-user-list">
<a-card title="لیست مدیران">
<!-- legacy ListUser.vue:4 — the add-user button, gated on the same rid. -->
<ListPageHeader rid="user.list.create" add-label="افزودن کاربر" @add="openAdd" />
<XTable ref="tbl" :model="model">
<!-- legacy ListUser.vue:4 — the add-user button, gated on the same rid. -->
<template #add>
<ListPageHeader rid="user.list.create" add-label="افزودن کاربر" @add="openAdd" />
</template>
<template #ut="{ text }">
{{ userTypeTitle(text) }}
</template>