Browse Source

translation, columns update

master
kelvin.yau 2 months ago
parent
commit
7ac56d2419
7 changed files with 21 additions and 9 deletions
  1. +1
    -0
      src/app/api/do/actions.tsx
  2. +2
    -2
      src/components/DoDetail/DoInfoCard.tsx
  3. +2
    -2
      src/components/DoSearch/DoSearch.tsx
  4. +2
    -2
      src/components/FinishedGoodSearch/FGPickOrderCard.tsx
  5. +12
    -1
      src/components/JoSearch/JoSearch.tsx
  6. +1
    -1
      src/components/PoDetail/QcComponent.tsx
  7. +1
    -1
      src/i18n/zh/do.json

+ 1
- 0
src/app/api/do/actions.tsx View File

@@ -19,6 +19,7 @@ export interface DoDetail {
code: string; code: string;
supplierCode: string; supplierCode: string;
shopCode: string; shopCode: string;
shopName: string;
currencyCode: string; currencyCode: string;
orderDate: string; orderDate: string;
estimatedArrivalDate: string; estimatedArrivalDate: string;


+ 2
- 2
src/components/DoDetail/DoInfoCard.tsx View File

@@ -41,8 +41,8 @@ const DoInfoCard: React.FC<Props> = ({
</Grid> </Grid>
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
{...register("shopCode")}
label={t("Shop Code")}
{...register("shopName")}
label={t("Shop Name")}
fullWidth fullWidth
disabled={true} disabled={true}
/> />


+ 2
- 2
src/components/DoSearch/DoSearch.tsx View File

@@ -452,14 +452,14 @@ if(orderStartDate != ""){
alignItems="end" alignItems="end"
> >
<Stack spacing={2} direction="row"> <Stack spacing={2} direction="row">
<Button
{/*<Button
name="submit" name="submit"
variant="contained" variant="contained"
// startIcon={<Check />} // startIcon={<Check />}
type="submit" type="submit"
> >
{t("Create")} {t("Create")}
</Button>
</Button>*/}
{hasSearched && hasResults && ( {hasSearched && hasResults && (
<Button <Button
name="batch_release" name="batch_release"


+ 2
- 2
src/components/FinishedGoodSearch/FGPickOrderCard.tsx View File

@@ -51,14 +51,14 @@ const FGPickOrderCard: React.FC<Props> = ({ fgOrder, onQrCodeClick }) => {
value={fgOrder.storeId} value={fgOrder.storeId}
/> />
</Grid> </Grid>
<Grid item xs={6}>
{/*<Grid item xs={6}>
<TextField <TextField
label={t("Shop ID")} label={t("Shop ID")}
fullWidth fullWidth
disabled={true} disabled={true}
value={fgOrder.shopCode} value={fgOrder.shopCode}
/> />
</Grid>
</Grid>*/}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
label={t("Shop Name")} label={t("Shop Name")}


+ 12
- 1
src/components/JoSearch/JoSearch.tsx View File

@@ -28,7 +28,10 @@ interface Props {
bomCombo: BomCombo[] bomCombo: BomCombo[]
} }


type SearchQuery = Partial<Omit<JobOrder, "id">>;
type SearchQuery = Partial<Omit<JobOrder, "id">> & {
planStartFrom?: string;
planStartTo?: string;
};


type SearchParamNames = keyof SearchQuery; type SearchParamNames = keyof SearchQuery;


@@ -46,6 +49,8 @@ const JoSearch: React.FC<Props> = ({ defaultInputs, bomCombo }) => {
const searchCriteria: Criterion<SearchParamNames>[] = useMemo(() => [ const searchCriteria: Criterion<SearchParamNames>[] = useMemo(() => [
{ label: t("Code"), paramName: "code", type: "text" }, { label: t("Code"), paramName: "code", type: "text" },
{ label: t("Item Name"), paramName: "itemName", type: "text" }, { label: t("Item Name"), paramName: "itemName", type: "text" },
{ label: t("Estimated Production Date From"), paramName: "planStartFrom", type: "date" },
{ label: t("Estimated Production Date To"), paramName: "planStartTo", type: "date" },
], [t]) ], [t])


const columns = useMemo<Column<JobOrder>[]>( const columns = useMemo<Column<JobOrder>[]>(
@@ -94,6 +99,12 @@ const JoSearch: React.FC<Props> = ({ defaultInputs, bomCombo }) => {
{t(upperFirst(row.status))} {t(upperFirst(row.status))}
</span> </span>
} }
},{
name: "planStart",
label: t("Estimated Production Date"),
renderCell: (row) => {
return row.planStart ? arrayToDateString(row.planStart, "output") : '-'
}
}, },
{ {
// TODO put it inside Action Buttons // TODO put it inside Action Buttons


+ 1
- 1
src/components/PoDetail/QcComponent.tsx View File

@@ -705,7 +705,7 @@ const QcComponent: React.FC<Props> = ({ itemDetail, disabled = false }) => {
<FormControlLabel disabled={disabled} <FormControlLabel disabled={disabled}
value="2" control={<Radio />} value="2" control={<Radio />}
sx={{"& .Mui-checked": {color: "red"}}} sx={{"& .Mui-checked": {color: "red"}}}
label= {detailMode ? "全部拒絕並退貨" : "不接受並退貨"} />
label= {detailMode ? "全部拒絕並退貨" : "不接受並需要退貨"} />
{(itemDetail.status == "pending" || disabled) && (<> {(itemDetail.status == "pending" || disabled) && (<>
<FormControlLabel disabled={disabled} <FormControlLabel disabled={disabled}


+ 1
- 1
src/i18n/zh/do.json View File

@@ -43,7 +43,7 @@
"Back": "返回", "Back": "返回",
"Batch Release": "批量放單", "Batch Release": "批量放單",
"Batch release completed successfully.": "已完成批量放單", "Batch release completed successfully.": "已完成批量放單",
"Edit Delivery Order Detail": "編輯送貨訂單詳情",
"Edit Delivery Order Detail": "編輯送貨訂單詳情",
"DO released successfully! Pick orders created.": "送貨訂單放單成功!提料單已建立。", "DO released successfully! Pick orders created.": "送貨訂單放單成功!提料單已建立。",
"Stock Available": "庫存可用", "Stock Available": "庫存可用",
"row selected": "行已選擇", "row selected": "行已選擇",


Loading…
Cancel
Save