- Add createOrder(plate, template, letterText) to frontend api/orders.ts - Create data/templates.ts with 6 Swedish letter templates (Komplimang, Jag vill köpa din bil, Tips / servicebehov, Synpunkter på körbeteende, Tuta / frustration, Fritt meddelande) with pre-filled body text - Rewrite ComposePage.vue with full compose flow: - Template selector dropdown (Fritt meddelande selected by default) - Textarea with 1000-char limit and live character counter - Inline A4 letter preview with plate, body, and GDPR Art. 14 footer - 'Skicka brev (49 kr)' submit button, disabled when empty - On success: redirects to /orders; on error: shows error message - Shows error with back link if no plate in route query - Add 12 Vitest tests for ComposePage (template fill, char counter, submit validation, createOrder call, navigation, null template for Fritt meddelande) - Add 8 Playwright E2E tests (auth guard, no-plate error, template selection, textarea edit, submit button state, order creation, preview content) |
||
|---|---|---|
| .. | ||
| e2e | ||
| public | ||
| src | ||
| .gitignore | ||
| .prettierrc | ||
| eslint.config.ts | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about the recommended Project Setup and IDE Support in the Vue Docs TypeScript Guide.