diff --git a/src/stock-items/edit-stock-item/edit-stock-item-action-menu.component.tsx b/src/stock-items/edit-stock-item/edit-stock-item-action-menu.component.tsx new file mode 100644 index 00000000..39b2bf51 --- /dev/null +++ b/src/stock-items/edit-stock-item/edit-stock-item-action-menu.component.tsx @@ -0,0 +1,30 @@ +import React from "react"; +import { Button } from "@carbon/react"; +import { useTranslation } from "react-i18next"; +import { StockItemDTO } from "../../core/api/types/stockItem/StockItem"; +import { launchAddOrEditDialog } from "../stock-item.utils"; + +interface EditStockItemActionsMenuProps { + data: StockItemDTO; +} + +const EditStockItemActionsMenu: React.FC = ({ + data, +}) => { + const { t } = useTranslation(); + + return ( + + ); +}; +export default EditStockItemActionsMenu; diff --git a/src/stock-items/stock-items-table.component.tsx b/src/stock-items/stock-items-table.component.tsx index 7ef22045..9c2a02a4 100644 --- a/src/stock-items/stock-items-table.component.tsx +++ b/src/stock-items/stock-items-table.component.tsx @@ -28,6 +28,7 @@ import FilterStockItems from "./components/filter-stock-items/filter-stock-items import { launchAddOrEditDialog } from "./stock-item.utils"; import { useStockItemsPages } from "./stock-items-table.resource"; import styles from "./stock-items-table.scss"; +import EditStockItemActionsMenu from "./edit-stock-item/edit-stock-item-action-menu.component"; interface StockItemsTableProps { from?: string; @@ -47,22 +48,16 @@ const StockItemsTableComponent: React.FC = () => { setCurrentPage, isDrug, setDrug, - setSearchString, } = useStockItemsPages(ResourceRepresentation.Full); const tableRows = useMemo(() => { - return items?.map((stockItem) => ({ + return items?.map((stockItem, index) => ({ ...stockItem, id: stockItem?.uuid, key: `key-${stockItem?.uuid}`, uuid: `${stockItem?.uuid}`, type: stockItem?.drugUuid ? t("drug", "Drug") : t("other", "Other"), - genericName: ( - - {" "} - {`${stockItem?.drugName ?? stockItem.conceptName}`} - - ), + genericName: , commonName: stockItem?.commonName, tradeName: stockItem?.drugUuid ? stockItem?.conceptName : "", preferredVendorName: stockItem?.preferredVendorName,