|
|
|
@@ -51,16 +51,16 @@ console.log("🔍 DoSearch - currentUserId:", currentUserId); |
|
|
|
|
|
|
|
if (id) { |
|
|
|
// Get current user ID from session |
|
|
|
const currentUserId = session?.id ? parseInt(session.id) : undefined; |
|
|
|
//const currentUserId = session?.id ? parseInt(session.id) : undefined; |
|
|
|
|
|
|
|
if (!currentUserId) { |
|
|
|
setServerError("User session not found. Please login again."); |
|
|
|
return; |
|
|
|
} |
|
|
|
//if (!currentUserId) { |
|
|
|
// setServerError("User session not found. Please login again."); |
|
|
|
// return; |
|
|
|
//} |
|
|
|
|
|
|
|
const response = await releaseDo({ |
|
|
|
id: id, |
|
|
|
userId: currentUserId // Pass user ID from session |
|
|
|
//userId: currentUserId // Pass user ID from session |
|
|
|
}) |
|
|
|
|
|
|
|
if (response) { |
|
|
|
@@ -168,7 +168,7 @@ console.log("🔍 DoSearch - currentUserId:", currentUserId); |
|
|
|
</Alert> |
|
|
|
)} |
|
|
|
|
|
|
|
{ |
|
|
|
{/*{ |
|
|
|
formProps.watch("status")?.toLowerCase() === "pending" && ( |
|
|
|
<Stack direction="row" justifyContent="flex-start" gap={1}> |
|
|
|
<Button |
|
|
|
@@ -181,7 +181,7 @@ console.log("🔍 DoSearch - currentUserId:", currentUserId); |
|
|
|
</Button> |
|
|
|
</Stack> |
|
|
|
)} |
|
|
|
|
|
|
|
*/} |
|
|
|
{/* ADD STORE-BASED ASSIGNMENT BUTTONS */} |
|
|
|
{ |
|
|
|
formProps.watch("status")?.toLowerCase() === "released" && ( |
|
|
|
|