feat(app): rial wage total on cart lines, split cart totals, back button on every header; admin variant modal responsive
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
6514b05d18
commit
09ff2a9c9b
@@ -1551,4 +1551,26 @@ onMounted(async () => {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Variant modal on narrow screens: one column, full width, scrollable body. */
|
||||
@media (max-width: 767px) {
|
||||
.pf-variant-modal .ant-modal {
|
||||
max-width: calc(100vw - 16px);
|
||||
width: calc(100vw - 16px) !important;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.vmodal-cols {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.vmodal-form {
|
||||
max-height: calc(100vh - 190px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
.vmodal-grid--2 {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.vmodal-picker {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
<span v-if="rialWage > 0" class="ci__wage">اجرت ریالی {{ price(rialWage) }} ریال</span>
|
||||
</div>
|
||||
|
||||
<p v-if="rialWage > 0 && value.qty > 1" class="ci__rialTotal">
|
||||
جمع اجرت {{ price(rialWage * value.qty) }} ریال
|
||||
</p>
|
||||
|
||||
<div class="ci__row">
|
||||
<!-- App-wide stepper order rule (also followed by SingleProduct.vue's
|
||||
.pd__qty): plus on the visual right, minus (or trash at qty 1) on
|
||||
@@ -196,6 +200,13 @@ html.theme-dark .ci__art img {
|
||||
border-inline-start: 1px solid @hairline;
|
||||
}
|
||||
|
||||
.ci__rialTotal {
|
||||
margin: 5px 0 0;
|
||||
font-size: 11.5px;
|
||||
font-weight: 700;
|
||||
color: @wine;
|
||||
}
|
||||
|
||||
.ci__row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="cart">
|
||||
<PageBar title="سبد خرید" :back="false" />
|
||||
<PageBar title="سبد خرید" back-to="home" />
|
||||
|
||||
<Spinner :spinning="cartData.loadingPage" tip="درحال دریافت اطلاعات">
|
||||
<container class="cart__body">
|
||||
@@ -79,15 +79,21 @@
|
||||
<!-- Sticky summary + submit -->
|
||||
<div v-if="cart.items.length > 0 && cartData.step === 1" class="cart__bar">
|
||||
<div class="cart__barInner">
|
||||
<div class="cart__total">
|
||||
<span class="cart__totalLabel">جمع وزن</span>
|
||||
<span class="cart__totalValue">
|
||||
{{ cart.total() }}
|
||||
<i>گرم</i>
|
||||
</span>
|
||||
<span v-if="cart.totalRial() > 0" class="cart__totalRial">
|
||||
+ اجرت ریالی {{ price(cart.totalRial()) }} <i>ریال</i>
|
||||
</span>
|
||||
<div class="cart__totals">
|
||||
<div class="cart__total">
|
||||
<span class="cart__totalLabel">جمع وزن</span>
|
||||
<span class="cart__totalValue">
|
||||
{{ cart.total() }}
|
||||
<i>گرم</i>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="cart.totalRial() > 0" class="cart__total">
|
||||
<span class="cart__totalLabel">جمع اجرت ریالی</span>
|
||||
<span class="cart__totalValue">
|
||||
{{ price(cart.totalRial()) }}
|
||||
<i>ریال</i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="cart__submit" @click="cartData.notify = true">ثبت نهایی سفارش</button>
|
||||
</div>
|
||||
@@ -429,6 +435,12 @@ onMounted(async () => {
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.cart__totals {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 22px;
|
||||
}
|
||||
|
||||
.cart__total {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -445,16 +457,6 @@ onMounted(async () => {
|
||||
font-weight: 800;
|
||||
color: @ink;
|
||||
}
|
||||
.cart__totalRial {
|
||||
font-size: 11.5px;
|
||||
font-weight: 700;
|
||||
color: @inkSoft;
|
||||
}
|
||||
.cart__totalRial i {
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
color: @inkFaint;
|
||||
}
|
||||
.cart__totalValue i {
|
||||
font-style: normal;
|
||||
font-size: 11px;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="search">
|
||||
<PageBar title="جستجو" :back="false">
|
||||
<PageBar title="جستجو" back-to="home">
|
||||
<template #below>
|
||||
<div class="search__barExtra">
|
||||
<SearchInput @search="search" place-holder="جستجوی دسته بندی، محصولات و ..." />
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="dash">
|
||||
<PageBar title="میز کار" :back="false">
|
||||
<PageBar title="میز کار" back-to="home">
|
||||
<template #trailing>
|
||||
<button
|
||||
v-if="session.isLoggedIn"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="ord">
|
||||
<PageBar title="سفارشات" :back="false">
|
||||
<PageBar title="سفارشات" back-to="home">
|
||||
<template #below>
|
||||
<div class="ord__barExtra">
|
||||
<SearchInput @search="readSearch" place-holder="جستجوی شماره سفارش" />
|
||||
|
||||
Reference in New Issue
Block a user