diff --git a/apps/web/src/components/pipeline/AddDealButton.vue b/apps/web/src/components/pipeline/AddDealButton.vue index e9b6f55..5a24810 100644 --- a/apps/web/src/components/pipeline/AddDealButton.vue +++ b/apps/web/src/components/pipeline/AddDealButton.vue @@ -8,8 +8,9 @@ withDefaults( defineProps<{ accent: PipelineAccent; label?: string; + count?: string; }>(), - { label: 'افزودن معامله' }, + { label: 'افزودن معامله', count: '' }, ); const emit = defineEmits<{ @@ -21,11 +22,18 @@ const emit = defineEmits<{ - - {{ label }} + + + {{ label }} + + {{ count }} diff --git a/apps/web/src/components/pipeline/DealCard.vue b/apps/web/src/components/pipeline/DealCard.vue index d5c51b6..95a18a1 100644 --- a/apps/web/src/components/pipeline/DealCard.vue +++ b/apps/web/src/components/pipeline/DealCard.vue @@ -18,11 +18,7 @@ import { } from 'ant-design-vue'; import { userAvatarSrc } from '@/lib/userAvatars'; import type { PipelineAccent, PipelineDeal, PipelineUiCopy } from '@/lib/pipeline-board'; -import { - DEAL_BOARD_COPY, - formatCurrencyParts, - PIPELINE_ACCENT, -} from '@/lib/pipeline-board'; +import { DEAL_BOARD_COPY, formatCurrencyParts } from '@/lib/pipeline-board'; const props = withDefaults( defineProps<{ @@ -54,7 +50,6 @@ const showAmount = computed( const money = computed(() => formatCurrencyParts(props.deal.amount ?? 0, props.deal.currencyUnit ?? 'ریال'), ); -const colors = computed(() => PIPELINE_ACCENT[props.accent]); const assigneeTitle = computed(() => (props.deal.assigneeNames ?? []).filter(Boolean).join('، ') || 'مسئول', ); @@ -113,24 +108,17 @@ const cardStyle = computed(() => ({ - - {{ deal.initials }} - -
diff --git a/apps/web/src/components/pipeline/PipelineBoard.vue b/apps/web/src/components/pipeline/PipelineBoard.vue index e088e5c..923a31b 100644 --- a/apps/web/src/components/pipeline/PipelineBoard.vue +++ b/apps/web/src/components/pipeline/PipelineBoard.vue @@ -131,8 +131,8 @@ function submitAdd() {
import { computed, nextTick, ref } from 'vue'; -import { - HolderOutlined, - MoreOutlined, - PlusOutlined, -} from '@ant-design/icons-vue'; +import { HolderOutlined, MoreOutlined } from '@ant-design/icons-vue'; import { Button as AButton, Dropdown as ADropdown, @@ -17,7 +13,7 @@ import { import AddDealButton from './AddDealButton.vue'; import DealCard from './DealCard.vue'; import type { PipelineDeal, PipelineStage, PipelineUiCopy } from '@/lib/pipeline-board'; -import { DEAL_BOARD_COPY, PIPELINE_ACCENT, toFaItemCount } from '@/lib/pipeline-board'; +import { DEAL_BOARD_COPY, PIPELINE_ACCENT } from '@/lib/pipeline-board'; const props = withDefaults( defineProps<{ @@ -67,8 +63,8 @@ const columnStyle = computed(() => ({ display: 'flex', flexDirection: 'column' as const, gap: '12px', - flex: '0 0 280px', - width: '280px', + flex: '0 0 310px', + width: '310px', alignSelf: 'stretch' as const, minHeight: 0, padding: 0, @@ -154,15 +150,21 @@ function onColumnDragStart(event: DragEvent) { } const menuItems = computed(() => [ + { key: 'add', label: 'افزودن' }, { key: 'rename', label: 'تغییر نام' }, { key: 'right', label: 'انتقال به راست', disabled: props.isFirst }, { key: 'left', label: 'انتقال به چپ', disabled: props.isLast }, { key: 'delete', label: 'حذف ستون', danger: true }, ]); +const itemCountLabel = computed(() => + new Intl.NumberFormat('fa-IR').format(props.stage.total ?? props.stage.deals.length), +); + function onMenuClick({ key }: { key: string | number }) { menuOpen.value = false; - if (key === 'rename') startRename(); + if (key === 'add') emit('addDeal', props.stage.id); + else if (key === 'rename') startRename(); else if (key === 'right') emit('move', props.stage.id, -1); else if (key === 'left') emit('move', props.stage.id, 1); else if (key === 'delete') emit('delete', props.stage.id); @@ -224,12 +226,13 @@ function onMenuClick({ key }: { key: string | number }) { /> - - {{ toFaItemCount(stage.total ?? stage.deals.length, copy.itemNoun) }} - - - - - -
@@ -311,7 +301,12 @@ function onMenuClick({ key }: { key: string | number }) {
- +