-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat(acms): Adds helper method to handle the Download Confirmation Page #373
feat(acms): Adds helper method to handle the Download Confirmation Page #373
Conversation
This commit adds logic to identify the download confirmation page to the ACMSPageHandler method.
Enhance the uploadDocument function by introducing an optional parameter for the ACMS document GUID.
c54f9e4
to
78caeb6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me, but it would be a lot better if you added more comments for each function. You're doing some clever things here that are in your brain now, but I think in a month or two you'll regret not explaining exactly what each thing does and why.
Think you could add that, and then we can merge?
Sure! |
3f9f3bc
to
1d55c5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Let's do it. Thank you!
This PR adds support to upload documents from the new ACMS website and inserts a banner that lets users know a matching record is available in the RECAP archive.
The PR introduces the following changes:
Refines the
dispatchHandler
method to effectively manage the Download confirmation page. The extension uses thepath
property for page identification.Uses the MutationObserver interface to monitor DOM changes and ensure all elements are rendered before proceeding. This PR removes the default
onclick
event of the "Accept Charges" button and replaces it with a custom event handler that allows us to upload documents to the RECAP archive.The Appellate class uses the ACMS API to retrieve the pdf documents so the PR adds a new file named
acms_api.js
to encapsulate utility functions designed to handle API interactions. I used theexportInstance()
andimportInstance()
methods to enable the communication between the content script and the new service.Enhances the
parseReceiptPageTitle
method by refining the regular expressions to extract the data from the title of the download confirmation page.Introduces a new helper function named
storeVueDataInSession
that extracts the app settings( API data and Auth token) and the data used by Vue to render the page and stores it in thesessionStorage
object, allowing the extension access to the same data.Add a new parameter to the
uploadDocument
function so we can send the ACMS document GUI when it's available.Here's a gif showing how the extension works:
and the banner looks like this: