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

POC PDF Automation #12450

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

POC PDF Automation #12450

wants to merge 7 commits into from

Conversation

deanhannigan
Copy link
Contributor

@deanhannigan deanhannigan commented Nov 27, 2023

Description

Purely for concept work on PDF functionality

  • Adds a HtmlToPdf step to automations
  • The new step will take Html content and create a PDF in the the object store under ${appId}/attachments/${processedFileName}. This location is not set in stone and is simply convenient for now.
  • The step takes the following parameters
    • Output Directory - Location on the file system to initially render the PDF.
    • Filename (No Extension) - Filename to be used by the document
    • HTML Template - String HTML template that can also utilise bindings. You can add in custom styles and this version currently supports linking to external media.
  • Step Outputs
    • filePath - the file id of the pdf in the store.
    • storeSync - a fully built attachment record ready to be used.

Update Row - Sync attachment

  • There is a minor update to the Update Row automation step to allow the updating of attachments (not currently supported).
  • It doesn't take into account other Attachments in the row. It simply overwrites the contents of the attachment field.
  • To make this more user friendly, this modification would need to be investigated further.
  • The storeSync response object from the HtmlToPdf step can be passed to Update Row as long as you structure it as an array e.g [ {{step.4.respose.storeSync }} ]

This may not deploy correctly in the feature branch. A sample app will be added to verify.

Feature branch env

Feature Branch Link

@deanhannigan deanhannigan added the do not merge PR is not ready to be merged - generally the PR description should say why label Nov 27, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2023

Codecov Report

Attention: 58 lines in your changes are missing coverage. Please review.

Comparison is base (bcaad6c) 68.89% compared to head (79b008a) 67.36%.
Report is 695 commits behind head on master.

Files Patch % Lines
packages/server/src/automations/steps/htmlToPDF.ts 20.51% 31 Missing ⚠️
...es/server/src/automations/steps/syncFileToStore.ts 20.58% 25 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12450      +/-   ##
==========================================
- Coverage   68.89%   67.36%   -1.53%     
==========================================
  Files         599      507      -92     
  Lines       22260    20247    -2013     
  Branches     4478     4185     -293     
==========================================
- Hits        15335    13639    -1696     
+ Misses       6408     6111     -297     
+ Partials      517      497      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added stale and removed stale labels Dec 27, 2023
@github-actions github-actions bot added the stale label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge PR is not ready to be merged - generally the PR description should say why stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants