film detail update
This commit is contained in:
@@ -51,7 +51,7 @@ export interface PlanListData {
|
||||
}
|
||||
|
||||
export interface PlanCreateReq {
|
||||
// title: string;
|
||||
title?: string;
|
||||
description: string;
|
||||
date: string;
|
||||
user_id: number;
|
||||
@@ -63,7 +63,7 @@ export interface PlanCreateReq {
|
||||
}
|
||||
|
||||
export interface PlanUpdateReq {
|
||||
// title: string;
|
||||
title?: string;
|
||||
description: string;
|
||||
date: string;
|
||||
longitude: number;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import z from "zod";
|
||||
|
||||
export const createPlanFormData = z.object({
|
||||
// name: z.string().min(1, { message: "Majburiy maydon" }),
|
||||
name: z.string().optional(),
|
||||
description: z.string().min(1, { message: "Majburiy maydon" }),
|
||||
user: z.string().min(1, { message: "Majburiy maydon" }),
|
||||
date: z.string().min(1, { message: "Majburiy maydon" }),
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from "@/shared/ui/form";
|
||||
import { Input } from "@/shared/ui/input";
|
||||
import { Label } from "@/shared/ui/label";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from "@/shared/ui/popover";
|
||||
import { Textarea } from "@/shared/ui/textarea";
|
||||
@@ -173,13 +174,15 @@ const AddedPlan = ({ initialValues, setDialogOpen }: Props) => {
|
||||
body: {
|
||||
date: formatDate.format(data.date, "YYYY-MM-DD"),
|
||||
description: data.description,
|
||||
...(data.name && {
|
||||
title: data.name,
|
||||
}),
|
||||
extra_location: {
|
||||
latitude: initialValues.latitude,
|
||||
longitude: initialValues.longitude,
|
||||
},
|
||||
latitude: initialValues.latitude,
|
||||
longitude: initialValues.longitude,
|
||||
// title: data.name,
|
||||
},
|
||||
id: initialValues.id,
|
||||
});
|
||||
@@ -193,7 +196,9 @@ const AddedPlan = ({ initialValues, setDialogOpen }: Props) => {
|
||||
},
|
||||
latitude: lat,
|
||||
longitude: long,
|
||||
// title: data.name,
|
||||
...(data.name && {
|
||||
title: data.name,
|
||||
}),
|
||||
doctor_id: data.doctor_id ? Number(data.doctor_id) : null,
|
||||
pharmacy_id: data.pharmacy_id ? Number(data.pharmacy_id) : null,
|
||||
user_id: Number(data.user),
|
||||
@@ -498,7 +503,7 @@ const AddedPlan = ({ initialValues, setDialogOpen }: Props) => {
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* <FormField
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name"
|
||||
render={({ field }) => (
|
||||
@@ -514,7 +519,7 @@ const AddedPlan = ({ initialValues, setDialogOpen }: Props) => {
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/> */}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
Reference in New Issue
Block a user