|
|
@@ -68,7 +68,7 @@ import PoQcStockInModal from "./PoQcStockInModal"; |
|
|
|
import QrModal from "./QrModal"; |
|
|
|
import { PlayArrow } from "@mui/icons-material"; |
|
|
|
import DoneIcon from "@mui/icons-material/Done"; |
|
|
|
import { getCustomWidth } from "@/app/utils/commonUtil"; |
|
|
|
import { downloadFile, getCustomWidth } from "@/app/utils/commonUtil"; |
|
|
|
import PoInfoCard from "./PoInfoCard"; |
|
|
|
import { decimalFormatter, integerFormatter } from "@/app/utils/formatUtil"; |
|
|
|
import { List, ListItem, ListItemButton, ListItemText, Divider } from "@mui/material"; |
|
|
@@ -78,6 +78,7 @@ import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; |
|
|
|
import { DatePicker, LocalizationProvider, zhHK } from "@mui/x-date-pickers"; |
|
|
|
import { debounce } from "lodash"; |
|
|
|
import LoadingComponent from "../General/LoadingComponent"; |
|
|
|
import { getMailTemplateForStockInLine } from "@/app/api/mailTemplate/actions"; |
|
|
|
//import { useRouter } from "next/navigation"; |
|
|
|
|
|
|
|
|
|
|
@@ -333,6 +334,13 @@ const PoDetail: React.FC<Props> = ({ po, qc, warehouse }) => { |
|
|
|
setPurchaseOrder(newPo); |
|
|
|
}, [purchaseOrder.id]); |
|
|
|
|
|
|
|
const handleMailTemplateForStockInLine = useCallback(async (stockInLineId: number) => { |
|
|
|
const response = await getMailTemplateForStockInLine(stockInLineId) |
|
|
|
if (response) { |
|
|
|
downloadFile(new Uint8Array(response.blobValue), response.filename); |
|
|
|
} |
|
|
|
}, []) |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
setRows(purchaseOrder.pol || []); |
|
|
|
}, [purchaseOrder]); |
|
|
@@ -849,6 +857,7 @@ const PoDetail: React.FC<Props> = ({ po, qc, warehouse }) => { |
|
|
|
itemDetail={selectedRow} |
|
|
|
warehouse={warehouse} |
|
|
|
fetchPoDetail={fetchPoDetail} |
|
|
|
handleMailTemplateForStockInLine={handleMailTemplateForStockInLine} |
|
|
|
/> |
|
|
|
</Box> |
|
|
|
</TableCell> |
|
|
|