|
|
|
@@ -28,7 +28,10 @@ interface Props { |
|
|
|
bomCombo: BomCombo[] |
|
|
|
} |
|
|
|
|
|
|
|
type SearchQuery = Partial<Omit<JobOrder, "id">>; |
|
|
|
type SearchQuery = Partial<Omit<JobOrder, "id">> & { |
|
|
|
planStartFrom?: string; |
|
|
|
planStartTo?: string; |
|
|
|
}; |
|
|
|
|
|
|
|
type SearchParamNames = keyof SearchQuery; |
|
|
|
|
|
|
|
@@ -46,6 +49,8 @@ const JoSearch: React.FC<Props> = ({ defaultInputs, bomCombo }) => { |
|
|
|
const searchCriteria: Criterion<SearchParamNames>[] = useMemo(() => [ |
|
|
|
{ label: t("Code"), paramName: "code", 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]) |
|
|
|
|
|
|
|
const columns = useMemo<Column<JobOrder>[]>( |
|
|
|
@@ -94,6 +99,12 @@ const JoSearch: React.FC<Props> = ({ defaultInputs, bomCombo }) => { |
|
|
|
{t(upperFirst(row.status))} |
|
|
|
</span> |
|
|
|
} |
|
|
|
},{ |
|
|
|
name: "planStart", |
|
|
|
label: t("Estimated Production Date"), |
|
|
|
renderCell: (row) => { |
|
|
|
return row.planStart ? arrayToDateString(row.planStart, "output") : '-' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
// TODO put it inside Action Buttons |
|
|
|
|