fix some pargar bugs

This commit is contained in:
2026-07-27 21:44:32 +03:30
parent 993de3a4cf
commit b1685b47d5
5 changed files with 12 additions and 48 deletions
@@ -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) {
+3 -2
View File
@@ -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;
}
}