feat(deploy): TrueNAS Custom-App + Auto-Deploy, plus aufgelaufene Arbeit
Deployment: - custom-app.compose.yaml: self-contained Compose fuer TrueNAS "Custom App" (absolute Host-Bind-Pfade, postgres:18, pull_policy always, Port 8090) - scripts/truenas-deploy.sh: Host-Skript create/redeploy via midclt (App bleibt unter Apps sichtbar) inkl. Image-Pull + Health-Check - ci.yml Deploy-Job: laeuft auf ubuntu-latest-Runner, kopiert Deploy-Dateien per SSH auf den NAS-Host und triggert truenas-deploy.sh (statt runs-on goldeye) - compose.yaml/.env.example: postgres:18 (Locale-Match zur Quell-DB), Port 8090 - .gitignore: .agents/, tools/rag/, deploy/truenas/.env (Secrets/Scratch) Aufgelaufene Feature-Arbeit (verified/Freeze, Migrationen, Import-Triage): - GerbilOverride/VerifiedGerbil-Endpoints + GerbilSnapshotService + Tests - EF-Migrationen (ShowInChronicle, Stillborn, BirthOrder, ManualFlag, DSGVO) - Frontend VerifizierteTierePage + verified-API + e2e-Spec - diverse Import-/Triage-Skripte und -Tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -414,6 +414,44 @@ export async function installMockApi(page: Page): Promise<MockDb> {
|
||||
return json(route, 200, result)
|
||||
}
|
||||
|
||||
// GEPRÜFTE TIERE: „vollständig korrekt"-Markierung / Schutz (/verified-gerbils).
|
||||
if (path === '/verified-gerbils' && method === 'GET') {
|
||||
return json(route, 200, [...db.verified].reverse())
|
||||
}
|
||||
const verMatch = path.match(/^\/verified-gerbils\/([^/]+)$/)
|
||||
if (verMatch) {
|
||||
const gid = decodeURIComponent(verMatch[1])
|
||||
const vIdx = db.verified.findIndex((v) => v.gerbilId === gid)
|
||||
if (method === 'GET') {
|
||||
return vIdx >= 0 ? json(route, 200, db.verified[vIdx]) : json(route, 404, { title: 'Not Found' })
|
||||
}
|
||||
if (method === 'POST') {
|
||||
const g = db.gerbils.find((x) => x.id === gid)
|
||||
if (!g) return json(route, 404, { title: 'Not Found' })
|
||||
const body = (request.postDataJSON() ?? {}) as { note?: string | null }
|
||||
const row = {
|
||||
gerbilId: gid,
|
||||
entityName: g.name ?? null,
|
||||
isVerified: true,
|
||||
status: 'unchanged',
|
||||
verifiedAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
note: body.note ?? null,
|
||||
protectedFields: ['name', 'gender', 'dateOfBirth', 'genotype'],
|
||||
importDiff: [],
|
||||
}
|
||||
if (vIdx >= 0) db.verified[vIdx] = row
|
||||
else db.verified.push(row)
|
||||
return json(route, 200, row)
|
||||
}
|
||||
if (method === 'DELETE') {
|
||||
if (vIdx < 0) return json(route, 404, { title: 'Not Found' })
|
||||
db.verified.splice(vIdx, 1)
|
||||
return json(route, 204)
|
||||
}
|
||||
return json(route, 405)
|
||||
}
|
||||
|
||||
// FEEDBACK: "Fehler melden" — POST persistiert, GET listet (neueste zuerst).
|
||||
if (path === '/feedback') {
|
||||
if (method === 'POST') {
|
||||
|
||||
Reference in New Issue
Block a user