Simplify profile sections and clean catalog header

This commit is contained in:
Ruslan Bakiev
2026-04-03 08:59:19 +07:00
parent 0f7787de36
commit c9e281376c
2 changed files with 156 additions and 164 deletions

View File

@@ -77,16 +77,12 @@ function decrementProduct(productId: string) {
<template>
<section class="space-y-5">
<h1 class="text-3xl font-extrabold text-[#0f2f20]">Каталог</h1>
<div class="surface-card rounded-3xl p-4 md:p-5">
<div class="flex flex-wrap items-center justify-between gap-3">
<p class="text-sm text-base-content/75">Добавляй позиции и оформляй заявку в корзине.</p>
<h1 class="text-3xl font-extrabold text-[#0f2f20]">Каталог</h1>
<NuxtLink to="/cart" class="btn btn-outline btn-sm">
Корзина: {{ totalItems }}
</NuxtLink>
</div>
</div>
<div class="surface-card rounded-3xl p-4 md:p-5">
<div class="grid gap-3 md:grid-cols-[1fr_auto]">

View File

@@ -298,13 +298,13 @@ onBeforeUnmount(() => {
<div class="surface-card rounded-3xl p-5">
<div class="flex flex-wrap items-center justify-between gap-2">
<h2 class="text-xl font-bold text-[#123824]">Карточка контрагента</h2>
<span class="badge" :class="profileIsComplete ? 'badge-success' : 'badge-warning'">
{{ profileIsComplete ? 'Заполнена' : 'Не заполнена' }}
</span>
<p class="text-sm font-semibold text-[#355947]">
{{ profileIsComplete ? 'Заполнено' : 'Заполнить' }}
</p>
</div>
<div class="mt-4 grid gap-4 xl:grid-cols-3">
<div class="rounded-2xl border border-base-300 bg-base-100 p-4">
<div class="mt-4 space-y-4">
<section>
<h3 class="mb-3 text-base font-bold">1. Контрагент (Dadata)</h3>
<div ref="partyDropdownRef" class="relative">
@@ -372,9 +372,11 @@ onBeforeUnmount(() => {
<legend class="fieldset-legend">Юридический адрес</legend>
<textarea v-model="counterpartyForm.legalAddress" class="textarea textarea-bordered min-h-24 w-full" />
</fieldset>
</div>
</section>
<div class="rounded-2xl border border-base-300 bg-base-100 p-4">
<div class="divider my-0" />
<section>
<h3 class="mb-3 text-base font-bold">2. Банк (Dadata)</h3>
<div ref="bankDropdownRef" class="relative">
@@ -432,9 +434,11 @@ onBeforeUnmount(() => {
<legend class="fieldset-legend">Расчетный счет</legend>
<input v-model="counterpartyForm.checkingAccount" type="text" class="input input-bordered w-full" >
</fieldset>
</div>
</section>
<div class="rounded-2xl border border-base-300 bg-base-100 p-4">
<div class="divider my-0" />
<section>
<h3 class="mb-3 text-base font-bold">3. Подписант и основание</h3>
<fieldset class="fieldset">
@@ -457,24 +461,16 @@ onBeforeUnmount(() => {
</fieldset>
<button class="btn btn-primary mt-4 w-full" :disabled="saveCounterpartyMutation.loading.value || !profileIsComplete" @click="saveCounterpartyProfile">
{{ saveCounterpartyMutation.loading.value ? 'Сохраняем' : 'Сохранить карточку' }}
{{ saveCounterpartyMutation.loading.value ? 'Сохраняем' : 'Сохранить' }}
</button>
<p v-if="profileUpdatedAt" class="mt-2 text-xs opacity-70">Обновлено: {{ new Date(profileUpdatedAt).toLocaleString() }}</p>
</div>
</section>
</div>
<div v-if="profileFeedback" class="alert mt-4" :class="profileFeedbackTone === 'success' ? 'alert-success' : 'alert-error'">
{{ profileFeedback }}
</div>
<div class="alert mt-4" :class="profileIsComplete ? 'alert-success' : 'alert-warning'">
{{
profileIsComplete
? 'Карточка контрагента заполнена. Оформление заявки в корзине доступно.'
: 'Пока карточка не заполнена полностью, оформление заявки в корзине будет заблокировано.'
}}
</div>
</div>
<aside class="surface-card rounded-3xl p-5">