feat: move brand name to one config and redesign the accounting card

اپ: نام برند در همه‌ی صفحه‌ها و پیام‌ها یکسان شده و از یک تنظیم مرکزی خوانده می‌شود.
اپ: کارت حسابداری در صفحه‌ی مشتری بازطراحی شد؛ مانده‌ها و وضعیت لینک واضح‌تر نمایش داده می‌شوند.
پنل: کارت حسابداری در پرونده‌ی مشتری بازطراحی شد؛ مانده‌ها، آخرین ارسال و فرم لینک دستی واضح‌تر شده‌اند.
پنل: ستون «کد» در جدول‌ها به‌طور پیش‌فرض پنهان است و از انتخاب ستون‌ها قابل نمایش است.
پنل: تغییر نمایش ستون‌ها در جدول‌ها بلافاصله اعمال می‌شود.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
s.esmaeili
2026-10-14 13:31:20 +03:30
co-authored by Claude Haiku 5.5
parent 5d2a1efb0c
commit 532ceee189
100 changed files with 1870 additions and 579 deletions
+93 -22
View File
@@ -101,18 +101,39 @@
key="slider"
tab="اسلایدر موبایل"
>
<div v-for="(s, index) in sliders" :key="index" class="slide">
<h6 class="mobile-c">اسلاید {{ index + 1 }}</h6>
<div class="slider-toolbar">
<span class="slider-count">{{ sliders.length }} اسلاید</span>
<div class="row">
<ImageUploadInput v-model="s.image" purpose="slider" placeholder="تصویر اسلاید" />
<a-input v-model:value="s.link" placeholder="لینک" />
<a-button danger @click="sliders.splice(index, 1)">حذف</a-button>
<a-button @click="addSlide">
<template #icon><PlusOutlined /></template>
افزودن اسلاید
</a-button>
<a-button type="primary" @click="saveSliders">ذخیره اسلایدر</a-button>
</div>
</div>
<div class="row mt-4">
<a-button @click="sliders.push({ image: '', link: '' })">افزودن اسلاید</a-button>
<a-button type="primary" @click="saveSliders">ذخیره اسلایدر</a-button>
<a-empty v-if="sliders.length === 0" description="اسلایدی ثبت نشده است" />
<div v-else class="slider-grid">
<div v-for="(s, index) in sliders" :key="index" class="slide-card">
<div class="slide-card__head">
<span class="slide-card__title">اسلاید {{ index + 1 }}</span>
<a-popconfirm
ok-text="بله"
cancel-text="خیر"
title="این اسلاید حذف شود؟"
@confirm="removeSlide(index)"
>
<a-button type="text" danger size="small" title="حذف">
<template #icon><DeleteOutlined /></template>
</a-button>
</a-popconfirm>
</div>
<div class="slide-card__media">
<ImageUploadInput v-model="s.image" purpose="slider" placeholder="تصویر اسلاید" />
</div>
<a-input v-model:value="s.link" placeholder="لینک" />
</div>
</div>
</a-tab-pane>
@@ -173,7 +194,7 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { message } from 'ant-design-vue';
import { DeleteOutlined, EditOutlined } from '@ant-design/icons-vue';
import { DeleteOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons-vue';
import { useUsersStore } from '../../stores/users';
import { useDeleteHandler } from '../../composables/useDeleteHandler';
import api from '../../api/client';
@@ -280,6 +301,14 @@ async function saveTags() {
}
// ── slider
function addSlide() {
sliders.value.push({ image: '', link: '' });
}
function removeSlide(index: number) {
sliders.value.splice(index, 1);
}
// Gated server-side by its own `custom.config.statics.slider` permission (not
// the broad `config.statics` that guards the rest of this screen) — see
// admin-misc.controller.ts. Uses the dedicated `const/slider` route rather
@@ -368,14 +397,62 @@ onMounted(async () => {
gap: 0.5rem;
flex-wrap: wrap;
}
.slide {
border: 1px solid #f0f0f0;
border-radius: 6px;
padding: 0.75rem;
margin-bottom: 0.75rem;
.slider-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
margin-bottom: 1rem;
}
.mobile-c {
margin: 0 0 0.5rem;
.slider-count {
color: rgba(0, 0, 0, 0.45);
}
/* one card per slide; min() keeps a card no wider than a narrow phone column */
.slider-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
gap: 16px;
}
.slide-card {
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
padding: 12px;
border: 1px solid #f0f0f0;
border-radius: 8px;
background: #fff;
}
.slide-card__head {
display: flex;
justify-content: space-between;
align-items: center;
}
.slide-card__title {
font-weight: 600;
}
/* Fixed-height media box: the empty upload tile, the uploading spinner and the
saved thumbnail all fill it, so the card keeps the same height when a photo
is added or removed (no jump). The shared upload tile is 104px square by
default; here it becomes a full-width banner preview. */
.slide-card__media {
height: 140px;
}
.slide-card__media :deep(.image-upload),
.slide-card__media :deep(.ant-upload-wrapper),
.slide-card__media :deep(.ant-upload-list),
.slide-card__media :deep(.ant-upload-list-item-container),
.slide-card__media :deep(.ant-upload.ant-upload-select) {
width: 100% !important;
height: 100% !important;
margin: 0 !important;
}
.slide-card__media :deep(.ant-upload-wrapper) {
display: block;
}
.slide-card__media :deep(.ant-upload-list-item-thumbnail img) {
object-fit: cover;
}
.mt-4 {
margin-top: 1rem;
@@ -387,12 +464,6 @@ onMounted(async () => {
flex: 1 1 140px;
max-width: none !important;
}
.slide {
padding: 10px;
}
.slide .row > * {
flex: 1 1 100%;
}
.mt-4 {
margin-top: 12px;
}