Separate input type for Rating,Scale,Slider (#351)

* Separate input type for Rating,Scale,Slider

* rating, scale, slider add in test cases

* Allow field type change for new types

* Added options to db factory

* Fix linting

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
formsdev
2024-03-19 19:57:21 +05:30
committed by GitHub
parent c73fcd226b
commit c8628ed840
20 changed files with 1104 additions and 612 deletions

View File

@@ -53,7 +53,7 @@ class GenerateAiForm implements ShouldQueue
$this->completion->update([
'status' => AiFormCompletion::STATUS_COMPLETED,
'result' => $this->cleanOutput($completer->getArray()),
'result' => GenerateTemplate::cleanAiOutput($completer->getArray())
]);
} catch (\Exception $e) {
$this->onError($e);
@@ -61,16 +61,6 @@ class GenerateAiForm implements ShouldQueue
}
private function cleanOutput($formData)
{
// Add property uuids
foreach ($formData['properties'] as &$property) {
$property['id'] = Str::uuid()->toString();
}
return $formData;
}
/**
* Handle a job failure.
*/