Skip to content

Adjustment of button locations - #78

Merged
GitTimeraider merged 3 commits into
mainfrom
develop
Jul 31, 2026
Merged

Adjustment of button locations#78
GitTimeraider merged 3 commits into
mainfrom
develop

Conversation

@GitTimeraider

Copy link
Copy Markdown
Owner

Adjustment of button locations

Copilot AI review requested due to automatic review settings July 31, 2026 15:03
@GitTimeraider
GitTimeraider merged commit de06693 into main Jul 31, 2026
2 of 3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants