feat(invoice): add 'Copy Invoice URL' button in InvoiceRead#719
Draft
augmentcode[bot] wants to merge 1 commit into
Draft
feat(invoice): add 'Copy Invoice URL' button in InvoiceRead#719augmentcode[bot] wants to merge 1 commit into
augmentcode[bot] wants to merge 1 commit into
Conversation
Add a 'Copy Invoice URL' button to the invoice read view that copies
a public link from the /public route to the clipboard and shows a
success toast.
- Export PUBLIC_BASE_URL constant from serverApiConfig.js pointing to
the unauthenticated /public backend route
- Add 'Copy Invoice URL' button in ReadItem.jsx (visible only for the
invoice entity) using LinkOutlined icon and Ant Design message.success
- Public URL format: /public/download/invoice/invoice-{id}.pdf which
is served by corePublicRouter without any auth middleware
- No auth changes; surfaces the existing unauthenticated /public route
Author
|
👋 I've got this PR — here's what I'll handle for you:
Marking it ready and picking reviewers are your call — I'll leave both alone. Drop a comment anytime! |
Author
|
All blocking gates are green on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Copy Invoice URL button to the invoice read view (
InvoiceRead.jsx→ReadInvoiceModule→ReadItem). Clicking it copies a tokenized public link — served by the existing unauthenticated/publicbackend route — to the clipboard and shows a success toast.Changes
frontend/src/config/serverApiConfig.jsPUBLIC_BASE_URLconstant pointing at the backend's unauthenticated/public/route (mirrors the existingDOWNLOAD_BASE_URLpattern; respectsVITE_BACKEND_SERVERin prod).frontend/src/modules/ErpPanelModule/ReadItem.jsxmessagefromantdandLinkOutlinedfrom@ant-design/icons.PUBLIC_BASE_URLfrom the config.PageHeaderextraarray, hidden for all entities exceptinvoice(same pattern as the existingConvert to Invoicebutton that hides for non-quoteentities).PUBLIC_BASE_URL + download/invoice/invoice-{id}.pdf, writes it to the clipboard vianavigator.clipboard.writeText, then showsmessage.success('Invoice URL Copied To Clipboard').Public URL format
This is served by
corePublicRouter(/publicroute inapp.js) with no auth middleware — no auth changes required.Pull Request opened by Augment Code | View session