mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
refactor(FE): Remove unused imports and redundant code
This commit is contained in:
@@ -55,7 +55,7 @@ const PurchaseRequestForm = ({
|
||||
const deleteModal = useModal();
|
||||
const [isDeleteLoading, setIsDeleteLoading] = useState(false);
|
||||
|
||||
const [locationSelectInputValue, setLocationSelectInputValue] = useState('');
|
||||
const [, setLocationSelectInputValue] = useState('');
|
||||
const [selectedPurchaseItems, setSelectedPurchaseItems] = useState<number[]>(
|
||||
[]
|
||||
);
|
||||
@@ -149,7 +149,6 @@ const PurchaseRequestForm = ({
|
||||
isLoadingOptions: isLoadingSuppliers,
|
||||
rawData: supplierRawData,
|
||||
loadMore: loadMoreSuppliers,
|
||||
hasMore: hasMoreSuppliers,
|
||||
} = useSelect<Supplier>(SupplierApi.basePath, 'id', 'name', 'search', {
|
||||
category: 'SAPRONAK',
|
||||
});
|
||||
@@ -164,7 +163,6 @@ const PurchaseRequestForm = ({
|
||||
options: locationOptions,
|
||||
isLoadingOptions: isLoadingLocations,
|
||||
loadMore: loadMoreLocations,
|
||||
hasMore: hasMoreLocations,
|
||||
} = useSelect(LocationApi.basePath, 'id', 'name', '', {
|
||||
area_id:
|
||||
selectedArea != ''
|
||||
@@ -173,12 +171,10 @@ const PurchaseRequestForm = ({
|
||||
});
|
||||
|
||||
const {
|
||||
inputValue: warehouseSelectInputValue,
|
||||
setInputValue: setWarehouseSelectInputValue,
|
||||
options: warehouseOptions,
|
||||
isLoadingOptions: isLoadingWarehouses,
|
||||
loadMore: loadMoreWarehouses,
|
||||
hasMore: hasMoreWarehouses,
|
||||
} = useSelect(WarehouseApi.basePath, 'id', 'name', 'search', {
|
||||
area_id:
|
||||
selectedArea != ''
|
||||
@@ -651,7 +647,7 @@ const PurchaseRequestForm = ({
|
||||
{formik.values.items?.map((item, idx) => (
|
||||
<tr key={`purchase-item-${idx}`}>
|
||||
{type !== 'detail' && (
|
||||
<td className='!align-middle'>
|
||||
<td className='align-middle!'>
|
||||
<CheckboxInput
|
||||
name={`purchase-item-${idx}`}
|
||||
checked={selectedPurchaseItems.includes(idx)}
|
||||
|
||||
Reference in New Issue
Block a user