mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
fix: remove unnecessary code
This commit is contained in:
+6
-16
@@ -146,15 +146,6 @@ const DeliveryOrderProductForm = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
// ============ Fetch Data ============
|
// ============ Fetch Data ============
|
||||||
const { data: productData } = useSWR(
|
|
||||||
selectedProduct?.value
|
|
||||||
? ProductApi.basePath + '/' + selectedProduct?.value
|
|
||||||
: null,
|
|
||||||
() =>
|
|
||||||
selectedProduct?.value
|
|
||||||
? ProductApi.getSingle(Number(selectedProduct?.value))
|
|
||||||
: undefined
|
|
||||||
);
|
|
||||||
|
|
||||||
// Options Week dari minggu 1 - 22
|
// Options Week dari minggu 1 - 22
|
||||||
// const optionsWeek = useMemo(() => {
|
// const optionsWeek = useMemo(() => {
|
||||||
@@ -440,7 +431,8 @@ const DeliveryOrderProductForm = ({
|
|||||||
handleBlurField(currentInput);
|
handleBlurField(currentInput);
|
||||||
formik.setFieldValue(
|
formik.setFieldValue(
|
||||||
'uom',
|
'uom',
|
||||||
isResponseSuccess(productData) ? productData?.data?.uom?.name : ''
|
initialValues?.marketing_product?.product_warehouse_data?.product?.uom
|
||||||
|
?.name ?? ''
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -813,9 +805,8 @@ const DeliveryOrderProductForm = ({
|
|||||||
endAdornment={
|
endAdornment={
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2'>
|
||||||
<span className='text-sm text-gray-500'>
|
<span className='text-sm text-gray-500'>
|
||||||
{isResponseSuccess(productData)
|
{initialValues?.marketing_product?.product_warehouse_data
|
||||||
? productData?.data?.uom.name
|
?.product?.uom?.name ?? ''}
|
||||||
: ''}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -826,9 +817,8 @@ const DeliveryOrderProductForm = ({
|
|||||||
(item) => item.id === formik.values.marketing_product_id
|
(item) => item.id === formik.values.marketing_product_id
|
||||||
)?.qty +
|
)?.qty +
|
||||||
' ' +
|
' ' +
|
||||||
(isResponseSuccess(productData)
|
(initialValues?.marketing_product?.product_warehouse_data
|
||||||
? productData?.data?.uom.name
|
?.product?.uom?.name ?? '')
|
||||||
: '')
|
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user