opnform-host-nginx/api
Chirag Chhatrala 61e9493e1e
Add Template Creation Functionality in Admin Panel (#729)
* Add create template functionality in Admin Panel

- Implemented a new endpoint for creating templates in AdminController, utilizing the GenerateTemplate command.
- Added a form in the admin settings Vue component to allow users to input a template description and submit it.
- Enhanced the user experience with loading states and success/error alerts during template creation.

These changes facilitate the generation of new form templates directly from the admin interface, improving usability and functionality.

* Update template prompt validation length in AdminController

- Increased the maximum length of the 'template_prompt' field from 1000 to 4000 characters in the createTemplate method.

This change allows for more extensive template descriptions, enhancing the flexibility of template creation in the admin panel.

* Refactor template generation to use job-based approach

- Migrate template generation logic from the GenerateTemplate command to a new GenerateTemplateJob class for improved separation of concerns and better handling of asynchronous processing.
- Update AdminController to utilize the new job for generating templates, enhancing maintainability and clarity in the codebase.
- Remove unused dependencies and streamline the command's handle method for better performance and readability.

* fix lint

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-03-25 12:14:09 +01:00
..
app Add Template Creation Functionality in Admin Panel (#729) 2025-03-25 12:14:09 +01:00
bootstrap Refactor Docker configuration and development setup 2025-01-29 17:19:36 +01:00
config Enhance JWT Token Management and Authentication Flow (#720) 2025-03-10 17:32:17 +08:00
database Decouple title from title block (#696) 2025-03-21 16:59:18 +01:00
public Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
resources Add 'exists_in_submissions' and 'does_not_exist_in_submissions' valid… (#725) 2025-03-25 11:50:59 +01:00
routes Add Template Creation Functionality in Admin Panel (#729) 2025-03-25 12:14:09 +01:00
storage Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
tests Add 'exists_in_submissions' and 'does_not_exist_in_submissions' valid… (#725) 2025-03-25 11:50:59 +01:00
.env.docker GH issue template, docker cache fix, remove docker client entrypoint 2024-09-04 11:19:03 +02:00
.env.example Enhance JWT Token Management and Authentication Flow (#720) 2025-03-10 17:32:17 +08:00
.gitignore Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
_ide_helper_models.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
artisan Update Docker Documentation to Address Line Ending Issues for Windows Users 2025-03-21 16:30:59 +01:00
composer.json Reduce docker api image size, fix issues 2024-08-28 15:20:39 +02:00
composer.lock Refactor Docker configuration and development setup 2025-01-29 17:19:36 +01:00
phpunit.xml Email spam security (#641) 2024-12-18 13:16:27 +01:00
pint.json Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
server.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
vapor.yml Update Vapor deployment configuration 2025-02-15 09:18:27 +00:00