From ab9c3a80db6d5a0cb8f24e68c2c0bdb2998cea47 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Thu, 10 Jul 2025 18:23:48 +0530 Subject: [PATCH] Added logic in edit page for alert mail --- .../AlertMailRuleResource/Pages/EditAlertMailRule.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Filament/Resources/AlertMailRuleResource/Pages/EditAlertMailRule.php b/app/Filament/Resources/AlertMailRuleResource/Pages/EditAlertMailRule.php index 4f9d88980..b7b6b304a 100644 --- a/app/Filament/Resources/AlertMailRuleResource/Pages/EditAlertMailRule.php +++ b/app/Filament/Resources/AlertMailRuleResource/Pages/EditAlertMailRule.php @@ -10,6 +10,15 @@ class EditAlertMailRule extends EditRecord { protected static string $resource = AlertMailRuleResource::class; + protected function mutateFormDataBeforeSave(array $data): array + { + //dd('test'); + if ($data['is_active']) { + $data['plant'] = 'All Plants'; + } + return $data; + } + protected function getHeaderActions(): array { return [