Adjustment of button locations - #78
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR changes invoice-related UX and sharing behavior across the SvelteKit frontend and Hono backend, including disabling the public invoice share route and adjusting which actions are visible on the invoice detail page.
Changes:
- Disable the public invoice share page by adding a server load that always returns 404 and replacing the page content with a placeholder comment.
- Adjust invoice detail page actions (e.g., show “Mark as Sent” for drafts; move “Edit” for drafts into the “More” menu).
- Remove the “view online/share link” block from invoice email HTML, and adjust invoice duplication insert values.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/routes/public/invoices/[token]/+page.svelte | Replaces the public invoice page content with a comment placeholder. |
| frontend/src/routes/public/invoices/[token]/+page.server.ts | Adds a server load that always throws 404 (disables public sharing). |
| frontend/src/routes/invoices/[id]/+page.svelte | Updates action button visibility/placement and draft email button label. |
| backend/src/routes/admin.ts | Removes share-link HTML generation from invoice email body (but needs a compile fix). |
| backend/src/controllers/invoices.ts | Adjusts duplicated invoice insert values to match the current invoice schema. |
Comment on lines
+4
to
+6
| export const load: PageServerLoad = async () => { | ||
| throw error(404, "Public invoice sharing is disabled"); | ||
| }; |
Comment on lines
1964
to
1968
| const dueDate = invoice.dueDate | ||
| ? new Date(invoice.dueDate).toISOString().slice(0, 10) | ||
| : null; | ||
| const origin = c.req.header("origin") || | ||
| c.req.header("referer")?.replace(/\/$/, "") || ""; | ||
| const shareLink = null; | ||
|
|
||
| // Substitute template variables in subject and message |
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.
Adjustment of button locations