diff --git a/domains/Vault/ManageVault/Web/ViewHelpers/VaultReminderIndexViewHelper.php b/domains/Vault/ManageVault/Web/ViewHelpers/VaultReminderIndexViewHelper.php index 591f68e03dd..3bcff832a28 100644 --- a/domains/Vault/ManageVault/Web/ViewHelpers/VaultReminderIndexViewHelper.php +++ b/domains/Vault/ManageVault/Web/ViewHelpers/VaultReminderIndexViewHelper.php @@ -63,6 +63,10 @@ public static function data(Vault $vault, User $user): Collection $reminder = ContactReminder::where('id', $contactReminderScheduled->contact_reminder_id)->with('contact')->first(); $contact = $reminder->contact; + if ($contact->vault_id !== $vault->id) { + continue; + } + $remindersCollection->push([ 'id' => $reminder->id, 'label' => $reminder->label, diff --git a/domains/Vault/ManageVault/Web/ViewHelpers/VaultShowViewHelper.php b/domains/Vault/ManageVault/Web/ViewHelpers/VaultShowViewHelper.php index 5e8b7b7e43d..6586c3447df 100644 --- a/domains/Vault/ManageVault/Web/ViewHelpers/VaultShowViewHelper.php +++ b/domains/Vault/ManageVault/Web/ViewHelpers/VaultShowViewHelper.php @@ -65,6 +65,10 @@ public static function upcomingReminders(Vault $vault, User $user): array $reminder = ContactReminder::where('id', $contactReminderScheduled->contact_reminder_id)->with('contact')->first(); $contact = $reminder->contact; + if ($contact->vault_id !== $vault->id) { + continue; + } + $scheduledAtDate = Carbon::createFromFormat('Y-m-d H:i:s', $contactReminderScheduled->scheduled_at); $remindersCollection->push([ diff --git a/resources/js/Pages/Vault/Dashboard/Partials/UpcomingReminders.vue b/resources/js/Pages/Vault/Dashboard/Partials/UpcomingReminders.vue index 6de4862a3ce..66eab3d56b1 100644 --- a/resources/js/Pages/Vault/Dashboard/Partials/UpcomingReminders.vue +++ b/resources/js/Pages/Vault/Dashboard/Partials/UpcomingReminders.vue @@ -46,7 +46,7 @@