mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 02:19:41 +02:00
Closes the primary workflow: the user can now send an invoice from Mana in three clicks. mana-mail's JSON send API can't carry attachments yet, so we hand off to the user's default mail client via mailto: and download the PDF separately. The user attaches the PDF manually; a two-step modal keeps the draft → sent transition honest. mail-template.ts - buildInvoiceMailDraft(invoice, settings): German template with recipient name, amount, due date, QR-bill hint for CHF, sender sign- off from settings.senderName - mailDraftToMailto(): URLSearchParams + patch `+` → %20 so macOS Mail / Outlook / Thunderbird / Apple Mail iOS all preserve spaces correctly - looksLikeEmail(): permissive inline validator for the recipient field SendModal.svelte - Compose step: editable to / subject / body, warning if recipient isn't a well-formed email (non-blocking — user can fix in their mail client) - "Öffnen & herunterladen" triggers the PDF download, then navigates window.location.href to the mailto: URL (window.open gets blocked by popup blockers; location navigations survive) - Handoff step: two ✓ rows + explicit instruction to attach the PDF, "Rechnung wurde versendet" button that calls markSent() - Backdrop click + Escape both close; role="dialog" on the modal itself with tabindex so screen readers land correctly DetailView wires "Per Mail versenden" as the new primary action for drafts, keeping "Als versendet markieren" as a secondary path for users who send outside Mana (post, fax, in-person). Plan: docs/plans/invoices-module.md §M6. Next: M3 logo-upload / M7 dashboard widget / M8 AI-tools — solo-MVP is now usable end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| food | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| photos | ||
| picture | ||
| plants | ||
| presi | ||
| questions | ||
| quotes/packages/content | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||