Simplify profile sections and clean catalog header
This commit is contained in:
@@ -77,16 +77,12 @@ function decrementProduct(productId: string) {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<section class="space-y-5">
|
<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">
|
<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">
|
<NuxtLink to="/cart" class="btn btn-outline btn-sm">
|
||||||
Корзина: {{ totalItems }}
|
Корзина: {{ totalItems }}
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="surface-card rounded-3xl p-4 md:p-5">
|
<div class="surface-card rounded-3xl p-4 md:p-5">
|
||||||
<div class="grid gap-3 md:grid-cols-[1fr_auto]">
|
<div class="grid gap-3 md:grid-cols-[1fr_auto]">
|
||||||
|
|||||||
@@ -298,13 +298,13 @@ onBeforeUnmount(() => {
|
|||||||
<div class="surface-card rounded-3xl p-5">
|
<div class="surface-card rounded-3xl p-5">
|
||||||
<div class="flex flex-wrap items-center justify-between gap-2">
|
<div class="flex flex-wrap items-center justify-between gap-2">
|
||||||
<h2 class="text-xl font-bold text-[#123824]">Карточка контрагента</h2>
|
<h2 class="text-xl font-bold text-[#123824]">Карточка контрагента</h2>
|
||||||
<span class="badge" :class="profileIsComplete ? 'badge-success' : 'badge-warning'">
|
<p class="text-sm font-semibold text-[#355947]">
|
||||||
{{ profileIsComplete ? 'Заполнена' : 'Не заполнена' }}
|
{{ profileIsComplete ? 'Заполнено' : 'Заполнить' }}
|
||||||
</span>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4 grid gap-4 xl:grid-cols-3">
|
<div class="mt-4 space-y-4">
|
||||||
<div class="rounded-2xl border border-base-300 bg-base-100 p-4">
|
<section>
|
||||||
<h3 class="mb-3 text-base font-bold">1. Контрагент (Dadata)</h3>
|
<h3 class="mb-3 text-base font-bold">1. Контрагент (Dadata)</h3>
|
||||||
|
|
||||||
<div ref="partyDropdownRef" class="relative">
|
<div ref="partyDropdownRef" class="relative">
|
||||||
@@ -372,9 +372,11 @@ onBeforeUnmount(() => {
|
|||||||
<legend class="fieldset-legend">Юридический адрес</legend>
|
<legend class="fieldset-legend">Юридический адрес</legend>
|
||||||
<textarea v-model="counterpartyForm.legalAddress" class="textarea textarea-bordered min-h-24 w-full" />
|
<textarea v-model="counterpartyForm.legalAddress" class="textarea textarea-bordered min-h-24 w-full" />
|
||||||
</fieldset>
|
</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>
|
<h3 class="mb-3 text-base font-bold">2. Банк (Dadata)</h3>
|
||||||
|
|
||||||
<div ref="bankDropdownRef" class="relative">
|
<div ref="bankDropdownRef" class="relative">
|
||||||
@@ -432,9 +434,11 @@ onBeforeUnmount(() => {
|
|||||||
<legend class="fieldset-legend">Расчетный счет</legend>
|
<legend class="fieldset-legend">Расчетный счет</legend>
|
||||||
<input v-model="counterpartyForm.checkingAccount" type="text" class="input input-bordered w-full" >
|
<input v-model="counterpartyForm.checkingAccount" type="text" class="input input-bordered w-full" >
|
||||||
</fieldset>
|
</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>
|
<h3 class="mb-3 text-base font-bold">3. Подписант и основание</h3>
|
||||||
|
|
||||||
<fieldset class="fieldset">
|
<fieldset class="fieldset">
|
||||||
@@ -457,24 +461,16 @@ onBeforeUnmount(() => {
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<button class="btn btn-primary mt-4 w-full" :disabled="saveCounterpartyMutation.loading.value || !profileIsComplete" @click="saveCounterpartyProfile">
|
<button class="btn btn-primary mt-4 w-full" :disabled="saveCounterpartyMutation.loading.value || !profileIsComplete" @click="saveCounterpartyProfile">
|
||||||
{{ saveCounterpartyMutation.loading.value ? 'Сохраняем…' : 'Сохранить карточку' }}
|
{{ saveCounterpartyMutation.loading.value ? 'Сохраняем…' : 'Сохранить' }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<p v-if="profileUpdatedAt" class="mt-2 text-xs opacity-70">Обновлено: {{ new Date(profileUpdatedAt).toLocaleString() }}</p>
|
<p v-if="profileUpdatedAt" class="mt-2 text-xs opacity-70">Обновлено: {{ new Date(profileUpdatedAt).toLocaleString() }}</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="profileFeedback" class="alert mt-4" :class="profileFeedbackTone === 'success' ? 'alert-success' : 'alert-error'">
|
<div v-if="profileFeedback" class="alert mt-4" :class="profileFeedbackTone === 'success' ? 'alert-success' : 'alert-error'">
|
||||||
{{ profileFeedback }}
|
{{ profileFeedback }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="alert mt-4" :class="profileIsComplete ? 'alert-success' : 'alert-warning'">
|
|
||||||
{{
|
|
||||||
profileIsComplete
|
|
||||||
? 'Карточка контрагента заполнена. Оформление заявки в корзине доступно.'
|
|
||||||
: 'Пока карточка не заполнена полностью, оформление заявки в корзине будет заблокировано.'
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside class="surface-card rounded-3xl p-5">
|
<aside class="surface-card rounded-3xl p-5">
|
||||||
|
|||||||
Reference in New Issue
Block a user