doctor and pharmacies crud

This commit is contained in:
Samandar Turgunboyev
2025-11-29 19:19:40 +05:00
parent bcf9d7cd2b
commit 9bc4c3df1f
45 changed files with 3610 additions and 1469 deletions

View File

@@ -15,11 +15,14 @@ import type { Dispatch, SetStateAction } from "react";
interface Props {
setDetail: Dispatch<SetStateAction<DoctorListResData | null>>;
setEditingPlan: Dispatch<SetStateAction<DoctorListResData | null>>;
setDialogOpen: Dispatch<SetStateAction<boolean>>;
setDetailDialog: Dispatch<SetStateAction<boolean>>;
doctor: DoctorListResData[] | [];
isLoading: boolean;
isError: boolean;
isFetching: boolean;
handleDelete: (user: DoctorListResData) => void;
}
const TableDoctor = ({
@@ -27,7 +30,10 @@ const TableDoctor = ({
setDetail,
setDetailDialog,
isError,
setEditingPlan,
isLoading,
setDialogOpen,
handleDelete,
isFetching,
}: Props) => {
return (
@@ -100,8 +106,8 @@ const TableDoctor = ({
size="icon"
className="bg-blue-600 text-white cursor-pointer hover:bg-blue-600 hover:text-white"
onClick={() => {
// setEditingPlan(item);
// setDialogOpen(true);
setEditingPlan(item);
setDialogOpen(true);
}}
>
<Pencil size={18} />
@@ -110,7 +116,7 @@ const TableDoctor = ({
variant="destructive"
size="icon"
className="cursor-pointer"
// onClick={() => handleDelete(item.id)}
onClick={() => handleDelete(item)}
>
<Trash2 size={18} />
</Button>