Align checkout section order
This commit is contained in:
@@ -18,9 +18,6 @@ const {
|
||||
items: cartItems,
|
||||
fetchCart,
|
||||
selectedDeliveryAddressId,
|
||||
totalPositions,
|
||||
totalItems,
|
||||
totalVolume,
|
||||
incrementQuantity,
|
||||
decrementQuantity,
|
||||
removeProduct,
|
||||
@@ -148,8 +145,32 @@ async function submitCart() {
|
||||
<NuxtLink to="/profile/counterparty" class="link link-hover font-semibold">профиле</NuxtLink>.
|
||||
</div>
|
||||
|
||||
<h2 class="text-xl font-bold text-[#123824]">Состав заказа</h2>
|
||||
|
||||
<div v-if="cartItems.length === 0" class="alert surface-card">
|
||||
Корзина пока пустая. Добавьте товар из каталога.
|
||||
</div>
|
||||
|
||||
<OrdersOrderItemsTable
|
||||
v-else
|
||||
mode="cart"
|
||||
:framed="false"
|
||||
:items="cartItems.map((item) => ({
|
||||
id: item.productId,
|
||||
productName: item.productName,
|
||||
sku: item.sku,
|
||||
quantity: item.quantity,
|
||||
parameters: item.parameters,
|
||||
unitPrice: null,
|
||||
lineTotal: null,
|
||||
}))"
|
||||
@increment="increment"
|
||||
@decrement="decrement"
|
||||
@remove="removeFromCart"
|
||||
/>
|
||||
|
||||
<div class="surface-card rounded-3xl p-4 md:p-5">
|
||||
<h2 class="text-lg font-bold text-[#123824]">Адрес доставки</h2>
|
||||
<h2 class="text-lg font-bold text-[#123824]">Информация о доставке</h2>
|
||||
|
||||
<div v-if="deliveryAddressesQuery.loading.value" class="alert mt-3 surface-card">
|
||||
Загружаем адреса...
|
||||
@@ -182,47 +203,6 @@ async function submitCart() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="text-xl font-bold text-[#123824]">Позиции</h2>
|
||||
|
||||
<div v-if="cartItems.length === 0" class="alert surface-card">
|
||||
Корзина пока пустая. Добавьте товар из каталога.
|
||||
</div>
|
||||
|
||||
<OrdersOrderItemsTable
|
||||
v-else
|
||||
mode="cart"
|
||||
:framed="false"
|
||||
:items="cartItems.map((item) => ({
|
||||
id: item.productId,
|
||||
productName: item.productName,
|
||||
sku: item.sku,
|
||||
quantity: item.quantity,
|
||||
parameters: item.parameters,
|
||||
unitPrice: null,
|
||||
lineTotal: null,
|
||||
}))"
|
||||
@increment="increment"
|
||||
@decrement="decrement"
|
||||
@remove="removeFromCart"
|
||||
/>
|
||||
|
||||
<div class="divider my-1" />
|
||||
|
||||
<div class="space-y-2 text-sm text-[#214735]">
|
||||
<div class="flex items-center justify-between">
|
||||
<span>Позиций</span>
|
||||
<span class="font-semibold">{{ totalPositions }}</span>
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<span>Количество, шт.</span>
|
||||
<span class="font-semibold">{{ totalItems }}</span>
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<span>Суммарный объем</span>
|
||||
<span class="font-semibold">{{ totalVolume }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="btn w-full bg-[#139957] text-white hover:bg-[#0d854a]"
|
||||
:disabled="sending || counterpartyLoading || !isCounterpartyComplete || !selectedDeliveryAddressId || cartItems.length === 0"
|
||||
|
||||
Reference in New Issue
Block a user