Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define the plugin settings schema, add customization of reports #4461

Closed

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Sep 8, 2022

Description

Closes #4426 #4434 #4443 #4446 #4450

This PR:

  • Adds definitions schema for the new plugin's settings.
    • Adapts the current logic to use the new plugin's schema.
  • Adds new plugin's settings:
    • customization.reports.header: custom text for the header of the PDF reports.
    • customization.reports.footer: custom text for the footer of the PDF reports.
  • Adds validation for the plugin's settings:
    • UI: view Settings/Configuration
      • If the input contains error, it's displayed.
      • Highlight the setting with invalid input.
      • Display the count of settings with an invalid value.
      • Disable the save button when any setting is invalid.
    • Backend:
      • PUT /utils/configuration
      • PUT /utils/configuration/files/{key}
  • Adds endpoints to manage the custom assets
    • Upload: PUT /utils/configuration/files/{key}
    • Delete: DELETE /utils/configuration/files/{key}
  • Adds new hooks to manage from's inputs and changes.
  • Adds new input form components:
    • FilePicker
    • TextArea
  • Changes the existing logo customization input components, they now use a file picker.
  • Refactorizes the components related to the input form in Settings/Configuration

…ncements in `Settings/Configuration` and add new plugin settings

- Centralize the plugin settings definition
  - Define the plugin setting schema definicion
  - Adapt the affected section logic to the new schema
  - Create services to simplify some tasks related to the settings
  - Removed deprecated files
- Add plugin settings validation
  - Frontend:
    - Add the validation of the value for each type of input form
    - Display the validation error
    - Hightlight the setting with validation error
    - Display the count settings with errors in the bottom save bar
    - Disable the save button when there is some validation error
  - Backend:
    - Add validation of some endpoint parameters
- Changes in `Settings/Configuration`:
  - Adapt the components to the new plugin settings definition
  - Refactor some components and methods
  - Remove not necessary files
- Add new hooks to manage the state of the changed inputs of `Settings/Configuration`
- Add new endpoints to manage the uploading/deletion of files
- Add new settings to customize the header and footer of the PDF reports
- Add new input form of type file picker to upload the images
inputs

- Add plugin setting validation
- Refactor the inputs form
- Add new plugin setting to enable or disable the customization
- Undone configuration coming from file system
- Refactor service to check the existence or create a directory if it is
  not exist
@Desvelao
Copy link
Member Author

Desvelao commented Sep 13, 2022

@Desvelao Desvelao closed this Sep 13, 2022
@AlexRuiz7 AlexRuiz7 deleted the feat/refactor-plugin-settings-customize-logos-reports branch January 11, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment