// @ts-nocheck import React from 'react'; import * as R from 'ramda'; import { Can, Icon, T } from '@/components'; import { Button, Menu, MenuItem, Popover, PopoverInteractionKind, Position, } from '@blueprintjs/core'; import { AbilitySubject, InventoryAdjustmentAction, } from '@/constants/abilityOption'; import { useItemDetailDrawerContext } from './ItemDetailDrawerProvider'; import withDialogActions from '@/containers/Dialog/withDialogActions'; /** * Invoice details more actions menu. * @returns {React.JSX} */ export const ItemDetailActionsMoreBtn = R.compose(withDialogActions)( ({ //#withDialogActions, openDialog, }) => { const { itemId, item } = useItemDetailDrawerContext(); // Cannot continue if the item type is not inventory. if (item.type !== 'inventory') return null; const handleInventoryAdjustment = () => { openDialog('inventory-adjustment', { itemId }); }; return ( } onClick={handleInventoryAdjustment} /> } >