Add template save event handling and update preview functionality: Implemented afterSave method in Footer, Header, Menu, and Section templates to dispatch a 'template-saved' event for Livewire. Updated template preview components to listen for this event, ensuring previews are refreshed after template modifications. Enhanced viewData method in template forms for better record ID handling.
This commit is contained in:
@@ -52,4 +52,11 @@ class EditSectionTemplate extends EditRecord
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function afterSave(): void
|
||||
{
|
||||
// Kaydetme sonrası preview'ı güncelle
|
||||
// Livewire event dispatch et
|
||||
$this->dispatch('template-saved');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user