This commit is contained in:
Samandar Turgunboyev
2025-12-13 12:50:53 +05:00
parent 18e43f0eb8
commit 30f842c53d
9 changed files with 19 additions and 13 deletions

View File

@@ -212,7 +212,7 @@ export default function AddDistrict({ initialValues, setDialogOpen }: Props) {
: "opacity-0",
)}
/>
{u.first_name} {u.last_name} {u.region.name}
{u.first_name} {u.last_name} {u.region?.name}
</CommandItem>
))}
</CommandGroup>

View File

@@ -455,7 +455,7 @@ const AddedDoctor = ({ initialValues, setDialogOpen }: Props) => {
: "opacity-0",
)}
/>
{u.first_name} {u.last_name} {u.region.name}
{u.first_name} {u.last_name} {u.region?.name}
</CommandItem>
))}
</CommandGroup>

View File

@@ -332,7 +332,7 @@ export default function AddedObject({ initialValues, setDialogOpen }: Props) {
: "opacity-0",
)}
/>
{u.first_name} {u.last_name} {u.region.name}
{u.first_name} {u.last_name} {u.region?.name}
</CommandItem>
))}
</CommandGroup>

View File

@@ -419,7 +419,7 @@ const AddedPharmacies = ({ initialValues, setDialogOpen }: Props) => {
: "opacity-0",
)}
/>
{u.first_name} {u.last_name} {u.region.name}
{u.first_name} {u.last_name} {u.region?.name}
</CommandItem>
))}
</CommandGroup>

View File

@@ -274,7 +274,7 @@ const AddedPlan = ({ initialValues, setDialogOpen }: Props) => {
: "opacity-0",
)}
/>
{u.first_name} {u.last_name} {u.region.name}
{u.first_name} {u.last_name} {u.region?.name}
</CommandItem>
))}
</CommandGroup>

View File

@@ -420,7 +420,7 @@ export const AddedSpecification = ({ initialValues, setDialogOpen }: Props) => {
: "opacity-0",
)}
/>
{u.first_name} {u.last_name} {u.region.name}
{u.first_name} {u.last_name} {u.region?.name}
</CommandItem>
))}
</CommandGroup>

View File

@@ -202,7 +202,7 @@ const AddedTourPlan = ({ initialValues, setDialogOpen }: Props) => {
: "opacity-0",
)}
/>
{u.first_name} {u.last_name} {u.region.name}
{u.first_name} {u.last_name} {u.region?.name}
</CommandItem>
))}
</CommandGroup>

View File

@@ -65,11 +65,11 @@ export interface UserListRes {
export interface UserListData {
id: number;
first_name: string;
last_name: string;
first_name: string | null;
last_name: string | null;
region: {
id: number;
name: string;
name: string | null;
};
is_active: boolean;
telegram_id: string;

View File

@@ -150,9 +150,15 @@ const UserTable = ({
</TableCell>
)}
<TableCell>{index + 1 + (currentPage - 1) * 20}</TableCell>
<TableCell>{user.first_name}</TableCell>
<TableCell>{user.last_name}</TableCell>
<TableCell>{user.region.name}</TableCell>
<TableCell>
{user.first_name ? user.first_name : "No'malum"}
</TableCell>
<TableCell>
{user.last_name ? user.last_name : "No'malum"}
</TableCell>
<TableCell>
{user.region ? user.region.name : "No'malum"}
</TableCell>
<TableCell className="text-center">
<Button
className={clsx(