feat(refill): map refill state in cartStore, clarify free loyalty 5% discount UX, and render Refill badges across full app and admin
This commit is contained in:
1 parent
24c361c4ff
commit
b5650c4cbb
7 files changed
+92
-11
No files matched your search
@@ -275,9 +275,9 @@ export default function CartDrawer({ isOpen, onClose, onCheckout, onShopNavigate
|
||||
<ShieldCheck className="w-6 h-6" />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h5 className="text-xs font-black text-medical-gray-900">فعالسازی سرویس تمدید خودکار (Refill)</h5>
|
||||
<p className="text-[10px] text-canina-blue font-black mt-0.5">۵٪ تخفیف روی تمام فاکتور + ارسال اولویتدار</p>
|
||||
<p className="text-[9px] text-medical-gray-400 font-bold mt-1">ویژه اعضا - محاسبه هوشمند دوره مصرف و یادآوری پیامکی قبل از اتمام</p>
|
||||
<h5 className="text-xs font-black text-medical-gray-900">سرویس وفاداری تمدید خودکار (Refill)</h5>
|
||||
<p className="text-[10px] text-canina-blue font-black mt-0.5">۵٪ تخفیف ویژه روی کل فاکتور + ارسال اولویتدار</p>
|
||||
<p className="text-[9px] text-medical-gray-500 font-bold mt-1">برنامه رایگان وفاداری - بدون هیچ هزینه اضافی؛ یادآوری و تمدید هوشمند قبل از اتمام مکمل پت شما</p>
|
||||
</div>
|
||||
<div className={`w-5 h-5 rounded-full border-2 flex items-center justify-center ${isSubscribed ? 'bg-canina-blue border-canina-blue' : 'border-medical-gray-200'}`}>
|
||||
{isSubscribed && <X className="w-3 h-3 text-white" />}
|
||||
|
||||
@@ -91,6 +91,16 @@ export default function OrderSuccess({ orderId }: { orderId: string }) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{order.isRefill && (
|
||||
<div className="p-6 bg-green-50 border border-green-200 rounded-3xl mb-12 text-right flex items-center justify-between">
|
||||
<div>
|
||||
<h5 className="font-black text-green-800 text-sm italic">سرویس تمدید خودکار (Refill) با ۵٪ تخفیف روی این سفارش فعال شد</h5>
|
||||
<p className="text-xs text-green-700 font-bold mt-1">قبل از اتمام مکمل، یادآوری و ارسال بعدی به صورت هوشمند برای شما هماهنگ خواهد شد.</p>
|
||||
</div>
|
||||
<span className="px-3 py-1 bg-green-600 text-white font-black text-xs rounded-full shrink-0">۵٪ تخفیف اعمال شد</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="space-y-4">
|
||||
<button
|
||||
onClick={() => router.push('/track')}
|
||||
|
||||
@@ -364,6 +364,11 @@ export default function UserDashboard() {
|
||||
<div className="text-left">
|
||||
<div className="text-lg font-black text-medical-gray-900 italic">{toPersian(order.total.toLocaleString())} <span className="text-xs">تومان</span></div>
|
||||
<div className="flex items-center gap-2 justify-end mt-1">
|
||||
{order.isRefill && (
|
||||
<span className="text-[9px] font-black px-2 py-0.5 rounded-full bg-emerald-50 text-emerald-600 border border-emerald-100">
|
||||
تمدید خودکار ۵٪-
|
||||
</span>
|
||||
)}
|
||||
<span className={`text-[9px] font-black px-2.5 py-0.5 rounded-full uppercase tracking-tighter ${order.status === 'delivered' ? 'bg-green-50 text-green-600' : order.status === 'shipped' ? 'bg-blue-50 text-blue-600' : 'bg-amber-50 text-amber-600'}`}>
|
||||
{order.status === 'delivered' ? 'تحویل شده' : order.status === 'shipped' ? 'ارسال شده' : 'در حال پردازش'}
|
||||
</span>
|
||||
|
||||
Reference in new issue
Block a user