diff --git a/laravel_app/app/Livewire/Projects/ProjectManager.php b/laravel_app/app/Livewire/Projects/ProjectManager.php index cc5d322..ffeaf76 100644 --- a/laravel_app/app/Livewire/Projects/ProjectManager.php +++ b/laravel_app/app/Livewire/Projects/ProjectManager.php @@ -61,10 +61,11 @@ private function loadFormData(Project $project) { $this->formData = $project->toArray(); $this->pivot_json_path = $this->formData['pivot_json_path']; - $this->formData['pivot_json_path'] = null; $this->span_json_path = $this->formData['span_json_path']; $this->harvest_json_path = $this->formData['harvest_json_path']; + $this->formData['pivot_json_path'] = null; $this->formData['span_json_path'] = null; + $this->formData['harvest_json_path'] = null; $this->formData['boundingBoxes'] = $project->boundingBoxes->toArray(); $this->formData['mail_recipients'] = $project->emailRecipients->toArray() ?: [ [ diff --git a/laravel_app/app/Rules/HarvestFile.php b/laravel_app/app/Rules/HarvestFile.php new file mode 100644 index 0000000..7b35310 --- /dev/null +++ b/laravel_app/app/Rules/HarvestFile.php @@ -0,0 +1,19 @@ +string('harvest_json_path')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('projects', function (Blueprint $table) { + $table->dropColumn('harvest_json_path'); + }); + } +};