diff --git a/.gitignore b/.gitignore index 008f36801c..16de33aff0 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ public/api-docs/* /_lighthouse_ide_helper.php /programmatic-types.graphql /schema-directives.graphql +/*tinkerwell.php diff --git a/app-modules/application/src/Filament/Resources/ApplicationResource/Pages/Concerns/HasSharedFormConfiguration.php b/app-modules/application/src/Filament/Resources/ApplicationResource/Pages/Concerns/HasSharedFormConfiguration.php index 14ad57b5f4..751e937425 100644 --- a/app-modules/application/src/Filament/Resources/ApplicationResource/Pages/Concerns/HasSharedFormConfiguration.php +++ b/app-modules/application/src/Filament/Resources/ApplicationResource/Pages/Concerns/HasSharedFormConfiguration.php @@ -150,7 +150,12 @@ public function fieldBuilder(): TiptapEditor ->when($applicationStep, fn (EloquentBuilder $query) => $query->whereBelongsTo($applicationStep, 'step')) ->delete(); - $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + $content = []; + + if (filled($component->getState())) { + $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + } + $content['content'] = $this->saveFieldsFromComponents( $application, $content['content'] ?? [], diff --git a/app-modules/form/src/Filament/Resources/FormResource/Pages/Concerns/HasSharedFormConfiguration.php b/app-modules/form/src/Filament/Resources/FormResource/Pages/Concerns/HasSharedFormConfiguration.php index d291edd0fd..271a83e221 100644 --- a/app-modules/form/src/Filament/Resources/FormResource/Pages/Concerns/HasSharedFormConfiguration.php +++ b/app-modules/form/src/Filament/Resources/FormResource/Pages/Concerns/HasSharedFormConfiguration.php @@ -163,7 +163,12 @@ public function fieldBuilder(): TiptapEditor ->when($formStep, fn (EloquentBuilder $query) => $query->whereBelongsTo($formStep, 'step')) ->delete(); - $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + $content = []; + + if (filled($component->getState())) { + $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + } + $content['content'] = $this->saveFieldsFromComponents( $form, $content['content'] ?? [], diff --git a/app-modules/form/src/Filament/Resources/FormResource/Pages/SubmissionOnScreenResponse.php b/app-modules/form/src/Filament/Resources/FormResource/Pages/SubmissionOnScreenResponse.php index e752f99d26..6485cb6690 100644 --- a/app-modules/form/src/Filament/Resources/FormResource/Pages/SubmissionOnScreenResponse.php +++ b/app-modules/form/src/Filament/Resources/FormResource/Pages/SubmissionOnScreenResponse.php @@ -55,7 +55,8 @@ public function form(FilamentForm $form): FilamentForm ->schema( [ MarkdownEditor::make('on_screen_response') - ->disableToolbarButtons(['attachFiles']), + ->disableToolbarButtons(['attachFiles']) + ->columnSpanFull(), ] ); } diff --git a/app-modules/meeting-center/src/Filament/Resources/EventResource/Pages/Concerns/HasSharedEventFormConfiguration.php b/app-modules/meeting-center/src/Filament/Resources/EventResource/Pages/Concerns/HasSharedEventFormConfiguration.php index f2409a7f24..5ff3461e0f 100644 --- a/app-modules/meeting-center/src/Filament/Resources/EventResource/Pages/Concerns/HasSharedEventFormConfiguration.php +++ b/app-modules/meeting-center/src/Filament/Resources/EventResource/Pages/Concerns/HasSharedEventFormConfiguration.php @@ -190,7 +190,12 @@ public function fieldBuilder(): TiptapEditor ->when($formStep, fn (EloquentBuilder $query) => $query->whereBelongsTo($formStep, 'step')) ->delete(); - $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + $content = []; + + if (filled($component->getState())) { + $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + } + $content['content'] = $this->saveFieldsFromComponents( $form, $content['content'] ?? [], diff --git a/app-modules/service-management/src/Filament/Resources/ServiceRequestFormResource/Pages/Concerns/HasSharedFormConfiguration.php b/app-modules/service-management/src/Filament/Resources/ServiceRequestFormResource/Pages/Concerns/HasSharedFormConfiguration.php index 80f42bf288..a1307909cd 100644 --- a/app-modules/service-management/src/Filament/Resources/ServiceRequestFormResource/Pages/Concerns/HasSharedFormConfiguration.php +++ b/app-modules/service-management/src/Filament/Resources/ServiceRequestFormResource/Pages/Concerns/HasSharedFormConfiguration.php @@ -167,7 +167,12 @@ public function fieldBuilder(): TiptapEditor ->when($serviceRequestFormStep, fn (EloquentBuilder $query) => $query->whereBelongsTo($serviceRequestFormStep, 'step')) ->delete(); - $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + $content = []; + + if (filled($component->getState())) { + $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + } + $content['content'] = $this->saveFieldsFromComponents( $serviceRequestForm, $content['content'] ?? [], diff --git a/app-modules/survey/src/Filament/Resources/SurveyResource/Pages/Concerns/HasSharedFormConfiguration.php b/app-modules/survey/src/Filament/Resources/SurveyResource/Pages/Concerns/HasSharedFormConfiguration.php index 14e532825a..9b12f10ee4 100644 --- a/app-modules/survey/src/Filament/Resources/SurveyResource/Pages/Concerns/HasSharedFormConfiguration.php +++ b/app-modules/survey/src/Filament/Resources/SurveyResource/Pages/Concerns/HasSharedFormConfiguration.php @@ -163,7 +163,12 @@ public function fieldBuilder(): TiptapEditor ->when($surveyStep, fn (EloquentBuilder $query) => $query->whereBelongsTo($surveyStep, 'step')) ->delete(); - $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + $content = []; + + if (filled($component->getState())) { + $content = $component->decodeBlocksBeforeSave($component->getJSON(decoded: true)); + } + $content['content'] = $this->saveFieldsFromComponents( $survey, $content['content'] ?? [],