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

Add "Create Documents" SearchKit action #53

Merged
merged 12 commits into from
Feb 21, 2024
Merged

Add "Create Documents" SearchKit action #53

merged 12 commits into from
Feb 21, 2024

Conversation

dontub
Copy link
Contributor

@dontub dontub commented Jan 19, 2024

This PR adds a SearchKit action for creating documents with CiviOffice. It can be easily adopted for other extensions. The action redirects to the web-based queue-runner as it is done for the legacy action. (See todo in RenderWebAction for how to improve it.)
grafik

To use the action it is required to have the access CiviCRM. (Should we have a special permission?) The entities to render are limited to those the user can get the ID for, if permission check is not disabled.

Other notable changes include:

  • Various readonly APIv4 actions.
  • Entities types given to the CiviOffice.convert API have to be in the actual case (Contact instead of contact). Using the previous ones will trigger a deprecation error.
  • Queue building is refactored to be usable from two places.
  • Civi token context generation is refactored. (Using the CiviOffice token event.)
  • APIv4 permission checks are disabled for token context generation. (If document generation is allowed than token generation must not fail. It could be considered to not add all related entities.)
  • phpcs, phpstan, phpunit in GitHub workflow. (phpcs and phpstan is currently to the Civi and tests directory.)

systopia-reference: 23716

@dontub dontub added the enhancement New feature or request label Jan 19, 2024
@dontub dontub marked this pull request as draft January 19, 2024 15:23
@dontub dontub force-pushed the searchkit-action branch 5 times, most recently from 37c08b7 to fd3e59d Compare January 23, 2024 12:49
@dontub dontub marked this pull request as ready for review January 23, 2024 16:11
@dontub dontub changed the title [WIP] Add "Create Documents" SearchKit action Add "Create Documents" SearchKit action Jan 23, 2024
Civi/Civioffice/Api4/CiviofficePermissions.php Outdated Show resolved Hide resolved
ang/angular-select2.js Outdated Show resolved Hide resolved
phpstan.ci.neon Outdated Show resolved Hide resolved
phpstan.neon.dist Show resolved Hide resolved
phpstan.neon.dist Outdated Show resolved Hide resolved
@dontub dontub merged commit 37228e0 into master Feb 21, 2024
10 checks passed
@jensschuppe jensschuppe deleted the searchkit-action branch February 27, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants