Skip to content

Commit

Permalink
Merge pull request #324 from Shelf-nu/donkoko/322-bug-cannot-delete-a…
Browse files Browse the repository at this point in the history
…ssets

fixing issue that doesn't allow to delete assets due to conflict with…
  • Loading branch information
DonKoko authored Aug 28, 2023
2 parents 0adb7f7 + bd15040 commit 01f39f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions app/components/assets/actions-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const ConditionalActionsDropdown = ({ asset }: Props) => {
className="order actions-dropdown static w-screen rounded-lg bg-white p-0 text-right md:static md:w-[180px]"
>
<div className="order fixed bottom-0 left-0 w-screen rounded-lg bg-white p-0 text-right md:static md:w-[180px]">
<DropdownMenuItem className="border-b px-6 py-3">
<DropdownMenuItem className="border-b p-3">
{!assetIsAvailable ? (
<Button
to="release-custody"
Expand Down Expand Up @@ -95,26 +95,23 @@ const ConditionalActionsDropdown = ({ asset }: Props) => {
</Button>
)}
</DropdownMenuItem>
<DropdownMenuItem className="px-6 py-3">
<DropdownMenuItem className="p-3">
<Button
to="edit"
role="link"
variant="link"
className="justify-start text-gray-700 hover:text-gray-700"
width="full"
>
<span
className="flex items-center gap-2"
onClick={() => setOpen(false)}
>
<span className="flex items-center gap-2">
<PenIcon /> Edit
</span>
</Button>
</DropdownMenuItem>
<div onClick={() => setOpen(false)}>
<div>
<DeleteAsset asset={asset} />
</div>
<DropdownMenuItem className="border-t px-6 py-3 md:hidden">
<DropdownMenuItem className="border-t p-3 md:hidden">
<Button
role="button"
variant="secondary"
Expand Down
2 changes: 1 addition & 1 deletion app/components/assets/delete-asset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const DeleteAsset = ({
variant="link"
data-test-id="deleteAssetButton"
icon="trash"
className="justify-start rounded-sm px-6 py-3 text-sm font-semibold text-gray-700 outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-slate-100 hover:text-gray-700"
className="justify-start rounded-sm p-3 text-sm font-semibold text-gray-700 outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-slate-100 hover:text-gray-700"
width="full"
>
Delete
Expand Down

0 comments on commit 01f39f4

Please sign in to comment.