fix some pargar bugs
This commit is contained in:
@@ -88,7 +88,6 @@
|
||||
:variant="item.variant"
|
||||
:loading="item.loading"
|
||||
:disabled="item.disabled"
|
||||
:to="item.to"
|
||||
@click="item.onClick?.()"
|
||||
>
|
||||
<template v-if="item.key === 'restore'">
|
||||
@@ -101,8 +100,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import type { RouteLocationRaw } from 'vue-router'
|
||||
import BasicActionSheet from '@/components/BasicActionSheet.vue'
|
||||
import DashboardQuickActionBtn from '@/pages/dashboard/components/DashboardQuickActionBtn.vue'
|
||||
import { isMobile } from '@core/utils/is'
|
||||
@@ -120,7 +117,6 @@ type ActionItem = {
|
||||
danger?: boolean
|
||||
disabled?: boolean
|
||||
loading?: boolean
|
||||
to?: RouteLocationRaw
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
@@ -156,7 +152,6 @@ const emit = defineEmits<{
|
||||
syncShow: []
|
||||
}>()
|
||||
|
||||
const router = useRouter()
|
||||
const menuOpen = ref(false)
|
||||
|
||||
const actionItems = computed<ActionItem[]>(() => [
|
||||
@@ -219,21 +214,6 @@ const actionItems = computed<ActionItem[]>(() => [
|
||||
loading: props.quickActionLoading,
|
||||
onClick: () => emit('syncShow'),
|
||||
},
|
||||
{
|
||||
key: 'products',
|
||||
label: 'مدیریت محصولات',
|
||||
shortLabel: 'محصولات',
|
||||
icon: 'vuesax-linear:box',
|
||||
to: { name: 'productsMain_limitedOrder' },
|
||||
},
|
||||
{
|
||||
key: 'orders',
|
||||
label: 'لیست سفارشات',
|
||||
shortLabel: 'سفارشات',
|
||||
icon: 'vuesax-linear:receipt-2',
|
||||
variant: 'primary',
|
||||
to: { name: 'ordersMain' },
|
||||
},
|
||||
])
|
||||
|
||||
const mobileMenuGroups = computed<MobileMenuGroup[]>(() => [
|
||||
@@ -286,25 +266,6 @@ const mobileMenuGroups = computed<MobileMenuGroup[]>(() => [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'صفحات',
|
||||
items: [
|
||||
{
|
||||
key: 'products',
|
||||
label: 'مدیریت محصولات',
|
||||
icon: 'vuesax-linear:box',
|
||||
tone: 'slate',
|
||||
nav: true,
|
||||
},
|
||||
{
|
||||
key: 'orders',
|
||||
label: 'لیست سفارشات',
|
||||
icon: 'vuesax-linear:receipt-2',
|
||||
tone: 'amber',
|
||||
nav: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
|
||||
const mobileActions: Record<string, () => void> = {
|
||||
@@ -315,8 +276,6 @@ const mobileActions: Record<string, () => void> = {
|
||||
'close-sell': () => emit('closeAllSell'),
|
||||
'sync-prices': () => emit('syncPrices'),
|
||||
'sync-show': () => emit('syncShow'),
|
||||
products: () => void router.push({ name: 'productsMain_limitedOrder' }),
|
||||
orders: () => void router.push({ name: 'ordersMain' }),
|
||||
}
|
||||
|
||||
function runAction(key: string) {
|
||||
@@ -350,10 +309,11 @@ function runAction(key: string) {
|
||||
.dashboard-quick-actions-bar {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 0.375rem;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 1279px) {
|
||||
|
||||
@@ -692,8 +692,9 @@ const walletMetricItems = computed(() => [
|
||||
.dashboard-hero__actions {
|
||||
order: 2;
|
||||
width: auto;
|
||||
max-width: min(100%, 42rem);
|
||||
flex-shrink: 0;
|
||||
max-width: min(100%, 56rem);
|
||||
flex-shrink: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export function pargarStatusLabel(status?: string, pargarId?: string | null, desc?: string | null): string {
|
||||
if (desc && desc.includes('منتظر ثبت سند')) return 'منتظر سند'
|
||||
if (desc && desc.includes('در حال اعمال')) return 'در حال اعمال'
|
||||
if (desc && desc.includes('اختلاف مانده')) return 'اختلاف مانده'
|
||||
if (pargarId && String(pargarId).startsWith('skip:')) return 'بدون سند'
|
||||
if (pargarId) return 'موفق'
|
||||
|
||||
@@ -178,6 +178,7 @@ export function supportMessengerIdPlaceholder(messenger?: string): string {
|
||||
/** کلیدهای legacy — در پنل نمایش داده نمیشوند */
|
||||
export const HIDDEN_LEGACY_SETTING_KEYS = new Set([
|
||||
'main_product_price',
|
||||
'montzar_price',
|
||||
'etehadie_api_url',
|
||||
'goldir_price',
|
||||
'price_primary_source',
|
||||
@@ -715,7 +716,7 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
|
||||
chart_id:
|
||||
'شناسه نمودار در سرویس تابلو. خالی = شناسه پیشفرض سرویس.',
|
||||
price_provider:
|
||||
'منبع دریافت قیمت لحظهای برای اپ مشتری و همگامسازی محصولات.',
|
||||
'منبع دریافت قیمت لحظهای برای اپ مشتری و همگامسازی محصولات. مقدار montzar یعنی قیمت از همکار (Montzar).',
|
||||
main_product:
|
||||
'شناسه یا نام محصول مرجع آبشده. وقتی منبع قیمت «محصول مرجع» باشد برای محاسبه استفاده میشود.',
|
||||
zaarbox_price_key:
|
||||
@@ -978,7 +979,7 @@ export const SETTING_EDITABLE_KEYS = new Set([
|
||||
'main_product_price',
|
||||
'min_first_buy', 'min_withdraw', 'min_deposit', 'minimum_sell',
|
||||
'montzar_mobile', 'montzar_open_buy', 'montzar_open_sell',
|
||||
'montzar_password', 'montzar_price', 'montzar_product_id',
|
||||
'montzar_password', 'montzar_product_id',
|
||||
'open_register',
|
||||
'referral_id', 'referral_limit', 'referral_gift_on_first_order',
|
||||
'register_jibit_verify', 'register_referral_bonus_message', 'register_referral_sms_to_referrer',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<p class="pargar-wallet-sync__hint">
|
||||
{{
|
||||
canSync
|
||||
? 'ریال و طلای کیف اصلی را با ماندهٔ پرگار یکی میکند — فقط وقتی همهٔ اسناد در پرگار ثبت شده باشند'
|
||||
? 'تغییر مانده در پرگار (حتی صفر دستی حسابدار) خودکار روی کیف مینشیند — فقط اگر سند پنل هنوز در پرگار ثبت نشده باشد صبر میکند'
|
||||
: 'ابتدا کد حسابداری پرگار را برای این مشتری ثبت کنید'
|
||||
}}
|
||||
</p>
|
||||
@@ -60,7 +60,7 @@ function confirmForceSync() {
|
||||
// Popconfirm داخل مودال جزئیات مشتری پشت میافتد؛ Modal.confirm با zIndex درست
|
||||
Modal.confirm({
|
||||
title: 'اعمال اجباری مانده',
|
||||
content: 'ماندهٔ پرگار بدون بررسی اعتبار روی کیف مشتری نوشته شود؟',
|
||||
content: 'ماندهٔ پرگار حتی اگر سند پنل هنوز ثبت نشده باشد، بدون بررسی روی کیف نوشته شود؟',
|
||||
okText: 'بله، اعمال کن',
|
||||
cancelText: 'انصراف',
|
||||
okType: 'danger',
|
||||
|
||||
Reference in New Issue
Block a user