diff --git a/app/components/orders/OrderStatusBadge.vue b/app/components/orders/OrderStatusBadge.vue index da12d48..2fe5cdc 100644 --- a/app/components/orders/OrderStatusBadge.vue +++ b/app/components/orders/OrderStatusBadge.vue @@ -14,14 +14,17 @@ const statusLabel = computed(() => { }); const className = computed(() => { - if (props.status === 'COMPLETED') return 'badge badge-success'; - if (props.status === 'CLIENT_REJECTED' || props.status === 'MANAGER_REJECTED') return 'badge badge-error'; - if (props.status === 'MANAGER_BLOCKED') return 'badge badge-warning'; - if (props.status === 'NEW' || props.status === 'MANAGER_PROCESSING') return 'badge badge-warning'; - return 'badge badge-info'; + if (props.status === 'COMPLETED') return 'bg-[#139957]'; + if (props.status === 'CLIENT_REJECTED' || props.status === 'MANAGER_REJECTED') return 'bg-[#d94b55]'; + if (props.status === 'MANAGER_BLOCKED') return 'bg-[#f1a43a]'; + if (props.status === 'NEW' || props.status === 'MANAGER_PROCESSING') return 'bg-[#f1a43a]'; + return 'bg-[#2e8de4]'; }); diff --git a/app/components/orders/OrderSummaryCard.vue b/app/components/orders/OrderSummaryCard.vue index 728ef77..0e86c9b 100644 --- a/app/components/orders/OrderSummaryCard.vue +++ b/app/components/orders/OrderSummaryCard.vue @@ -8,12 +8,6 @@ type OrderCardItem = { quantity: number; }; -type CustomerCardMeta = { - name?: string | null; - avatarSrc?: string | null; - initials?: string | null; -}; - const props = defineProps<{ to: string; code: string; @@ -21,7 +15,6 @@ const props = defineProps<{ createdAt: string | Date; totalPrice?: number | null; items: OrderCardItem[]; - customer?: CustomerCardMeta | null; }>(); const DATE_FORMATTER = new Intl.DateTimeFormat('ru-RU', { @@ -41,33 +34,6 @@ function formatCreatedAt(value: string | Date) { return DATE_FORMATTER.format(new Date(value)); } -function buildInitials(value?: string | null) { - const parts = String(value ?? '') - .trim() - .split(/\s+/) - .filter(Boolean) - .slice(0, 2); - - if (!parts.length) { - return 'FR'; - } - - return parts.map((part) => part.charAt(0).toUpperCase()).join(''); -} - -function itemCountLabel(count: number) { - const mod10 = count % 10; - const mod100 = count % 100; - - if (mod10 === 1 && mod100 !== 11) { - return `${count} позиция`; - } - if (mod10 >= 2 && mod10 <= 4 && !(mod100 >= 12 && mod100 <= 14)) { - return `${count} позиции`; - } - return `${count} позиций`; -} - function createProductCover(name: string, seedKey: string) { const seed = `${name}${seedKey}`.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0); const [start, middle, finish] = coverPresets[seed % coverPresets.length]; @@ -96,11 +62,7 @@ function createProductCover(name: string, seedKey: string) { const visibleItems = computed(() => props.items.slice(0, 4)); const hiddenCount = computed(() => Math.max(props.items.length - visibleItems.value.length, 0)); -const totalPriceLabel = computed(() => formatPrice(props.totalPrice) ?? 'Сумма уточняется'); -const customerName = computed(() => String(props.customer?.name ?? '').trim()); -const customerInitials = computed(() => ( - String(props.customer?.initials ?? '').trim() || buildInitials(customerName.value) -)); +const totalPriceLabel = computed(() => formatPrice(props.totalPrice) ?? '—'); diff --git a/app/components/ui/SectionSearchHero.vue b/app/components/ui/SectionSearchHero.vue index e3b0ba0..50b69a7 100644 --- a/app/components/ui/SectionSearchHero.vue +++ b/app/components/ui/SectionSearchHero.vue @@ -21,7 +21,7 @@ function updateValue(event: Event) {
-
@@ -304,7 +315,6 @@ const calendarOptions = computed(() => ({ :created-at="order.createdAt" :total-price="order.totalPrice" :items="order.items" - :customer="customerCardMeta(order.customerId)" /> diff --git a/app/pages/clients/[id].vue b/app/pages/clients/[id].vue index 4ef7e10..0a09621 100644 --- a/app/pages/clients/[id].vue +++ b/app/pages/clients/[id].vue @@ -148,8 +148,8 @@ async function rejectRequest() {