diff --git a/src/components/pages/production/recording/form/RecordingForm.tsx b/src/components/pages/production/recording/form/RecordingForm.tsx index c9236d19..0d62fd0b 100644 --- a/src/components/pages/production/recording/form/RecordingForm.tsx +++ b/src/components/pages/production/recording/form/RecordingForm.tsx @@ -603,10 +603,11 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { const { options: stockProductOptions, + setInputValue: setStockProductInputValue, rawData: stockProducts, isLoadingOptions: isLoadingStockProducts, loadMore: loadMoreStockProducts, - } = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', '', { + } = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', 'search', { flags: 'PAKAN,OVK', location_id: stockProductsLocationId, kandang_id: stockProductsKandangId, @@ -2665,6 +2666,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { product.value === stock.product_warehouse_id ) || null } + onInputChange={setStockProductInputValue} onChange={(selectedOption) => { const option = selectedOption as OptionType | null; diff --git a/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx b/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx index e6127cf0..01e567d3 100644 --- a/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx +++ b/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx @@ -136,7 +136,7 @@ export function ListDailyChecklistContent() { const handleEdit = (item: DailyChecklist) => { const formattedDate = new Date(item.date).toISOString().split('T')[0]; - const kandangId = item.kandang.id; + const kandangId = item.kandang?.id ?? ''; const category = item.category; router.push( @@ -335,7 +335,7 @@ export function ListDailyChecklistContent() { accessorKey: 'kandang', header: 'Kandang', enableSorting: false, - cell: ({ row }) => row.original.kandang.name, + cell: ({ row }) => row.original.kandang?.name ?? '-', }, { accessorKey: 'category', @@ -627,7 +627,7 @@ export function ListDailyChecklistContent() {