From f74babba583a57983f085330b3bafd8577abc41d Mon Sep 17 00:00:00 2001 From: Mazarin Date: Wed, 11 Jan 2023 19:43:18 -0500 Subject: [PATCH] fix: fix important date type cant be null (#397) Close #377 --- .../Web/ViewHelpers/ContactImportantDatesViewHelper.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Domains/Contact/ManageContactImportantDates/Web/ViewHelpers/ContactImportantDatesViewHelper.php b/app/Domains/Contact/ManageContactImportantDates/Web/ViewHelpers/ContactImportantDatesViewHelper.php index 1ef8bb1ab..26d995365 100644 --- a/app/Domains/Contact/ManageContactImportantDates/Web/ViewHelpers/ContactImportantDatesViewHelper.php +++ b/app/Domains/Contact/ManageContactImportantDates/Web/ViewHelpers/ContactImportantDatesViewHelper.php @@ -26,6 +26,11 @@ public static function data(Contact $contact, User $user): array 'name' => $type->label, ]; }); + // we add an empty field so the dropdown field can be nullified + $dateTypesCollection->prepend([ + 'id' => null, + 'name' => '', + ]); return [ 'contact' => [