feat: allow bulk select and delete on activities and deal list

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-17 12:47:07 +03:30
co-authored by Cursor
parent 9611803567
commit 2c7c943802
4 changed files with 389 additions and 15 deletions
+8 -2
View File
@@ -4,9 +4,15 @@ export function cardMenuStyle(
width = 160,
height = 230,
): Record<string, string> | null {
const btn = document.querySelector<HTMLElement>(
`[data-card-id="${CSS.escape(cardId)}"] .menu`,
const buttons = Array.from(
document.querySelectorAll<HTMLElement>(`[data-card-id="${CSS.escape(cardId)}"] .menu`),
);
// در نمای لیست هم جدول و هم کارت در DOM هستند؛ دکمهٔ واقعاً دیده را بگیر
const btn =
buttons.find((el) => {
const r = el.getBoundingClientRect();
return r.width > 0 && r.height > 0;
}) ?? buttons[0];
if (!btn) return null;
const r = btn.getBoundingClientRect();
const gap = 4;