mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
codex/fix: purchase receivement error and recording doesn't show depletion/egg
This commit is contained in:
@@ -605,7 +605,11 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
loadMore: loadMoreStockProducts,
|
loadMore: loadMoreStockProducts,
|
||||||
} = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', 'search', {
|
} = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', 'search', {
|
||||||
flags: 'PAKAN,OVK',
|
flags: 'PAKAN,OVK',
|
||||||
|
limit: '100',
|
||||||
location_id: stockProductsLocationId,
|
location_id: stockProductsLocationId,
|
||||||
|
...(selectedKandangId
|
||||||
|
? { kandang_id: selectedKandangId.toString() }
|
||||||
|
: {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -613,7 +617,11 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
isLoadingOptions: isLoadingDepletionProducts,
|
isLoadingOptions: isLoadingDepletionProducts,
|
||||||
loadMore: loadMoreDepletionProducts,
|
loadMore: loadMoreDepletionProducts,
|
||||||
} = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', '', {
|
} = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', '', {
|
||||||
|
limit: '100',
|
||||||
location_id: depletionProductsLocationId,
|
location_id: depletionProductsLocationId,
|
||||||
|
...(selectedKandangId
|
||||||
|
? { kandang_id: selectedKandangId.toString() }
|
||||||
|
: {}),
|
||||||
type: 'AYAM',
|
type: 'AYAM',
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -678,8 +686,12 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
isLoadingOptions: isLoadingEggProducts,
|
isLoadingOptions: isLoadingEggProducts,
|
||||||
loadMore: loadMoreEggProducts,
|
loadMore: loadMoreEggProducts,
|
||||||
} = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', 'search', {
|
} = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', 'search', {
|
||||||
|
limit: '100',
|
||||||
type: 'TELUR',
|
type: 'TELUR',
|
||||||
location_id: eggProductsLocationId,
|
location_id: eggProductsLocationId,
|
||||||
|
...(selectedKandangId
|
||||||
|
? { kandang_id: selectedKandangId.toString() }
|
||||||
|
: {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
const approvedProjectFlockKandangsUrl = useMemo(() => {
|
const approvedProjectFlockKandangsUrl = useMemo(() => {
|
||||||
|
|||||||
@@ -50,7 +50,11 @@ export const isProductWarehouseSelectableForKandang = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (warehouse.type === 'KANDANG') {
|
if (warehouse.type === 'KANDANG') {
|
||||||
return Boolean(kandangId) && warehouse.kandang?.id === kandangId;
|
return (
|
||||||
|
Boolean(kandangId) &&
|
||||||
|
(warehouse.kandang?.id === kandangId ||
|
||||||
|
productWarehouse.project_flock_kandang?.kandang_id === kandangId)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user