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