color update
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
|
||||
import formatPhone from '@/shared/lib/formatPhone';
|
||||
import { Button } from '@/shared/ui/button';
|
||||
import { Form, FormControl, FormField, FormItem } from '@/shared/ui/form';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@/shared/ui/form';
|
||||
import { Input } from '@/shared/ui/input';
|
||||
import { Label } from '@/shared/ui/label';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
@@ -45,7 +51,7 @@ const OrderPage = () => {
|
||||
lastName: '',
|
||||
lat: '',
|
||||
long: '',
|
||||
phone: '',
|
||||
phone: '+998',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -130,7 +136,7 @@ const OrderPage = () => {
|
||||
) => {
|
||||
const [lat, lon] = e.get('coords');
|
||||
|
||||
setCoords({ latitude: lat, longitude: lon, zoom: 14 });
|
||||
setCoords({ latitude: lat, longitude: lon, zoom: 18 });
|
||||
|
||||
form.setValue('lat', lat.toString(), { shouldDirty: true });
|
||||
form.setValue('long', lon.toString(), { shouldDirty: true });
|
||||
@@ -192,7 +198,7 @@ const OrderPage = () => {
|
||||
|
||||
if (orderSuccess) {
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50 flex items-center justify-center p-4">
|
||||
<div className="flex justify-center items-center h-screen">
|
||||
<div className="bg-white rounded-lg shadow-lg p-8 max-w-md w-full text-center">
|
||||
<div className="w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<CheckCircle2 className="w-12 h-12 text-green-600" />
|
||||
@@ -227,8 +233,8 @@ const OrderPage = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50 py-8">
|
||||
<div className="max-w-7xl mx-auto px-4">
|
||||
<div className="custom-container mb-5">
|
||||
<>
|
||||
{/* Header */}
|
||||
<div className="mb-6">
|
||||
<h1 className="text-3xl font-bold text-gray-800 mb-2">
|
||||
@@ -254,8 +260,8 @@ const OrderPage = () => {
|
||||
control={form.control}
|
||||
name="firstName"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<Label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
<FormItem className="flex justify-start flex-col">
|
||||
<Label className="block text-sm font-medium text-gray-700">
|
||||
{'Ism'}
|
||||
</Label>
|
||||
<FormControl>
|
||||
@@ -265,6 +271,7 @@ const OrderPage = () => {
|
||||
placeholder="Ismingiz"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
@@ -273,8 +280,8 @@ const OrderPage = () => {
|
||||
control={form.control}
|
||||
name="lastName"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<Label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
<FormItem className="flex justify-start flex-col">
|
||||
<Label className="block text-sm font-medium text-gray-700">
|
||||
{'Familiya'}
|
||||
</Label>
|
||||
<FormControl>
|
||||
@@ -284,6 +291,7 @@ const OrderPage = () => {
|
||||
placeholder="Familiyangiz"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
@@ -293,7 +301,7 @@ const OrderPage = () => {
|
||||
name="phone"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<Label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
<Label className="block text-sm font-medium text-gray-700">
|
||||
Telefon raqam
|
||||
</Label>
|
||||
<FormControl>
|
||||
@@ -302,11 +310,11 @@ const OrderPage = () => {
|
||||
value={formatPhone(field.value ?? '')}
|
||||
onChange={(e) => field.onChange(e.target.value)}
|
||||
type="tel"
|
||||
required
|
||||
className="w-full h-12 border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:border-blue-500"
|
||||
placeholder="+998 90 123 45 67"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
@@ -338,6 +346,7 @@ const OrderPage = () => {
|
||||
placeholder="Toshkent"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
@@ -604,7 +613,7 @@ const OrderPage = () => {
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -252,26 +252,6 @@ const ProductDetail = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Supplier/Agency Information Section */}
|
||||
<div className="border border-gray-200 rounded-lg mb-4 bg-gradient-to-r from-blue-50 to-indigo-50">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-fit h-full rounded-lg overflow-hidden">
|
||||
<Image
|
||||
src={product.supplier.logo || '/placeholder.svg'}
|
||||
alt={product.supplier.name}
|
||||
width={60}
|
||||
height={60}
|
||||
className="w-full h-full object-contain p-2"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h4 className="font-bold text-gray-800 text-lg mb-1 line-clamp-1">
|
||||
{product.supplier.name}
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Quantity Selector */}
|
||||
<div className="mb-6">
|
||||
<label className="text-gray-700 font-medium mb-2 block">
|
||||
@@ -310,9 +290,9 @@ const ProductDetail = () => {
|
||||
<button
|
||||
onClick={addToCart}
|
||||
disabled={!product.inStock}
|
||||
className={`flex-1 py-4 rounded-lg font-semibold text-white flex items-center justify-center gap-2 transition ${
|
||||
className={`flex-1 py-4 rounded-lg cursor-pointer font-semibold text-white flex items-center justify-center gap-2 transition ${
|
||||
product.inStock
|
||||
? 'bg-blue-600 hover:bg-blue-700'
|
||||
? 'bg-green-600 hover:bg-green-700'
|
||||
: 'bg-gray-400 cursor-not-allowed'
|
||||
}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user