Simplify order and client detail layouts

This commit is contained in:
Ruslan Bakiev
2026-04-06 10:47:12 +07:00
parent ec9103a80d
commit 453092c289
4 changed files with 104 additions and 60 deletions

View File

@@ -21,6 +21,7 @@ const props = defineProps<{
editable?: boolean;
unitPriceDrafts?: Record<string, string>;
disabled?: boolean;
framed?: boolean;
}>();
const emit = defineEmits<{
@@ -123,6 +124,7 @@ function formatParameterValue(value: unknown) {
const mode = computed(() => props.mode ?? (props.editable ? 'manager-pricing' : 'readonly'));
const isPricingMode = computed(() => mode.value === 'manager-pricing');
const isCartMode = computed(() => mode.value === 'cart');
const isFramed = computed(() => props.framed ?? true);
function mapParameterEntries(source: Record<string, unknown> | null | undefined): ItemParameter[] {
if (!source || typeof source !== 'object') {
@@ -165,7 +167,7 @@ function itemParameters(item: OrderItemView) {
</script>
<template>
<div class="surface-card rounded-3xl p-5">
<div :class="isFramed ? 'surface-card rounded-3xl p-5' : ''">
<div class="hidden border-b border-[#deebe4] pb-3 md:grid md:grid-cols-[minmax(0,1.8fr)_140px_160px_140px] md:gap-4">
<p class="text-xs font-semibold uppercase tracking-[0.18em] text-[#6a8a76]">Позиция</p>
<p class="text-xs font-semibold uppercase tracking-[0.18em] text-[#6a8a76]">Цена</p>