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%;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -32,6 +32,10 @@
|
|||||||
<span v-if="rialWage > 0" class="ci__wage">اجرت ریالی {{ price(rialWage) }} ریال</span>
|
<span v-if="rialWage > 0" class="ci__wage">اجرت ریالی {{ price(rialWage) }} ریال</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p v-if="rialWage > 0 && value.qty > 1" class="ci__rialTotal">
|
||||||
|
جمع اجرت {{ price(rialWage * value.qty) }} ریال
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="ci__row">
|
<div class="ci__row">
|
||||||
<!-- App-wide stepper order rule (also followed by SingleProduct.vue's
|
<!-- 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
|
.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;
|
border-inline-start: 1px solid @hairline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ci__rialTotal {
|
||||||
|
margin: 5px 0 0;
|
||||||
|
font-size: 11.5px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: @wine;
|
||||||
|
}
|
||||||
|
|
||||||
.ci__row {
|
.ci__row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="cart">
|
<div class="cart">
|
||||||
<PageBar title="سبد خرید" :back="false" />
|
<PageBar title="سبد خرید" back-to="home" />
|
||||||
|
|
||||||
<Spinner :spinning="cartData.loadingPage" tip="درحال دریافت اطلاعات">
|
<Spinner :spinning="cartData.loadingPage" tip="درحال دریافت اطلاعات">
|
||||||
<container class="cart__body">
|
<container class="cart__body">
|
||||||
@@ -79,15 +79,21 @@
|
|||||||
<!-- Sticky summary + submit -->
|
<!-- Sticky summary + submit -->
|
||||||
<div v-if="cart.items.length > 0 && cartData.step === 1" class="cart__bar">
|
<div v-if="cart.items.length > 0 && cartData.step === 1" class="cart__bar">
|
||||||
<div class="cart__barInner">
|
<div class="cart__barInner">
|
||||||
<div class="cart__total">
|
<div class="cart__totals">
|
||||||
<span class="cart__totalLabel">جمع وزن</span>
|
<div class="cart__total">
|
||||||
<span class="cart__totalValue">
|
<span class="cart__totalLabel">جمع وزن</span>
|
||||||
{{ cart.total() }}
|
<span class="cart__totalValue">
|
||||||
<i>گرم</i>
|
{{ cart.total() }}
|
||||||
</span>
|
<i>گرم</i>
|
||||||
<span v-if="cart.totalRial() > 0" class="cart__totalRial">
|
</span>
|
||||||
+ اجرت ریالی {{ price(cart.totalRial()) }} <i>ریال</i>
|
</div>
|
||||||
</span>
|
<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>
|
</div>
|
||||||
<button type="button" class="cart__submit" @click="cartData.notify = true">ثبت نهایی سفارش</button>
|
<button type="button" class="cart__submit" @click="cartData.notify = true">ثبت نهایی سفارش</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -429,6 +435,12 @@ onMounted(async () => {
|
|||||||
gap: 14px;
|
gap: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cart__totals {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
.cart__total {
|
.cart__total {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -445,16 +457,6 @@ onMounted(async () => {
|
|||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
color: @ink;
|
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 {
|
.cart__totalValue i {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<PageBar title="جستجو" :back="false">
|
<PageBar title="جستجو" back-to="home">
|
||||||
<template #below>
|
<template #below>
|
||||||
<div class="search__barExtra">
|
<div class="search__barExtra">
|
||||||
<SearchInput @search="search" place-holder="جستجوی دسته بندی، محصولات و ..." />
|
<SearchInput @search="search" place-holder="جستجوی دسته بندی، محصولات و ..." />
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="dash">
|
<div class="dash">
|
||||||
<PageBar title="میز کار" :back="false">
|
<PageBar title="میز کار" back-to="home">
|
||||||
<template #trailing>
|
<template #trailing>
|
||||||
<button
|
<button
|
||||||
v-if="session.isLoggedIn"
|
v-if="session.isLoggedIn"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="ord">
|
<div class="ord">
|
||||||
<PageBar title="سفارشات" :back="false">
|
<PageBar title="سفارشات" back-to="home">
|
||||||
<template #below>
|
<template #below>
|
||||||
<div class="ord__barExtra">
|
<div class="ord__barExtra">
|
||||||
<SearchInput @search="readSearch" place-holder="جستجوی شماره سفارش" />
|
<SearchInput @search="readSearch" place-holder="جستجوی شماره سفارش" />
|
||||||
|
|||||||
Reference in New Issue
Block a user