Commit Graph

1035 Commits

Author SHA1 Message Date
Matt 45a0c45462 updates 2025-06-05 18:05:23 +02:00
Matt 3e5b8aa042 Remove api-nginx health check and add restart documentation
- Remove health check from api-nginx service to fix "starting" status issue
- Add UPDATED_RESTART_INSTRUCTIONS.md with detailed restart process
- Update api-nginx depends_on to use explicit service_started condition
2025-06-05 18:05:05 +02:00
Matt f04e93ddb4 Fix container health checks and expose services externally
- Replace artisan-based health check with php-fpm process check
- Change port bindings from localhost to all interfaces (0.0.0.0)
- Add restart policies to ensure service availability
- Extend API startup period from 60s to 90s
- Add comprehensive restart instructions and troubleshooting guide

This allows external access to the application and improves container
reliability by fixing health check failures.
2025-06-05 18:00:12 +02:00
Matt 878d72b785 Merge branch 'main' of https://github.com/JhumanJ/OpnForm 2025-06-05 17:47:30 +02:00
Matt 3a8e601a37 Refactor nginx setup to use host-level configuration
- Remove main nginx ingress container from docker-compose
- Add minimal api-nginx container for FastCGI to HTTP conversion
- Expose services directly on ports 7654 (API) and 7655 (UI)
- Add comprehensive NGINX_SETUP.md documentation
- Include example host nginx configuration
- Update docker setup script for new architecture

