|
1 | 1 | "use client"; |
2 | 2 |
|
3 | 3 | import { useState, useEffect } from "react"; |
4 | | -import { DotsThree, Eye, MagnifyingGlass, Plus } from "@phosphor-icons/react"; |
| 4 | +import { MagnifyingGlass, Plus } from "@phosphor-icons/react"; |
5 | 5 | import { CgSpinner } from "react-icons/cg"; |
6 | 6 | import { formatTableValue } from "@/utils/format"; |
7 | 7 | import React from "react"; |
8 | 8 | import toast from "react-hot-toast"; |
9 | 9 | import { useRouter } from "next/navigation"; |
10 | 10 | import AddItemModal from "@/components/AddItemModal"; |
11 | | -import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react"; |
12 | 11 |
|
13 | 12 | interface UnallocatedItemData { |
14 | 13 | title: string; |
@@ -216,10 +215,7 @@ export default function AdminUnallocatedItemsScreen() { |
216 | 215 | <th className="px-4 py-2 text-left">Quantity</th> |
217 | 216 | <th className="px-4 py-2 text-left">Expiration</th> |
218 | 217 | <th className="px-4 py-2 text-left">Unit type</th> |
219 | | - <th className="px-4 py-2 text-left">Qty/Unit</th> |
220 | | - <th className="px-4 py-2 text-left rounded-tr-lg w-12"> |
221 | | - Manage |
222 | | - </th> |
| 218 | + <th className="px-4 py-2 text-left rounded-tr-lg">Qty/Unit</th> |
223 | 219 | </tr> |
224 | 220 | </thead> |
225 | 221 | <tbody> |
@@ -260,41 +256,6 @@ export default function AdminUnallocatedItemsScreen() { |
260 | 256 | <td className="px-4 py-2"> |
261 | 257 | {formatTableValue(item.quantityPerUnit)} |
262 | 258 | </td> |
263 | | - <td |
264 | | - className="px-4 py-2" |
265 | | - onClick={(e) => e.stopPropagation()} |
266 | | - > |
267 | | - <Menu as="div" className="float-right relative"> |
268 | | - <MenuButton> |
269 | | - <DotsThree weight="bold" /> |
270 | | - </MenuButton> |
271 | | - <MenuItems className="absolute right-0 z-10 mt-2 origin-top-right rounded-md bg-white ring-1 shadow-lg ring-black/5 w-max"> |
272 | | - <MenuItem |
273 | | - as="button" |
274 | | - className="flex w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100" |
275 | | - onClick={() => { |
276 | | - router.push( |
277 | | - `/unallocatedItems/lineItems?${new URLSearchParams( |
278 | | - { |
279 | | - title: item.title, |
280 | | - type: item.type, |
281 | | - unitType: item.unitType, |
282 | | - quantityPerUnit: |
283 | | - item.quantityPerUnit.toString(), |
284 | | - ...(item.expirationDate |
285 | | - ? { expirationDate: item.expirationDate } |
286 | | - : {}), |
287 | | - } |
288 | | - ).toString()}` |
289 | | - ); |
290 | | - }} |
291 | | - > |
292 | | - <Eye className="inline-block mr-2" size={22} /> |
293 | | - View unique items |
294 | | - </MenuItem> |
295 | | - </MenuItems> |
296 | | - </Menu> |
297 | | - </td> |
298 | 259 | </tr> |
299 | 260 | </React.Fragment> |
300 | 261 | ))} |
|
0 commit comments