feat(web): add prior archive promote actions

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-17 17:28:57 +03:30
co-authored by Cursor
parent 5069647f79
commit e86841fc60
5 changed files with 117 additions and 20 deletions
@@ -41,7 +41,7 @@ const emit = defineEmits<{
stagesChanged: [];
add: [stageId: string];
error: [message: string];
menuDeal: [activityId: string];
menuDeal: [activity: ActivityDto];
toggleSelect: [activityId: string];
bulkDelete: [];
}>();
@@ -115,6 +115,8 @@ function toCard(item: ActivityDto, stageId: string): PipelineDeal {
date: dateText(item),
initials: initialsFromTitle(party || item.title),
stageId,
createdAt: item.createdAt,
promotedFromPriorAt: item.promotedFromPriorAt ?? null,
assigneeNames,
ownerId: item.assignee?.id ?? null,
assigneeIds: (item.assignees ?? []).map((a) => a.id),
@@ -205,6 +207,19 @@ function findStageOf(id: string) {
return Object.entries(columns.value).find(([, col]) => col.items.some((i) => i.id === id))?.[0];
}
function findActivity(id: string) {
for (const col of Object.values(columns.value)) {
const item = col.items.find((i) => i.id === id);
if (item) return item;
}
return null;
}
function onMenuActivity(id: string) {
const item = findActivity(id);
if (item) emit('menuDeal', item);
}
function onDragStart(deal: PipelineDeal, event: DragEvent) {
draggingId.value = deal.id;
overlayDeal.value = deal;
@@ -397,7 +412,7 @@ function openActivity(id: string) {
@drop="onDrop"
@add-deal="emit('add', $event)"
@open-deal="openActivity"
@menu-deal="emit('menuDeal', $event)"
@menu-deal="onMenuActivity"
@toggle-select="emit('toggleSelect', $event)"
@bulk-delete="emit('bulkDelete')"
@rename-stage="onRenameStage"