Commit Graph

17 Commits

Author SHA1 Message Date
Chirag Chhatrala 80b7c1e773
Form editor logic copy to x (#656)
* Form editor logic copy to x

* Refactor form components to use UButton and UButtonGroup for improved consistency and styling
2025-01-03 16:09:53 +01:00
Chirag Chhatrala 2366f9515d
Readonly User (#637)
* Readonly User

* Refactor FormPolicy and TemplatePolicy to centralize write operation logic

- Introduced a private method `canPerformWriteOperation` in both FormPolicy and TemplatePolicy to encapsulate the logic for determining if a user can perform write operations on the respective models.
- Updated the `update`, `delete`, `restore`, and `forceDelete` methods in FormPolicy to use the new method for improved readability and maintainability.
- Simplified the `update` and `delete` methods in TemplatePolicy to leverage the centralized write operation logic.

This refactoring enhances code clarity and reduces duplication across policy classes.

* Refactor user and workspace permissions handling

- Updated FormController to authorize form creation based on workspace context.
- Removed the `is_readonly` attribute from UserResource and integrated it into WorkspaceResource for better encapsulation.
- Refactored User model to eliminate the `getIsReadonlyAttribute` method, shifting readonly logic to the Workspace model.
- Adjusted FormPolicy and TemplatePolicy to utilize workspace readonly checks for user permissions.
- Updated various frontend components to reference workspace readonly status instead of user readonly status, enhancing clarity and consistency in permission handling.

These changes improve the management of user permissions in relation to workspaces, ensuring a more robust and maintainable authorization system.

* Fix isReadonlyUser

* fix pint

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-30 14:35:23 +01:00
Favour Olayinka f07f1d16d6
form extra menu update (#382)
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-04-22 15:55:31 +02:00
Favour Olayinka bcd45ce8a6
0351d front end linting (#377)
* feat: disable custom script for  trial users

* after lint fix

* frontend linting

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-04-15 19:39:03 +02:00
formsdev c73fcd226b
extramenu improvement (#353)
* extramenu improvement

* fix test cases
2024-03-19 15:17:23 +01:00
Favour Olayinka 29fdc961fc
move form to another workspace (#339)
* move form to another workspace

* style: apply lint

* fix typo error

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-03-12 17:55:19 +01:00
formsdev f2916b9e31
extra menu improvement (#316) 2024-02-09 09:32:38 +01:00
Favour Olayinka 000b65d4db
Form draft warning (#287)
* feat: add warning to draft form preview button

* warning modal component

* feat: use notification for draft form warning

* fix: remove unused variable

* fix: remove unused variable

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-01-29 21:15:16 +01:00
Julien Nahum dc3608f085 Fix logic bugs 2024-01-17 14:26:31 +01:00
formsdev 2207c8cd90
migrate to nuxt useClipboard (#268) 2024-01-05 09:59:53 +01:00
formsdev 178424a184
Migrate to nuxt settings page AND remove axios (#266)
* Settings pages migration

* remove axios and use opnFetch

* Make created form reactive (#267)

* Remove verify pages and axios lib

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-01-02 13:09:41 +01:00
formsdev 6fd2985ff5
Nuxt Migration notifications (#265)
* Nuxt Migration notifications

* @input to @update:model-value

* change field type fixes

* @update:model-value

* Enable form-block-logic-editor

* vue-confetti migration

* PR request changes

* useAlert in setup
2023-12-31 12:39:01 +01:00
Julien Nahum bab8517879 Fixed most of the form/show pages 2023-12-20 18:38:43 +01:00
Julien Nahum af5656ce81 Fixed form creation 2023-12-20 16:10:32 +01:00
Julien Nahum df2fa4c444 Fix dropdown 2023-12-20 13:42:43 +01:00
Julien Nahum 5c4dc2a3d6 WIP 2023-12-11 11:56:21 +01:00
Julien Nahum 1f853e8178 Work in progress 2023-12-09 15:47:03 +01:00