-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Form editor v2 * fix template test * setFormDefaults when save * fix form cleaning dark mode * improvements on open sidebar * UI polish * Fix change type button --------- Co-authored-by: Julien Nahum <julien@nahum.net>
- Loading branch information
1 parent
47ae11b
commit d6181cd
Showing
61 changed files
with
2,541 additions
and
2,626 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
api/database/migrations/2024_09_23_054851_add_description_to_form_properties.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
use App\Models\Forms\Form; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Str; | ||
|
||
return new class () extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Form::chunk(100, function ($forms) { | ||
foreach ($forms as $form) { | ||
$properties = $form->properties; | ||
if (!empty($form->description)) { | ||
array_unshift($properties, [ | ||
'type' => 'nf-text', | ||
'content' => $form->description, | ||
'name' => 'Description', | ||
'id' => Str::uuid() | ||
]); | ||
$form->properties = $properties; | ||
$form->timestamps = false; | ||
$form->save(); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Form::chunk(100, function ($forms) { | ||
foreach ($forms as $form) { | ||
$properties = $form->properties; | ||
if (!empty($properties) && $properties[0]['type'] === 'nf-text' && $properties[0]['name'] === 'Description') { | ||
array_shift($properties); | ||
$form->properties = $properties; | ||
$form->save(); | ||
} | ||
} | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
export default defineAppConfig({ | ||
ui: { | ||
primary: 'blue', | ||
gray: 'slate' | ||
gray: 'slate', | ||
|
||
tabs: { | ||
wrapper:'space-y-0', | ||
list: { | ||
height: 'h-auto', | ||
tab: { | ||
height: 'h-[30px]' | ||
} | ||
} | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.