fix orders list for client

This commit is contained in:
vchikalkin 2025-06-26 12:42:52 +03:00
parent 98e0c33424
commit f47ec19551

View File

@ -18,13 +18,13 @@ export function ProfileOrdersList({ telegramId }: Readonly<ProfileProps>) {
filters: {
client: {
documentId: {
eq: isMaster ? profile?.documentId : undefined,
eq: isMaster ? profile?.documentId : customer?.documentId,
},
},
slot: {
master: {
documentId: {
eq: isMaster ? undefined : profile?.documentId,
eq: isMaster ? customer?.documentId : profile?.documentId,
},
},
},
@ -36,7 +36,7 @@ export function ProfileOrdersList({ telegramId }: Readonly<ProfileProps>) {
Boolean(profile?.documentId) && Boolean(customer?.documentId),
);
if (!orders?.length || isLoading || !isMaster) return null;
if (!orders?.length || isLoading) return null;
return (
<div className="flex flex-col space-y-2 px-4">