restructure: flatten workspace nesting, move devcontainer to root

- backend/workspaces/backend/ → backend/
- backend/workspaces/frontend/ → frontend/
- backend/.devcontainer/ + .vscode/ → repo root (where VS Code expects them)
- loose scripts/SQL files → scripts/
- replace nested git repo with single repo at project root
- update docker-compose.yml build context and devcontainer.json path
- add root .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-15 11:47:58 +01:00
parent 7e725090fe
commit e63adb964d
155 changed files with 650 additions and 29 deletions

View File

@@ -0,0 +1,62 @@
import { env } from '$env/dynamic/private';
export async function load({ url, fetch }) {
const baseUrl = env.API_INTERNAL_URL || 'http://localhost:8080';
// 1. Parameter auslesen
const senderId = url.searchParams.get('senderId') || '';
const receiverId = url.searchParams.get('receiverId') || '';
const from = url.searchParams.get('from') || '';
const to = url.searchParams.get('to') || '';
const dir = url.searchParams.get('dir') || 'DESC';
let documents = [];
let senderName = '';
let receiverName = '';
// 2. Fetch-Requests vorbereiten
const requests = [];
// Dokumente laden (nur wenn beide IDs da sind)
if (senderId && receiverId) {
const query = new URLSearchParams({ senderId, receiverId, dir });
if (from) query.set('from', from);
if (to) query.set('to', to);
requests.push(
fetch(`${baseUrl}/api/documents/conversation?${query}`)
.then(r => r.ok ? r.json() : [])
.then(data => documents = data)
);
}
// Namen auflösen für Typeahead Initial Value
if (senderId) {
requests.push(
fetch(`${baseUrl}/api/persons/${senderId}`)
.then(r => r.ok ? r.json() : null)
.then(p => senderName = p ? `${p.firstName} ${p.lastName}` : '')
);
}
if (receiverId) {
requests.push(
fetch(`${baseUrl}/api/persons/${receiverId}`)
.then(r => r.ok ? r.json() : null)
.then(p => receiverName = p ? `${p.firstName} ${p.lastName}` : '')
);
}
// Alles parallel abfeuern
await Promise.all(requests);
return {
documents,
initialValues: {
senderName,
receiverName
},
filters: { senderId, receiverId, from, to, dir }
};
}