Skip to content

Commit

Permalink
fix(dashboard): temp hide order column on reservations (#9692)
Browse files Browse the repository at this point in the history
**What**
- hide the order column on the reservations list until a link is introduced + impl. of `listOrderItems`
  • Loading branch information
fPolic authored Oct 22, 2024
1 parent 3df7ebe commit 6e0a1e3
Showing 1 changed file with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,29 @@ export const useReservationTableColumns = () => {
)
},
}),
columnHelper.accessor("line_item", {
header: t("fields.order"),
cell: ({ getValue }) => {
const inventoryItem = getValue()

if (!inventoryItem || !inventoryItem.order?.display_id) {
return <PlaceholderCell />
}

return (
<div className="flex size-full items-center overflow-hidden">
<LinkButton to={`/orders/${inventoryItem.order.id}`}>
<span className="truncate">
#{inventoryItem.order.display_id}
</span>
</LinkButton>
</div>
)
},
}),
/**
* TEMP: hide this column until a link is added
*/
// columnHelper.accessor("line_item", {
// header: t("fields.order"),
// cell: ({ getValue }) => {
// const inventoryItem = getValue()
//
// if (!inventoryItem || !inventoryItem.order?.display_id) {
// return <PlaceholderCell />
// }
//
// return (
// <div className="flex size-full items-center overflow-hidden">
// <LinkButton to={`/orders/${inventoryItem.order.id}`}>
// <span className="truncate">
// #{inventoryItem.order.display_id}
// </span>
// </LinkButton>
// </div>
// )
// },
// }),
columnHelper.accessor("description", {
header: t("fields.description"),
cell: ({ getValue }) => {
Expand Down

0 comments on commit 6e0a1e3

Please sign in to comment.