mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
Merge branch 'dev/hotfix/restu' into 'development'
[HOTFIX/FE] Refactor fetching logic useSelect on Depletion (Recording) See merge request mbugroup/lti-web-client!325
This commit is contained in:
@@ -484,6 +484,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
} = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', '', {
|
||||
location_id: depletionProductsLocationId,
|
||||
kandang_id: depletionProductsKandangId,
|
||||
type: 'AYAM',
|
||||
});
|
||||
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
@@ -784,18 +785,10 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
if (isResponseSuccess(depletionProductsData) && selectedKandang) {
|
||||
const data = depletionProductsData.data as unknown as ProductWarehouse[];
|
||||
data.forEach((product) => {
|
||||
const productName = product.product.name;
|
||||
|
||||
if (
|
||||
productName.toLowerCase().includes('culling') ||
|
||||
productName.toLowerCase().includes('mati') ||
|
||||
productName.toLowerCase().includes('afkir')
|
||||
) {
|
||||
options.push({
|
||||
value: product.id,
|
||||
label: product.product.name,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user