feat: Refactor duplicate handling in InterestDuplicateNotificationBanner and update merge API for better access control

This commit is contained in:
2025-07-09 16:11:37 -04:00
parent 85ec5100f3
commit bf24dc9103
4 changed files with 223 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
<template>
<!-- Debug: Always show banner for testing -->
<v-alert
v-if="showBanner && duplicateCount > 0"
type="warning"
variant="tonal"
closable
@@ -38,7 +38,7 @@
const { hasRole } = useAuthorization();
const showBanner = ref(true);
const duplicateCount = ref(3); // Test value - should show obvious duplicates
const duplicateCount = ref(0);
const loading = ref(false);
// Check for duplicates on mount (sales/admin users)
@@ -72,8 +72,7 @@ const checkForDuplicates = async () => {
}
} catch (error) {
console.error('[InterestDuplicateNotification] Failed to check for duplicates:', error);
// For debugging, let's set a test count to see if banner shows
duplicateCount.value = 2; // Test value to see if banner appears
// Silently fail - this is just a notification banner
} finally {
loading.value = false;
}