task update
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
Banknote,
|
||||
Calendar,
|
||||
FileText,
|
||||
List,
|
||||
Loader2,
|
||||
MapPinCheck,
|
||||
MapPinHouse,
|
||||
@@ -46,14 +45,14 @@ const navItems: NavItem[] = [
|
||||
description: "Hujjatlar",
|
||||
featured: true,
|
||||
},
|
||||
{
|
||||
id: "tour_plan",
|
||||
title: "Tur plan",
|
||||
link: "/tour-plan",
|
||||
icon: <List className="w-6 h-6" />,
|
||||
description: "Rejalar",
|
||||
featured: true,
|
||||
},
|
||||
// {
|
||||
// id: "tour_plan",
|
||||
// title: "Tur plan",
|
||||
// link: "/tour-plan",
|
||||
// icon: <List className="w-6 h-6" />,
|
||||
// description: "Rejalar",
|
||||
// featured: true,
|
||||
// },
|
||||
];
|
||||
|
||||
export default function Home() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
export interface CreatePharmacyReq {
|
||||
name: string;
|
||||
inn: string;
|
||||
inn?: string;
|
||||
owner_phone: string;
|
||||
responsible_phone: string;
|
||||
responsible_phone?: string;
|
||||
district_id: number;
|
||||
place_id: number;
|
||||
longitude: number;
|
||||
|
||||
@@ -12,9 +12,9 @@ export const objectForm = z.object({
|
||||
}),
|
||||
latitude: z.number({ error: "Majburiy maydon" }),
|
||||
longitude: z.number({ error: "Majburiy maydon" }),
|
||||
inn: z.string().min(1, { message: "Majburiy maydon" }),
|
||||
inn: z.string().optional(),
|
||||
phoneDirector: z.string().min(17, { message: "Majburiy maydon" }),
|
||||
phonePharmacy: z.string().min(17, { message: "Majburiy maydon" }),
|
||||
phonePharmacy: z.string().optional(),
|
||||
nearbyCoords: z
|
||||
.array(
|
||||
z.object({
|
||||
|
||||
@@ -218,13 +218,15 @@ const CreatePharmacy = () => {
|
||||
latitude: values.latitude,
|
||||
longitude: values.longitude,
|
||||
},
|
||||
inn: values.inn,
|
||||
...(values.inn && { inn: values.inn }),
|
||||
latitude: values.latitude,
|
||||
longitude: values.longitude,
|
||||
name: values.name,
|
||||
owner_phone: onlyNumber(values.phoneDirector),
|
||||
place_id: Number(values.streets),
|
||||
...(values.phonePharmacy && {
|
||||
responsible_phone: onlyNumber(values.phonePharmacy),
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface CreatePlansReq {
|
||||
title: string;
|
||||
// title: string;
|
||||
description: string;
|
||||
date: string; // "2025-12-05";
|
||||
doctor_id: number | null;
|
||||
|
||||
@@ -111,7 +111,7 @@ export function PlanDetailsDialog({
|
||||
</div>
|
||||
|
||||
{/* Title */}
|
||||
<div className="space-y-1">
|
||||
{/* <div className="space-y-1">
|
||||
<p className="text-sm text-muted-foreground">Sarlavha</p>
|
||||
<p
|
||||
className={clsx(
|
||||
@@ -121,14 +121,14 @@ export function PlanDetailsDialog({
|
||||
>
|
||||
{task.title}
|
||||
</p>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
{/* Description */}
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm text-muted-foreground">Tavsifi</p>
|
||||
<p
|
||||
className={clsx(
|
||||
"text-base leading-relaxed",
|
||||
"text-lg font-semibold",
|
||||
task.comment ? "text-green-500" : "text-foreground",
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -36,7 +36,7 @@ import z from "zod";
|
||||
import { plans_api } from "../lib/api";
|
||||
|
||||
const plansForm = z.object({
|
||||
title: z.string().min(1, "Sarlavha kiritish majburiy"),
|
||||
// title: z.string().min(1, "Sarlavha kiritish majburiy"),
|
||||
description: z.string().min(1, "Tavsif kiritish majburiy"),
|
||||
date: z.string().optional(),
|
||||
});
|
||||
@@ -71,7 +71,7 @@ export const AddPlans = ({
|
||||
const form = useForm<z.infer<typeof plansForm>>({
|
||||
resolver: zodResolver(plansForm),
|
||||
defaultValues: {
|
||||
title: "",
|
||||
// title: "",
|
||||
description: "",
|
||||
date: formatDate.format(new Date(), "YYYY-MM-DD"),
|
||||
},
|
||||
@@ -166,7 +166,7 @@ export const AddPlans = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (taskEdit) {
|
||||
form.setValue("title", taskEdit.title);
|
||||
// form.setValue("title", taskEdit.title);
|
||||
form.setValue("description", taskEdit.description);
|
||||
form.setValue("date", taskEdit.date);
|
||||
}
|
||||
@@ -221,7 +221,7 @@ export const AddPlans = ({
|
||||
: pharmId
|
||||
? pharmId.longitude
|
||||
: 63.123,
|
||||
title: values.title,
|
||||
// title: values.title,
|
||||
},
|
||||
id: taskEdit.id,
|
||||
});
|
||||
@@ -253,7 +253,7 @@ export const AddPlans = ({
|
||||
: pharmId
|
||||
? pharmId.longitude
|
||||
: 63.123,
|
||||
title: values.title,
|
||||
// title: values.title,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -368,19 +368,7 @@ export const AddPlans = ({
|
||||
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="title"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Sarlavha</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder="Sarlavha" {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
{/* Z */}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="description"
|
||||
|
||||
@@ -203,24 +203,22 @@ export default function Plans() {
|
||||
>
|
||||
<div className="flex gap-3">
|
||||
<div className="flex-1 flex flex-col">
|
||||
<h3
|
||||
{/* <h3
|
||||
className={clsx(
|
||||
"font-semibold wrap-break-word",
|
||||
item.comment ? "text-green-500" : "text-foreground",
|
||||
)}
|
||||
>
|
||||
{item.title}
|
||||
</h3>
|
||||
<p
|
||||
</h3> */}
|
||||
<h3
|
||||
className={clsx(
|
||||
"text-sm wrap-break-word",
|
||||
item.comment
|
||||
? "text-green-500"
|
||||
: "text-muted-foreground",
|
||||
"font-semibold wrap-break-word",
|
||||
item.comment ? "text-green-500" : "text-foreground",
|
||||
)}
|
||||
>
|
||||
{item.description}
|
||||
</p>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ export default defineConfig({
|
||||
port: 5174,
|
||||
host: true, // barcha hostlarga ruxsat
|
||||
allowedHosts: [
|
||||
"hugo-quotes-loved-wiki.trycloudflare.com", // ngrok host qo'shildi
|
||||
"spin-ronald-officers-reasonably.trycloudflare.com", // ngrok host qo'shildi
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user