feat: add one-click nudge system with popover, throttling, and email notifications (Story 3.2)
Add NudgeController with 1-hour throttling per declaration, NudgePopover component on declarations index and dashboard, shadcn-vue popover primitives, and per-declaration nudge tracking. Owners/managers can nudge assigned workers with one click. Includes 10 feature tests covering authorization, throttling, and cache invalidation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,7 @@ const breadcrumbs: BreadcrumbItem[] = [
|
||||
|
||||
const hasWorkspace = computed(() => !!props.workspaceName);
|
||||
const showFeed = ref(false);
|
||||
const nudgingIds = ref(new Set<number>());
|
||||
|
||||
const isWorkerEmpty = computed(
|
||||
() =>
|
||||
@@ -347,7 +348,21 @@ function navigateToDeclaration(declaration: DashboardDeclaration): void {
|
||||
Voir
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
disabled
|
||||
v-if="canNudge"
|
||||
:disabled="nudgingIds.has(declaration.id)"
|
||||
@click.stop="
|
||||
if (!nudgingIds.has(declaration.id)) {
|
||||
nudgingIds.add(declaration.id);
|
||||
router.post(
|
||||
declaration.nudgeUrl,
|
||||
{},
|
||||
{
|
||||
preserveScroll: true,
|
||||
onFinish: () => nudgingIds.delete(declaration.id),
|
||||
},
|
||||
);
|
||||
}
|
||||
"
|
||||
>
|
||||
<Send
|
||||
class="mr-2 h-4 w-4"
|
||||
|
||||
Reference in New Issue
Block a user