api testing
This commit is contained in:
@@ -57,11 +57,10 @@ const OrderPage = () => {
|
||||
const form = useForm<z.infer<typeof orderForm>>({
|
||||
resolver: zodResolver(orderForm),
|
||||
defaultValues: {
|
||||
firstName: '',
|
||||
username: '',
|
||||
comment: '',
|
||||
lastName: '',
|
||||
lat: '',
|
||||
long: '',
|
||||
lat: '41.311081',
|
||||
long: '69.240562',
|
||||
phone: '+998',
|
||||
},
|
||||
});
|
||||
@@ -232,9 +231,11 @@ const OrderPage = () => {
|
||||
comment: value.comment,
|
||||
contact_number: onlyNumber(value.phone),
|
||||
delivery_type: deliveryMethod,
|
||||
name: value.firstName + ' ' + value.lastName,
|
||||
name: value.username,
|
||||
payment_type: paymentMethod,
|
||||
items: items,
|
||||
long: Number(value.long),
|
||||
lat: Number(value.lat),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -288,37 +289,17 @@ const OrderPage = () => {
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="firstName"
|
||||
name="username"
|
||||
render={({ field }) => (
|
||||
<FormItem className="flex justify-start flex-col">
|
||||
<Label className="block text-sm font-medium text-gray-700">
|
||||
{t('Ism')}
|
||||
{t('Ism Familiya')}
|
||||
</Label>
|
||||
<FormControl>
|
||||
<Input
|
||||
{...field}
|
||||
className="w-full border h-12 border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:border-blue-500"
|
||||
placeholder={t('Ismingiz')}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="lastName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="flex justify-start flex-col">
|
||||
<Label className="block text-sm font-medium text-gray-700">
|
||||
{t('Familiya')}
|
||||
</Label>
|
||||
<FormControl>
|
||||
<Input
|
||||
{...field}
|
||||
className="w-full border h-12 border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:border-blue-500"
|
||||
placeholder={t('Familiyangiz')}
|
||||
placeholder={t('Ism Familiyangiz')}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
|
||||
Reference in New Issue
Block a user