| @@ -14,6 +14,7 @@ const pathToLabelMap: { [path: string]: string } = { | |||||
| "/tasks": "Task Template", | "/tasks": "Task Template", | ||||
| "/tasks/create": "Create Task Template", | "/tasks/create": "Create Task Template", | ||||
| "/settings/qcItem": "Qc Item", | "/settings/qcItem": "Qc Item", | ||||
| "/settings/qcItemAll": "QC Item All", | |||||
| "/settings/qrCodeHandle": "QR Code Handle", | "/settings/qrCodeHandle": "QR Code Handle", | ||||
| "/settings/rss": "Demand Forecast Setting", | "/settings/rss": "Demand Forecast Setting", | ||||
| "/settings/equipment": "Equipment", | "/settings/equipment": "Equipment", | ||||
| @@ -642,23 +642,20 @@ const CompleteJobOrderRecord: React.FC<Props> = ({ | |||||
| </Box> | </Box> | ||||
| </Stack> | </Stack> | ||||
| </CardContent> | </CardContent> | ||||
| <CardActions> | |||||
| <CardActions sx={{ alignItems: "center", gap: 1 }}> | |||||
| <Button | <Button | ||||
| variant="outlined" | variant="outlined" | ||||
| onClick={() => handleDetailClick(jobOrderPickOrder)} | onClick={() => handleDetailClick(jobOrderPickOrder)} | ||||
| > | > | ||||
| {t("View Details")} | {t("View Details")} | ||||
| </Button> | </Button> | ||||
| <Button | <Button | ||||
| variant="contained" | variant="contained" | ||||
| color="primary" | color="primary" | ||||
| onClick={() => handlePickRecord(jobOrderPickOrder)} | onClick={() => handlePickRecord(jobOrderPickOrder)} | ||||
| sx={{ mt: 1 }} | |||||
| > | > | ||||
| {t("Print Pick Record")} | {t("Print Pick Record")} | ||||
| </Button> | </Button> | ||||
| </CardActions> | </CardActions> | ||||
| </Card> | </Card> | ||||
| ))} | ))} | ||||
| @@ -675,6 +672,7 @@ const CompleteJobOrderRecord: React.FC<Props> = ({ | |||||
| onPageChange={handlePageChange} | onPageChange={handlePageChange} | ||||
| onRowsPerPageChange={handlePageSizeChange} | onRowsPerPageChange={handlePageSizeChange} | ||||
| rowsPerPageOptions={[5, 10, 25, 50]} | rowsPerPageOptions={[5, 10, 25, 50]} | ||||
| labelRowsPerPage={t("Rows per page")} | |||||
| /> | /> | ||||
| )} | )} | ||||
| </Box> | </Box> | ||||
| @@ -422,7 +422,7 @@ const handleRelease = useCallback(async ( jobOrderId: number) => { | |||||
| const productionProcessesLineRemarkTableColumns: GridColDef[] = [ | const productionProcessesLineRemarkTableColumns: GridColDef[] = [ | ||||
| { | { | ||||
| field: "seqNo", | field: "seqNo", | ||||
| headerName: t("Seq"), | |||||
| headerName: t("SEQ"), | |||||
| flex: 0.2, | flex: 0.2, | ||||
| align: "left", | align: "left", | ||||
| headerAlign: "left", | headerAlign: "left", | ||||
| @@ -232,12 +232,23 @@ const QcForm: React.FC<Props> = ({ rows, disabled = false }) => { | |||||
| return ( | return ( | ||||
| <> | <> | ||||
| // autoHeight | |||||
| <StyledDataGrid | <StyledDataGrid | ||||
| columns={qcColumns} | columns={qcColumns} | ||||
| rows={rows} | rows={rows} | ||||
| // autoHeight | |||||
| sortModel={[]} | sortModel={[]} | ||||
| getRowHeight={() => 'auto'} | getRowHeight={() => 'auto'} | ||||
| initialState={{ | |||||
| pagination: { paginationModel: { page: 0, pageSize: 100 } }, | |||||
| }} | |||||
| pageSizeOptions={[100]} | |||||
| slotProps={{ | |||||
| pagination: { | |||||
| sx: { | |||||
| display: "none", | |||||
| }, | |||||
| }, | |||||
| }} | |||||
| /> | /> | ||||
| </> | </> | ||||
| ); | ); | ||||
| @@ -198,7 +198,7 @@ function SearchResults<T extends ResultWithId>({ | |||||
| setCheckboxIds = undefined, | setCheckboxIds = undefined, | ||||
| onRowClick = undefined, | onRowClick = undefined, | ||||
| }: Props<T>) { | }: Props<T>) { | ||||
| const { t } = useTranslation("dashboard"); | |||||
| const { t } = useTranslation(); | |||||
| const [page, setPage] = React.useState(0); | const [page, setPage] = React.useState(0); | ||||
| const [rowsPerPage, setRowsPerPage] = React.useState(10); | const [rowsPerPage, setRowsPerPage] = React.useState(10); | ||||
| @@ -1,6 +1,8 @@ | |||||
| import { styled } from "@mui/material"; | import { styled } from "@mui/material"; | ||||
| import { DataGrid ,DataGridProps,zhTW} from "@mui/x-data-grid"; | import { DataGrid ,DataGridProps,zhTW} from "@mui/x-data-grid"; | ||||
| import { forwardRef } from "react"; | import { forwardRef } from "react"; | ||||
| import { useTranslation } from "react-i18next"; | |||||
| const StyledDataGridBase = styled(DataGrid)(({ theme }) => ({ | const StyledDataGridBase = styled(DataGrid)(({ theme }) => ({ | ||||
| "--unstable_DataGrid-radius": 0, | "--unstable_DataGrid-radius": 0, | ||||
| "& .MuiDataGrid-columnHeaders": { | "& .MuiDataGrid-columnHeaders": { | ||||
| @@ -29,12 +31,14 @@ const StyledDataGridBase = styled(DataGrid)(({ theme }) => ({ | |||||
| }, | }, | ||||
| })); | })); | ||||
| const StyledDataGrid = forwardRef<HTMLDivElement, DataGridProps>((props, ref) => { | const StyledDataGrid = forwardRef<HTMLDivElement, DataGridProps>((props, ref) => { | ||||
| const { t } = useTranslation(); | |||||
| return ( | return ( | ||||
| <StyledDataGridBase | <StyledDataGridBase | ||||
| ref={ref} | ref={ref} | ||||
| {...props} | {...props} | ||||
| localeText={{ | localeText={{ | ||||
| ...zhTW.components.MuiDataGrid.defaultProps.localeText, | ...zhTW.components.MuiDataGrid.defaultProps.localeText, | ||||
| labelRowsPerPage: t("Rows per page"), | |||||
| ...props.localeText, // 允许覆盖 | ...props.localeText, // 允许覆盖 | ||||
| }} | }} | ||||
| /> | /> | ||||
| @@ -112,6 +112,7 @@ | |||||
| "Today": "今天", | "Today": "今天", | ||||
| "Yesterday": "昨天", | "Yesterday": "昨天", | ||||
| "Two Days Ago": "前天", | |||||
| "Input Equipment is not match with process": "輸入的設備與流程不匹配", | "Input Equipment is not match with process": "輸入的設備與流程不匹配", | ||||
| "Staff No is required": "員工編號必填", | "Staff No is required": "員工編號必填", | ||||
| @@ -120,6 +121,8 @@ | |||||
| "Production Date": "生產日期", | "Production Date": "生產日期", | ||||
| "QC Check Item": "QC品檢項目", | "QC Check Item": "QC品檢項目", | ||||
| "QC Category": "QC品檢模板", | "QC Category": "QC品檢模板", | ||||
| "QC Item All": "QC 綜合管理", | |||||
| "qcItemAll": "QC 綜合管理", | |||||
| "qcCategory": "品檢模板", | "qcCategory": "品檢模板", | ||||
| "QC Check Template": "QC檢查模板", | "QC Check Template": "QC檢查模板", | ||||
| "Mail": "郵件", | "Mail": "郵件", | ||||
| @@ -136,6 +139,7 @@ | |||||
| "Production Date":"生產日期", | "Production Date":"生產日期", | ||||
| "QC Check Item":"QC品檢項目", | "QC Check Item":"QC品檢項目", | ||||
| "QC Category":"QC品檢模板", | "QC Category":"QC品檢模板", | ||||
| "QC Item All":"QC 綜合管理", | |||||
| "qcCategory":"品檢模板", | "qcCategory":"品檢模板", | ||||
| "QC Check Template":"QC檢查模板", | "QC Check Template":"QC檢查模板", | ||||
| "QR Code Handle":"二維碼列印及下載", | "QR Code Handle":"二維碼列印及下載", | ||||
| @@ -272,6 +276,7 @@ | |||||
| "Please scan equipment code": "請掃描設備編號", | "Please scan equipment code": "請掃描設備編號", | ||||
| "Equipment Code": "設備編號", | "Equipment Code": "設備編號", | ||||
| "Seq": "步驟", | "Seq": "步驟", | ||||
| "SEQ": "步驟", | |||||
| "Item Name": "物料名稱", | "Item Name": "物料名稱", | ||||
| "Job Order Info": "工單信息", | "Job Order Info": "工單信息", | ||||
| "Matching Stock": "工單對料", | "Matching Stock": "工單對料", | ||||
| @@ -39,6 +39,7 @@ | |||||
| "DO Order Code": "送貨單編號", | "DO Order Code": "送貨單編號", | ||||
| "JO Order Code": "工單編號", | "JO Order Code": "工單編號", | ||||
| "Picker Name": "提料員", | "Picker Name": "提料員", | ||||
| "Rows per page": "每頁行數", | |||||
| "rejected": "已拒絕", | "rejected": "已拒絕", | ||||
| "miss": "缺貨", | "miss": "缺貨", | ||||
| @@ -93,6 +93,11 @@ | |||||
| "Bag Code": "包裝袋編號", | "Bag Code": "包裝袋編號", | ||||
| "Sequence": "序", | "Sequence": "序", | ||||
| "Seq": "步驟", | |||||
| "SEQ": "步驟", | |||||
| "Today": "今天", | |||||
| "Yesterday": "昨天", | |||||
| "Two Days Ago": "前天", | |||||
| "Item Code": "成品/半成品編號", | "Item Code": "成品/半成品編號", | ||||
| "Paused": "已暫停", | "Paused": "已暫停", | ||||
| "paused": "已暫停", | "paused": "已暫停", | ||||
| @@ -347,7 +352,7 @@ | |||||
| "receivedQty": "接收數量", | "receivedQty": "接收數量", | ||||
| "stock in information": "庫存信息", | "stock in information": "庫存信息", | ||||
| "No Uom": "沒有單位", | "No Uom": "沒有單位", | ||||
| "Print Pick Record": "打印板頭紙", | |||||
| "Print Pick Record": "打印版頭紙", | |||||
| "Printed Successfully.": "成功列印", | "Printed Successfully.": "成功列印", | ||||
| "Submit All Scanned": "提交所有已掃描項目", | "Submit All Scanned": "提交所有已掃描項目", | ||||
| "Submitting...": "提交中...", | "Submitting...": "提交中...", | ||||