delete and update a attachment in task

This commit is contained in:
hamid zarghami
2026-07-25 09:40:58 +03:30
parent 3537094e7c
commit df2f800b54
7 changed files with 201 additions and 21 deletions
@@ -73,13 +73,31 @@ const AttachmentItem: FC<Props> = ({ title, createdAt, type, url, onEdit, onDele
</PopoverButton>
<PopoverPanel anchor="bottom end" className="z-[80] mt-1 rounded-[10px] bg-white shadow-md text-right p-3">
<button type="button" onClick={onEdit} className="w-full text-sm text-right">
ویرایش
</button>
{({ close }) => (
<>
<button
type="button"
onClick={() => {
onEdit();
close();
}}
className="w-full text-sm text-right"
>
ویرایش
</button>
<button type="button" onClick={onDelete} className="w-full mt-3 text-sm text-right text-[#FF0000]">
پاک کردن
</button>
<button
type="button"
onClick={() => {
onDelete();
close();
}}
className="w-full mt-3 text-sm text-right text-[#FF0000]"
>
پاک کردن
</button>
</>
)}
</PopoverPanel>
</Popover>
</div>