diff --git a/src/components/JoSave/JoRelease.tsx b/src/components/JoSave/JoRelease.tsx index 615589b..88cfb10 100644 --- a/src/components/JoSave/JoRelease.tsx +++ b/src/components/JoSave/JoRelease.tsx @@ -1,22 +1,29 @@ -import { Button, Card, CardContent, Stack, Typography } from "@mui/material"; +import { Button, Card, CardContent, Stack, Typography, Box } from "@mui/material"; import { useTranslation } from "react-i18next"; import { JoDetailPickLine } from "@/app/api/jo"; import { fetchInventories } from "@/app/api/inventory/actions"; import { InventoryResult } from "@/app/api/inventory"; import { useEffect, useState, useMemo } from "react"; +import { useFormContext } from "react-hook-form"; +import { JoDetail } from "@/app/api/jo"; type Props = { onActionClick?: () => void; pickLines: JoDetailPickLine[]; + handleRelease: () => void; } const JoRelease: React.FC = ({ onActionClick, - pickLines + pickLines, + handleRelease }) => { + const { t } = useTranslation("jo"); const [inventoryData, setInventoryData] = useState([]); + const { watch } = useFormContext(); + useEffect(() => { const fetchInventoryData = async () => { try { @@ -86,13 +93,15 @@ const JoRelease: React.FC = ({ {t("Lines with insufficient stock: ")}{stockCounts.insufficient} - {/**/} + + diff --git a/src/components/JoSave/JoSave.tsx b/src/components/JoSave/JoSave.tsx index f7592b8..a627a3f 100644 --- a/src/components/JoSave/JoSave.tsx +++ b/src/components/JoSave/JoSave.tsx @@ -186,9 +186,9 @@ const JoSave: React.FC = ({ {serverError} )} - + {/**/} - +