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