pyment_type status uodate

This commit is contained in:
Samandar Turgunboyev
2026-02-09 18:10:13 +05:00
parent 5e1430adf6
commit 8abd0e448b

View File

@@ -20,7 +20,6 @@ import { ProductCard } from '@/widgets/categories/ui/product-card';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { AxiosError } from 'axios'; import { AxiosError } from 'axios';
import { import {
Banknote,
ChevronLeft, ChevronLeft,
ChevronRight, ChevronRight,
Heart, Heart,
@@ -288,17 +287,11 @@ const ProductDetail = () => {
<p className="text-gray-600 mb-6">{data?.short_name}</p> <p className="text-gray-600 mb-6">{data?.short_name}</p>
{/* IMPROVED UPDATED_AT WARNING */} {/* IMPROVED UPDATED_AT WARNING */}
{data?.updated_at && ( {data?.updated_at && data.payment_type === 'cash' && (
<div className="bg-yellow-50 border-2 border-yellow-500 text-yellow-900 p-4 mb-6 rounded-lg shadow-sm"> <div className="bg-yellow-50 border border-yellow-400 text-yellow-800 p-3 mb-4 rounded-md">
<p className="text-base font-bold mb-2 flex items-center gap-2"> <p className="text-xs font-medium">
<span className="text-yellow-600"></span> {t("Narxi o'zgargan bo'lishi mumkin")} {t('Yangilangan')}:{' '}
{t("Diqqat! Mahsulot narxi o'zgargan bo'lishi mumkin")}
</p>
<p className="text-sm font-medium text-gray-700">
{t("So'nggi yangilanish:")}{' '}
<span className="font-semibold text-gray-900">
{formatDate.format(data.updated_at, 'DD-MM-YYYY')} {formatDate.format(data.updated_at, 'DD-MM-YYYY')}
</span>
</p> </p>
</div> </div>
)} )}
@@ -356,12 +349,7 @@ const ProductDetail = () => {
/> />
</button> </button>
</div> </div>
<div <div className={cn('grid gap-4 mt-6 border-t pt-4', 'grid-cols-2')}>
className={cn(
'grid gap-4 mt-6 border-t pt-4',
data?.payment_type ? 'grid-cols-3' : 'grid-cols-2',
)}
>
<div className="text-center"> <div className="text-center">
<Truck className="mx-auto mb-1" /> <Truck className="mx-auto mb-1" />
{t('Bepul yetkazib berish')} {t('Bepul yetkazib berish')}
@@ -370,7 +358,7 @@ const ProductDetail = () => {
<Shield className="mx-auto mb-1" /> <Shield className="mx-auto mb-1" />
{t('Kafolat')} {t('Kafolat')}
</div> </div>
{data?.payment_type && ( {/* {data?.payment_type && (
<div className="text-center"> <div className="text-center">
<Banknote className="mx-auto mb-1" size={28} /> <Banknote className="mx-auto mb-1" size={28} />
@@ -378,7 +366,7 @@ const ProductDetail = () => {
? t('Naqd bilan olinadi') ? t('Naqd bilan olinadi')
: t("Pul o'tkazish yo'li bilan olinadi")} : t("Pul o'tkazish yo'li bilan olinadi")}
</div> </div>
)} )} */}
</div> </div>
</div> </div>
</div> </div>