No description
The production route every Backstage resource lives under. Resolves the resource from the URL segment against the registry, gates on user.role === 'fenja', and renders the AdminLayout shell with the ResourceListView + (optionally) ResourceEditPanel. POST dispatch keyed by _action: - save: parses formdata per field.kind (multi-text/multi-select-async use getAll(), number coerces, others coerce to string), validates via validateForResource, then routes to ops.update(id) when ?edit=<id> is set or ops.create() when ?new=1. Redirects with ?msg=saved | ?msg=created. On failure, re-renders the panel with errors + the submitted values. - delete: calls ops.delete(id), redirects with ?msg=deleted. - <action.key>: looks up the action in resource.actions and runs its handler, redirects with ?msg=action_<key>. 404s when the resource key isn't in the registry — most keys won't resolve until steps 8-10 land. A small .bs-flash banner above the list surfaces the ?msg= text (or the error message after a failed save). Old /admin (?tab=...) continues to work alongside. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| content | ||
| design | ||
| migrations | ||
| public | ||
| scripts | ||
| src | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| astro.config.mjs | ||
| CLAUDE.md | ||
| DECISIONS.md | ||
| HANDOVER.md | ||
| KNOWN_ISSUES.md | ||
| package.json | ||
| pnpm-lock.yaml | ||
| SPEC.md | ||
| todo.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||