This change allows OpnForm to integrate better with existing host nginx
setups by removing the containerized ingress and exposing services
directly to the host for reverse proxy configuration.
2025-06-05 17:42:01 +02:00
Chirag Chhatrala 705bff439e
Enhance FieldOptions Component with Conditional Placeholder Input (#773)
- Added a conditional rendering for a `text-area-input` for placeholder text when the field type is 'text' and supports multiple lines, improving user experience in form customization.
- Updated the existing `text-input` to use `v-else-if` for better logical flow in rendering based on the presence of a placeholder.

These changes aim to enhance the flexibility of the FieldOptions component by providing users with more options for input placeholders.

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-06-05 17:38:58 +02:00
Chirag Chhatrala a11fb01bef
ESC-590 - Fix UUID and Auto Increment ID Generation Logic in StoreFormSubmissio… (#774)
* Fix UUID and Auto Increment ID Generation Logic in StoreFormSubmissionJob

- Updated the conditions for generating UUID and auto-increment IDs in the `StoreFormSubmissionJob` to ensure they only trigger when the answer value is not provided. This change enhances the logic for handling form submissions, particularly for users with non-pro subscriptions, by preventing unnecessary ID generation when an answer is already present.

These modifications aim to improve the accuracy of form submissions and ensure proper handling of ID generation based on user subscription status.

* Enhance ID Generation Logic in StoreFormSubmissionJob

- Updated conditions for UUID and auto-increment ID generation in `StoreFormSubmissionJob` to ensure they only trigger when the answer value is either not provided or invalid. This change improves the accuracy of ID generation based on user subscription status, preventing unnecessary ID creation when valid input is present.

These modifications aim to enhance the reliability of form submissions and ensure proper handling of ID generation features.

* Test  case
2025-06-05 16:58:24 +02:00
Chirag Chhatrala a140f789c2
Add Tabler Icons and Refactor Form Components (#771)
- Updated `package.json` and `package-lock.json` to include `@iconify-json/tabler` for additional icon support.
- Refactored `ImageInput.vue` to utilize `nuxt/icon` for icon rendering, enhancing consistency across components.
- Introduced `OptionSelectorInput.vue` as a new form component for selecting options in a grid layout, integrating with the form system.
- Updated `FormCustomization.vue` and `FormEditorPreview.vue` to utilize the new `OptionSelectorInput` for improved user experience in form settings.
- Enhanced `HiddenRequiredDisabled.vue` to replace manual button rendering with `OptionSelectorInput`, streamlining the component structure.

These changes aim to improve the iconography and form component functionality, providing a more cohesive and user-friendly interface.
2025-06-02 15:54:38 +02:00
Julien Nahum 9a42aacc3a Enhance Barcode Input and File Input Components with Client-Only Wrapper
- Updated `nuxt.config.ts` to include `@zxing/library` in the transpile list, ensuring compatibility with the new barcode scanning functionality.
- Modified `BarcodeInput.vue` and `FileInput.vue` components to wrap the `CameraUpload` component in a `<ClientOnly>` tag, preventing server-side rendering issues and improving the user experience during barcode scanning.

These changes aim to enhance the functionality of the barcode scanning feature while ensuring proper rendering in client-side environments.
2025-05-30 11:49:13 +02:00
Chirag Chhatrala b47a528075
Update dependencies and refactor CameraUpload component to use ZXing … (#760)
* Update dependencies and refactor CameraUpload component to use ZXing for barcode scanning

- Removed `@gtm-support/vue-gtm` from dependencies in `package-lock.json` and `package.json`.
- Added `@zxing/library` to dependencies for improved barcode scanning functionality.
- Refactored `CameraUpload.vue` to replace Quagga with ZXing for barcode detection, enhancing performance and reliability.
- Updated `FieldOptions.vue` to include QR Code as a selectable option for barcode scanning.

These changes aim to streamline the barcode scanning process and ensure the application utilizes the latest libraries for optimal performance.

* Self hosted domain redirect (#756)

* Integration pages from Notion

* Self hosted domain redirect

* Refactor root-redirect middleware and update 404 page layout

- Simplified the `root-redirect.js` middleware by removing the specific route checks, allowing for a more general redirect based on the `self_hosted` feature flag.
- Updated the 404 error page in `[...all].vue` by removing the unnecessary `NuxtLayout` wrapper and replacing `NuxtLink` with a custom `UButton` for navigation, enhancing the overall layout and user experience.

These changes aim to streamline the redirect logic and improve the presentation of the 404 error page.

* Refactor feature flag handling and update middleware

- Updated the condition in `Navbar.vue` to correctly evaluate the feature flags for rendering the AI form builder link.
- Removed the `feature-flags.global.js` middleware as it was no longer needed, streamlining the middleware structure.
- Enhanced the `root-redirect.js` middleware to utilize `h3`'s `sendRedirect` for server-side redirection, improving the redirect logic.
- Modified the `ai-form-builder.vue` page to include the new `root-redirect` middleware, ensuring proper redirection based on feature flags.

These changes aim to improve the handling of feature flags and redirection logic, enhancing the overall application flow.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>

* Remove Quagga dependency from package.json and package-lock.json to streamline barcode scanning functionality. This change is part of the ongoing effort to enhance performance by utilizing more efficient libraries, following the recent integration of ZXing for barcode detection.

* Enhance Docker Configuration and Health Checks (#761)

* Enhance Docker Configuration and Health Checks

- Added PHP configuration settings in `docker-compose.dev.yml` and `docker-compose.yml` to improve memory management and execution limits, ensuring better performance for PHP applications.
- Introduced health checks for various services including `api`, `api-worker`, `api-scheduler`, `ui`, `redis`, and `db` to ensure service availability and reliability.
- Updated environment variables in `.env.docker` and `client/.env.docker` to include new keys for H-Captcha and reCAPTCHA, enhancing security features.
- Refactored the PHP-FPM entrypoint script to apply PHP configurations dynamically based on environment variables, improving flexibility in deployment.
- Removed outdated PHP configuration files to streamline the Docker setup.

These changes aim to enhance the overall stability, performance, and security of the application in a Dockerized environment.

* Refactor Dockerfile for Improved Build Process

- Changed the Dockerfile to utilize a multi-stage build approach, separating the build and runtime environments for better efficiency.
- Introduced a builder stage using the PHP CLI image to install dependencies and extensions, optimizing the final image size.
- Removed unnecessary installation steps and combined related commands to streamline the Dockerfile, enhancing readability and maintainability.
- Updated the runtime stage to use the PHP FPM Alpine image, ensuring a smaller and more secure production environment.

These changes aim to improve the build process, reduce image size, and enhance the overall performance of the Dockerized application.

* Refactor Environment Variables Documentation

- Consolidated the documentation for environment variables in `environment-variables.mdx` by removing duplicate entries for `JWT_TTL` and `JWT_SECRET`, ensuring clarity and reducing redundancy.
- Introduced a new section for PHP configuration environment variables, detailing important settings such as `PHP_MEMORY_LIMIT`, `PHP_MAX_EXECUTION_TIME`, and others, to aid users in optimizing their PHP applications.
- Added a section for database configuration environment variables, providing essential details for connecting the Laravel backend to the database.

These changes aim to enhance the documentation's clarity and comprehensiveness, making it easier for users to configure their environments effectively.

* Update Environment Configuration for Production Deployment

- Changed the `APP_ENV` variable in the `.env.docker` file from `local` to `production`, aligning the environment settings with the deployment requirements for the production environment. This change is essential for ensuring that the application runs with the appropriate configurations and optimizations for a live setting.

This update aims to facilitate a smoother transition to production by ensuring the correct environment variables are set.

* Update Environment Variables in .env.docker

- Removed the `BROADCAST_CONNECTION` and `SESSION_LIFETIME` variables from the `.env.docker` file, streamlining the environment configuration for better clarity and relevance.
- Retained essential Redis configurations for caching and session management, ensuring that the application maintains its performance and functionality.

This change aims to simplify the environment setup by eliminating unnecessary variables that are no longer needed.

* Refactor Docker Entrypoint and Environment Variables

- Removed the `IS_API_WORKER` environment variable from `docker-compose.yml`, simplifying the configuration for API services and aligning with the new role-based command handling.
- Updated the `php-fpm-entrypoint` script to determine the role (API, worker, or scheduler) based on the command being executed, enhancing flexibility and clarity in service initialization.
- Streamlined the setup process for different roles, ensuring that appropriate commands are executed based on the determined role, which improves maintainability and reduces potential errors.

These changes aim to enhance the Docker configuration by adopting a more dynamic approach to service roles, improving the overall deployment process.

* Enhance PHP Configuration Defaults in Docker Entrypoint

- Updated the `php-fpm-entrypoint` script to set default values for PHP configuration settings, including `memory_limit`, `max_execution_time`, `upload_max_filesize`, and `post_max_size`, when not explicitly provided through environment variables. This change ensures that the application has sensible defaults, improving reliability and reducing potential misconfigurations during deployment.

These modifications aim to enhance the Docker setup by providing fallback values for critical PHP settings, thereby streamlining the configuration process and ensuring better performance in various environments.

* Update Docker Compose Configuration for Storage Volume

- Changed the storage volume mapping in `docker-compose.yml` from a relative path (`./api/storage`) to a named volume (`opnform_storage`). This modification enhances portability and consistency across different environments by utilizing Docker's volume management, ensuring that the storage is properly managed and isolated.

This change aims to improve the Docker setup by leveraging named volumes for better data persistence and management.

* Update Documentation and Configuration for Subdomain Redirect

- Added a link to the new "Subdomain Redirect Configuration" page in `environment-variables.mdx` to enhance user guidance on setting up subdomain redirects.
- Updated the `mint.json` file to include "configuration/subdomain-redirect" in the configuration paths, ensuring it is recognized in the documentation structure.

These changes aim to improve the documentation's comprehensiveness and provide users with clear instructions for configuring subdomain redirects, thereby enhancing the overall setup experience.

* Enhance Form Management with Dynamic Configuration Updates

- Added a new watcher in `OpenCompleteForm.vue` to monitor changes to the form prop and update the form manager accordingly, ensuring that the form manager reflects the latest configuration.
- Introduced an `updateConfig` method in `useFormManager.js` to handle updates to the form configuration, resetting the form state and reinitializing with the new config. This improves the flexibility and responsiveness of the form management system.

These changes aim to enhance the user experience by ensuring that form updates are seamlessly integrated into the form management workflow, allowing for more dynamic interactions.

* Refactor FlatSelectInput Component to Simplify Template Structure

- Removed the conditional rendering of the selected options slot in `FlatSelectInput.vue`, streamlining the template for better readability and maintainability. This change focuses on enhancing the component's clarity by eliminating unnecessary complexity in the markup.

These modifications aim to improve the overall structure of the FlatSelectInput component, making it easier to understand and work with in future development.

* Enhance Application Optimization in Docker Entrypoint

- Added a cache clearing step in the `optimize_application` function of the `php-fpm-entrypoint` script. This new line executes `php ./artisan optimize:clear` before optimizing the application, ensuring that any stale cache is removed, which can lead to improved performance and reliability during application optimization.

This change aims to enhance the application's responsiveness by ensuring that the optimization process starts with a clean state, thereby reducing potential issues related to outdated cached data.

* Refactored UI

* Refactor CameraUpload Component for Improved Webcam Handling

- Updated the CameraUpload.vue component to replace element IDs with Vue refs for better reactivity and maintainability. This change enhances the component's structure by utilizing Vue's reference system, allowing for more efficient DOM manipulation.
- Modified the webcam initialization logic to accommodate both regular and barcode modes, ensuring that the appropriate setup is executed based on the current mode.
- Improved error handling and cleanup processes for the webcam stream, enhancing the robustness of the component during camera operations.
- Streamlined the barcode scanning logic by using ZXing's decodeFromConstraints method, which simplifies the handling of video streams and improves performance.

These modifications aim to enhance the overall functionality and reliability of the CameraUpload component, providing a better user experience during webcam interactions.

* Enhance Barcode Decoder Options and Add QR Code Reader Configuration

- Added 'QR Code' to the barcode decoders options in `FieldOptions.vue`, ensuring users can select this option for scanning.
- Updated `blocks_types.json` to include a new configuration for the QR Code Reader, providing default values and settings for its integration.
- Refactored the `working_form.js` store to accommodate changes in block definitions, ensuring that the effective type and settings are applied correctly when adding blocks.

These modifications aim to improve the functionality and user experience of barcode scanning within the application.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-05-30 10:30:19 +02:00
Chirag Chhatrala cac88e7a3c
ESC-575 If operator has no format and no expected_type, it means it doesn't n… (#767)
* If operator has no format and no expected_type, it means it doesn't need input

* Add testcase for integration logic with checkbox

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-05-28 10:05:24 +02:00
Julien Nahum 360b116062 Enhance Form Manager with Reactive Mode Handling
- Introduced a reactive reference for the `mode` prop in `OpenCompleteForm.vue`, allowing for dynamic updates to the form mode.
- Updated the `useFormManager` function to accept a reactive `mode` reference, ensuring that the form management logic adapts to changes in the mode dynamically.
- Modified the strategy computation in `useFormManager` to utilize the reactive `mode`, improving the responsiveness of the form management system.

These changes aim to enhance the flexibility and adaptability of the form management system by allowing real-time updates to the form mode, thereby improving user interactions and overall experience.
2025-05-27 20:51:53 +02:00
JhumanJ 72a87f1de8 Revert docker-compose.yml to use pre-built images - switches back from local builds to published Docker images 2025-05-27 18:17:18 +02:00
JhumanJ 61fc30b95c Enhance Pinia History Plugin with State Filtering and Configuration Options
- Added an `ignoreKeys` option in the `mergeOptions` function of `pinia-history.js` to specify keys that should be excluded from history tracking, improving the plugin's flexibility.
- Introduced a new `filterState` function to filter out ignored keys from the state object, ensuring that only relevant state changes are tracked.
- Updated the history management logic to utilize the filtered state, enhancing the accuracy of undo/redo functionality.
- Modified the `working_form.js` store to include default ignored keys for history tracking, streamlining the configuration process.

These changes aim to improve the usability and performance of the Pinia history plugin by allowing developers to customize which state properties are tracked, thereby reducing unnecessary history entries.
2025-05-27 17:45:16 +02:00
Julien Nahum f3a02df80e
Version in self hosted (#770)
* Enhance Application Version Management in Docker and Feature Flags

- Added a new build argument `APP_VERSION` in the Docker configuration files to facilitate version tracking during builds.
- Introduced a private method `getAppVersion` in `FeatureFlagsController` to retrieve the application version from the Docker environment, enhancing the feature flags response with version information.
- Updated the `app.php` configuration file to include a new entry for `docker_version`, allowing for better version management and fallback when the Docker build version is unavailable.

These changes aim to improve the application's versioning capabilities, ensuring that the version is consistently available across different components and environments.

* Refactor OpenFormFooter and Update Feature Flags Handling

- Modified `OpenFormFooter.vue` to include a version display when available, enhancing user awareness of the application version.
- Refactored the script section to use the `<script setup>` syntax, improving readability and reactivity by utilizing `ref` and `computed` for reactive properties.
- Removed the deprecated `feature-flags.js` plugin and updated `featureFlags.js` to ensure proper SSR compatibility and error handling during feature flag fetching.

These changes aim to improve the user interface by providing version information and enhance the overall code structure for better maintainability and performance.
2025-05-27 17:44:42 +02:00
Chirag Chhatrala a030a84652
Enhance Sitemap Configuration with Dynamic URL Generation (#769)
- Introduced functions to dynamically generate URLs for template industries and types in `sitemap.js`, improving the sitemap's adaptability to changes in templates.
- Added an asynchronous function to fetch integration pages from an external API, enhancing the sitemap's content with integration links.
- Updated cache duration to 2 hours for better performance.

These changes aim to improve the sitemap's functionality and ensure it reflects the latest available templates and integrations.

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-05-27 10:31:11 +02:00
Chirag Chhatrala 434d8b694f
Update FieldOptions Component to Include Additional Input Types (#768)
- Expanded the `typesWithoutPlaceholder` array in `FieldOptions.vue` to include new input types: 'matrix', 'signature', 'barcode', 'scale', 'slider', and 'rating'. This enhancement allows for broader form field options, improving the flexibility and usability of the form component.

These changes aim to enhance the form capabilities by accommodating a wider range of input types, thereby enriching the user experience.
2025-05-27 10:20:45 +02:00
Julien Nahum 3730b80980 Merge branch 'main' of https://github.com/JhumanJ/OpnForm 2025-05-23 21:09:53 +02:00
Julien Nahum 2a92d9f24c Refactor FlatSelectInput Component to Simplify Template Structure
- Removed the conditional rendering of the selected options slot in `FlatSelectInput.vue`, streamlining the template for better readability and maintainability. This change focuses on enhancing the component's clarity by eliminating unnecessary complexity in the markup.

These modifications aim to improve the overall structure of the FlatSelectInput component, making it easier to understand and work with in future development.
2025-05-23 21:09:46 +02:00
Julien Nahum 014a1f4408 Enhance Application Optimization in Docker Entrypoint
- Added a cache clearing step in the `optimize_application` function of the `php-fpm-entrypoint` script. This new line executes `php ./artisan optimize:clear` before optimizing the application, ensuring that any stale cache is removed, which can lead to improved performance and reliability during application optimization.

This change aims to enhance the application's responsiveness by ensuring that the optimization process starts with a clean state, thereby reducing potential issues related to outdated cached data.
2025-05-23 20:40:56 +02:00
Julien Nahum 591d21d888 Enhance Form Management with Dynamic Configuration Updates
- Added a new watcher in `OpenCompleteForm.vue` to monitor changes to the form prop and update the form manager accordingly, ensuring that the form manager reflects the latest configuration.
- Introduced an `updateConfig` method in `useFormManager.js` to handle updates to the form configuration, resetting the form state and reinitializing with the new config. This improves the flexibility and responsiveness of the form management system.

These changes aim to enhance the user experience by ensuring that form updates are seamlessly integrated into the form management workflow, allowing for more dynamic interactions.
2025-05-23 19:15:19 +02:00
Julien Nahum 7918134c08 Merge branch 'main' of https://github.com/JhumanJ/OpnForm 2025-05-23 18:26:47 +02:00
Julien Nahum 5ccf400a66 Update Docker Compose Configuration for Storage Volume
- Changed the storage volume mapping in `docker-compose.yml` from a relative path (`./api/storage`) to a named volume (`opnform_storage`). This modification enhances portability and consistency across different environments by utilizing Docker's volume management, ensuring that the storage is properly managed and isolated.

This change aims to improve the Docker setup by leveraging named volumes for better data persistence and management.
2025-05-23 18:26:40 +02:00
JhumanJ 6756bbf10f Update Documentation and Configuration for Subdomain Redirect
- Added a link to the new "Subdomain Redirect Configuration" page in `environment-variables.mdx` to enhance user guidance on setting up subdomain redirects.
- Updated the `mint.json` file to include "configuration/subdomain-redirect" in the configuration paths, ensuring it is recognized in the documentation structure.

These changes aim to improve the documentation's comprehensiveness and provide users with clear instructions for configuring subdomain redirects, thereby enhancing the overall setup experience.
2025-05-23 16:02:26 +02:00
Julien Nahum b34f7b3961 Enhance PHP Configuration Defaults in Docker Entrypoint
- Updated the `php-fpm-entrypoint` script to set default values for PHP configuration settings, including `memory_limit`, `max_execution_time`, `upload_max_filesize`, and `post_max_size`, when not explicitly provided through environment variables. This change ensures that the application has sensible defaults, improving reliability and reducing potential misconfigurations during deployment.

These modifications aim to enhance the Docker setup by providing fallback values for critical PHP settings, thereby streamlining the configuration process and ensuring better performance in various environments.
2025-05-22 19:48:11 +02:00
Julien Nahum 7d7aba10b1 Refactor Docker Entrypoint and Environment Variables
- Removed the `IS_API_WORKER` environment variable from `docker-compose.yml`, simplifying the configuration for API services and aligning with the new role-based command handling.
- Updated the `php-fpm-entrypoint` script to determine the role (API, worker, or scheduler) based on the command being executed, enhancing flexibility and clarity in service initialization.
- Streamlined the setup process for different roles, ensuring that appropriate commands are executed based on the determined role, which improves maintainability and reduces potential errors.

These changes aim to enhance the Docker configuration by adopting a more dynamic approach to service roles, improving the overall deployment process.
2025-05-22 13:21:56 +02:00
Julien Nahum 3200253163 Update Environment Variables in .env.docker
- Removed the `BROADCAST_CONNECTION` and `SESSION_LIFETIME` variables from the `.env.docker` file, streamlining the environment configuration for better clarity and relevance.
- Retained essential Redis configurations for caching and session management, ensuring that the application maintains its performance and functionality.

This change aims to simplify the environment setup by eliminating unnecessary variables that are no longer needed.
2025-05-22 11:48:58 +02:00
Julien Nahum 1628c445d2 Update Environment Configuration for Production Deployment
- Changed the `APP_ENV` variable in the `.env.docker` file from `local` to `production`, aligning the environment settings with the deployment requirements for the production environment. This change is essential for ensuring that the application runs with the appropriate configurations and optimizations for a live setting.

This update aims to facilitate a smoother transition to production by ensuring the correct environment variables are set.
2025-05-22 11:48:36 +02:00
Julien Nahum eba87803a9 Refactor Environment Variables Documentation
- Consolidated the documentation for environment variables in `environment-variables.mdx` by removing duplicate entries for `JWT_TTL` and `JWT_SECRET`, ensuring clarity and reducing redundancy.
- Introduced a new section for PHP configuration environment variables, detailing important settings such as `PHP_MEMORY_LIMIT`, `PHP_MAX_EXECUTION_TIME`, and others, to aid users in optimizing their PHP applications.
- Added a section for database configuration environment variables, providing essential details for connecting the Laravel backend to the database.

These changes aim to enhance the documentation's clarity and comprehensiveness, making it easier for users to configure their environments effectively.
2025-05-22 10:38:57 +02:00
Julien Nahum ae21cae8cd
Enhance Docker Configuration and Health Checks (#761)
* Enhance Docker Configuration and Health Checks

- Added PHP configuration settings in `docker-compose.dev.yml` and `docker-compose.yml` to improve memory management and execution limits, ensuring better performance for PHP applications.
- Introduced health checks for various services including `api`, `api-worker`, `api-scheduler`, `ui`, `redis`, and `db` to ensure service availability and reliability.
- Updated environment variables in `.env.docker` and `client/.env.docker` to include new keys for H-Captcha and reCAPTCHA, enhancing security features.
- Refactored the PHP-FPM entrypoint script to apply PHP configurations dynamically based on environment variables, improving flexibility in deployment.
- Removed outdated PHP configuration files to streamline the Docker setup.

These changes aim to enhance the overall stability, performance, and security of the application in a Dockerized environment.

* Refactor Dockerfile for Improved Build Process

- Changed the Dockerfile to utilize a multi-stage build approach, separating the build and runtime environments for better efficiency.
- Introduced a builder stage using the PHP CLI image to install dependencies and extensions, optimizing the final image size.
- Removed unnecessary installation steps and combined related commands to streamline the Dockerfile, enhancing readability and maintainability.
- Updated the runtime stage to use the PHP FPM Alpine image, ensuring a smaller and more secure production environment.

These changes aim to improve the build process, reduce image size, and enhance the overall performance of the Dockerized application.
2025-05-20 19:20:44 +02:00
Chirag Chhatrala b2b04d7f2a
Self hosted domain redirect (#756)
* Integration pages from Notion

* Self hosted domain redirect

* Refactor root-redirect middleware and update 404 page layout

- Simplified the `root-redirect.js` middleware by removing the specific route checks, allowing for a more general redirect based on the `self_hosted` feature flag.
- Updated the 404 error page in `[...all].vue` by removing the unnecessary `NuxtLayout` wrapper and replacing `NuxtLink` with a custom `UButton` for navigation, enhancing the overall layout and user experience.

These changes aim to streamline the redirect logic and improve the presentation of the 404 error page.

* Refactor feature flag handling and update middleware

- Updated the condition in `Navbar.vue` to correctly evaluate the feature flags for rendering the AI form builder link.
- Removed the `feature-flags.global.js` middleware as it was no longer needed, streamlining the middleware structure.
- Enhanced the `root-redirect.js` middleware to utilize `h3`'s `sendRedirect` for server-side redirection, improving the redirect logic.
- Modified the `ai-form-builder.vue` page to include the new `root-redirect` middleware, ensuring proper redirection based on feature flags.

These changes aim to improve the handling of feature flags and redirection logic, enhancing the overall application flow.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-05-20 14:51:44 +02:00
Chirag Chhatrala cc2b0e989d
Slug customisation (#755)
* Enhance Form Slug Handling and Validation Logic

- Updated `FormController.php` to conditionally set the form slug based on the `self_hosted` configuration, ensuring proper slug assignment during form creation and updates.
- Introduced `CustomSlugRule.php` to validate custom slugs, enforcing format and uniqueness constraints, and integrated this rule into `UserFormRequest.php`.
- Enhanced the `FormCustomSeo.vue` component to include a field for custom URL slugs, improving user experience by allowing users to define unique identifiers for their forms.
- Updated API routes to apply middleware for form updates, ensuring proper form resolution during requests.

These changes aim to improve the functionality and user experience related to form slug management and validation.

* Test case for Custom slug

* Update OpenCompleteForm and FormCustomSeo for Improved Functionality and Clarity

- Modified `OpenCompleteForm.vue` to ensure `submissionId` is correctly referenced as `submissionId.value`, enhancing data handling during form initialization.
- Updated `FormCustomSeo.vue` to rename "Custom URL Slug" to "Custom Form URL" for better clarity and user understanding, ensuring consistent terminology across the application.
- Enhanced `useFormInitialization.js` to include `submission_id` in the data passed to `form.resetAndFill`, improving the accuracy of form data handling.

These changes aim to improve the functionality and user experience of the form components by ensuring correct data references and clearer labeling.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-05-19 21:06:54 +02:00
Julien Nahum fb64a948a3 Merge branch 'main' of https://github.com/JhumanJ/OpnForm
the commit.
2025-05-19 19:42:41 +02:00
Julien Nahum edfcf5a736 Enhance VTransition and OpenForm Components for Improved Animation and Structure
- Added a new transition effect named 'fadeHeight' in `VTransition.vue` to enhance the visual experience during component transitions.
- Wrapped `open-form-field` components in `OpenForm.vue` with the newly created `VTransition` to apply the fadeHeight transition, improving the overall user experience during form interactions.

These changes aim to provide smoother animations and better structure in the form components, enhancing user engagement and visual appeal.
2025-05-19 19:42:33 +02:00
JhumanJ 1b67cd808b Update GTM Configuration and Dependencies
- Added a new `enabled` property to the GTM configuration in `gtm.js`, allowing for conditional enabling of the GTM plugin.
- Updated the `package-lock.json` to include the latest versions of `@gtm-support/vue-gtm` and `@gtm-support/core`, ensuring compatibility and access to new features.
- Modified the `onMounted` lifecycle hook in `FeatureBase.vue` to include a check for the `user` state, preventing script loading when the user is not available.

These changes aim to enhance the GTM integration by providing more control over its activation and ensuring that the latest dependencies are utilized for improved functionality.
2025-05-19 15:54:45 +02:00
Chirag Chhatrala 1c26e282c5
Fix form initialization (#759)
* Fix form initialization

* improve condition
2025-05-19 15:48:56 +02:00
JhumanJ 96786215aa Enhance Crisp Plugin Configuration Logic
- Updated the Crisp plugin configuration in `crisp.client.js` to prevent initialization when on the public form page. This change introduces a new condition that checks if the current route is the 'forms-slug' page, ensuring that the Crisp chat functionality is only enabled on appropriate pages.

These changes aim to improve the user experience by preventing unnecessary chat interactions on specific pages, thereby streamlining the application behavior.
2025-05-19 15:16:33 +02:00
Chirag Chhatrala c17f4776bc
Integration pages from Notion (#753)
* Integration pages from Notion

* fix integration page

* Refactor environment variables and update routing in integration pages

- Removed unused environment variables related to MUX from `.env.docker` and `.env.example` to streamline configuration.
- Updated routing links in `OpenFormFooter.vue` to correct navigation paths for "Integrations", "Report Abuse", and "Privacy Policy", enhancing user experience.
- Added middleware to `definePageMeta` in `index.vue` and `[slug].vue` for integration pages to enforce self-hosted logic.

These changes aim to improve code clarity and ensure proper routing functionality across the application.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-05-19 15:08:15 +02:00
JhumanJ f9c734c826 Update Loading State in OpenForm Component
- Changed the loading state binding in `OpenForm.vue` from `form.busy` to `isProcessing` for improved clarity and consistency in the form submission process.
- Introduced a computed property `isProcessing` to derive the loading state from the `formManager`'s state, enhancing the responsiveness of the UI during form interactions.

These changes aim to provide a more intuitive user experience by accurately reflecting the form's processing state during submissions.
2025-05-19 14:53:30 +02:00
JhumanJ 088e76955d Enhance Form Functionality and Submission Logic
- Added `restart` and `formManager` to the exposed properties in `OpenCompleteForm.vue` for improved form management.
- Implemented a watcher in `FormEditorPreview.vue` to reset the form when switching modes, enhancing user experience during form interactions.
- Updated the `restartForm` function in `FormEditorPreview.vue` to handle errors gracefully and ensure the form can be restarted correctly.
- Modified the `useFormSubmission.js` to conditionally perform submissions based on the form mode strategy, allowing for mock submissions in preview mode.

These changes aim to improve the overall functionality and user experience of form handling within the application, ensuring better management and interaction with forms.
2025-05-19 12:23:37 +02:00
JhumanJ 1ba7805e35 Enhance Form Visibility Logic and UI Components
- Updated the `getIsClosedAttribute` method in `Form.php` to include a check for the form's visibility status, ensuring that forms marked as 'closed' are accurately reflected in their state.
- Modified `QuillyEditor.vue` to import additional Quill patches for improved functionality.
- Changed the alert color from yellow to amber in `OpenCompleteForm.vue` for better visual consistency.
- Refactored the form status display in `OpenCompleteForm.vue` and `show.vue` to utilize the new `FormStatusBadges` component, streamlining the UI and improving maintainability.
- Enhanced the `FormEditorNavbar.vue` to include icons for better user experience and clarity.

These changes aim to improve the accuracy of form visibility handling and enhance the overall user interface across various components.
2025-05-16 19:59:08 +02:00
Chirag Chhatrala b5517c6fce
Fix quill and mentions (#758)
* Enhance MentionParser and Related Components for Improved Mention Handling

- Updated `MentionParser.php` to support the `mention="true"` syntax, allowing for more flexible mention parsing.
- Added tests in `MentionParserTest.php` to verify the handling of mentions with the `mention="true"` attribute, including support for URL-encoded field IDs.
- Refactored `MentionInput.vue`, `MentionDropdown.vue`, and `RichTextAreaInput.client.vue` to ensure consistent use of `mention-state` and improve mention dropdown functionality.
- Enhanced `quillMentionExtension.js` to better manage mention data and improve integration with Quill editor.

These changes aim to improve the functionality and reliability of the mention feature across the application, ensuring a better user experience.

* Refactor FormInformation Component for Improved Logic and Structure

- Updated `FormInformation.vue` to utilize the composition API with script setup syntax, enhancing readability and maintainability.
- Replaced `v-if` condition for form visibility with a computed property `isFormClosingOrClosed` for better clarity.
- Streamlined data handling by converting data and computed properties to reactive state and computed properties, respectively.
- Improved the copy settings logic to utilize refs, ensuring proper state management.

These changes aim to enhance the overall structure and functionality of the `FormInformation` component, providing a better user experience and code clarity.
2025-05-16 17:09:07 +02:00
JhumanJ 29b513a6f6 Enhance Sentry Client Configuration for Improved Error Handling
- Updated the `beforeSend` function in `sentry.client.config.ts` to improve error filtering by introducing checks for chunk loading errors and validation exceptions. This prevents unnecessary error reporting to Sentry, enhancing the relevance of logged errors.
- Refactored user information retrieval to use a local variable for better clarity and maintainability.

These changes aim to streamline error reporting and improve the overall reliability of the Sentry integration in the client application.
2025-05-16 12:46:12 +02:00
JhumanJ 0dfec52cf8 Refactor Docker Configuration and Enhance Build Process
- Removed the build context and Dockerfile specification from the `docker-compose.dev.yml` and `docker-compose.yml` files for the `ui` service, streamlining the configuration.
- Increased Node memory limit in the `Dockerfile.client` to prevent out of memory errors during the build process, ensuring smoother builds and improved performance.

These changes aim to simplify the Docker setup and enhance the reliability of the build process for the client application.
2025-05-15 20:21:36 +02:00
Chirag Chhatrala 9b2d4551b8
Apply refactor changes for edit submission (#757) 2025-05-15 16:24:11 +02:00
Chirag Chhatrala a430621b4c
ESC-539 - Refactor SignatureInput Component for Consistency and Enhanced Logic (#749)
* Refactor SignatureInput Component for Consistency and Enhanced Logic

- Updated the `SignatureInput.vue` component to use `InputWrapper` instead of `input-wrapper` for consistency with naming conventions.
- Added logic to reset the signature field value when the model value is an array, improving handling of Notion database data.
- Enhanced the `mounted` lifecycle hook to ensure the signature pad canvas is resized correctly after rendering.
- Improved error handling in the file upload process by capturing the error in the catch block.

These changes aim to enhance the maintainability and functionality of the `SignatureInput` component, ensuring better user experience and consistency across the codebase.

* Refactor SignatureInput Component to Remove Unused ModelValue Logic

- Removed the modelValue handler logic from the `SignatureInput.vue` component, simplifying the component's state management.
- Cleaned up the created lifecycle hook by eliminating unnecessary checks related to Notion array data handling.

These changes aim to enhance the maintainability of the `SignatureInput` component by streamlining its logic and improving overall code clarity.

* fix lint

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-05-14 17:19:18 +02:00
Chirag Chhatrala 9280b106e0
UX Improvements for integrations (#750)
Co-authored-by: Julien Nahum <julien@nahum.net>
2025-05-14 16:28:28 +02:00
JhumanJ 1baecdc177 Fix hydratation issues. Refactor OpenCompleteForm and app.vue for Improved Component Structure
- Wrapped `feature-base`, `SubscriptionModal`, and `QuickRegister` components in a `ClientOnly` tag within `app.vue` to enhance rendering behavior and prevent server-side rendering issues.
- Removed commented-out code in `OpenCompleteForm.vue` to clean up the component and improve readability.

These changes aim to improve the overall structure and maintainability of the components by ensuring proper rendering and clarity in the codebase.
2025-05-14 12:39:02 +02:00
JhumanJ 20e643261a Remove generate_tax_exports_2024.sh Script
This change aims to streamline the codebase by eliminating obsolete scripts that are no longer needed.
2025-05-14 10:17:44 +02:00
JhumanJ 1a8af6257a Refactor QuillyEditor and Quill Mention Extension for Improved Functionality
- Updated `QuillyEditor.vue` to enhance the handling of model updates and internal changes, ensuring better synchronization between the editor and the model value. Introduced a new `pasteHTML` function to manage HTML content pasting more effectively.
- Refactored `quillMentionExtension.js` to improve the processing of pasted content, ensuring that only valid mentions are retained and transforming flat mention structures into nested ones for better data integrity.
- Enhanced the SCSS styles in `app.scss` to apply list styles to ordered and unordered lists within the `.field-help` class, improving the visual presentation of help text.

These changes aim to improve the overall functionality, maintainability, and user experience of the QuillyEditor component and its associated mention extension.
2025-05-12 13:08:58 +02:00