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:
@@ -25,16 +25,20 @@ Route::middleware(['auth', 'verified'])->group(function () {
|
||||
Route::post('declarations/{declaration}/mentions', [\App\Http\Controllers\DeclarationMentionController::class, 'store'])
|
||||
->middleware('throttle:10,1')
|
||||
->name('declarations.mentions.store');
|
||||
Route::post('declarations/{declaration}/nudge', [\App\Http\Controllers\NudgeController::class, 'store'])
|
||||
->middleware('throttle:10,1')
|
||||
->name('declarations.nudge');
|
||||
|
||||
Route::get('team', [\App\Http\Controllers\TeamController::class, 'index'])->name('team.index');
|
||||
Route::post('team/invite', [\App\Http\Controllers\TeamController::class, 'invite'])->name('team.invite');
|
||||
Route::patch('team/{workspaceUserId}/role', [\App\Http\Controllers\TeamController::class, 'updateRole'])->name('team.updateRole');
|
||||
Route::put('team/{workspaceUserId}/permissions', [\App\Http\Controllers\TeamController::class, 'updatePermissions'])->name('team.updatePermissions');
|
||||
Route::delete('team/{workspaceUserId}', [\App\Http\Controllers\TeamController::class, 'remove'])->name('team.remove');
|
||||
});
|
||||
|
||||
Route::post('notifications/{id}/read', [\App\Http\Controllers\NotificationController::class, 'markAsRead'])->name('notifications.read');
|
||||
Route::post('notifications/read-all', [\App\Http\Controllers\NotificationController::class, 'markAllAsRead'])->name('notifications.readAll');
|
||||
Route::get('notifications', [\App\Http\Controllers\NotificationController::class, 'index'])->name('notifications.index');
|
||||
Route::post('notifications/mark-all-read', [\App\Http\Controllers\NotificationController::class, 'markAllAsRead'])->name('notifications.readAll');
|
||||
Route::post('notifications/{id}/read', [\App\Http\Controllers\NotificationController::class, 'markAsRead'])->name('notifications.read');
|
||||
});
|
||||
|
||||
Route::middleware('admin')->group(function () {
|
||||
Route::resource('users', \App\Http\Controllers\UserController::class);
|
||||
|
||||
Reference in New Issue
Block a user