feat: Refactor duplicate handling in InterestDuplicateNotificationBanner and update merge API for better access control
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user