Add places / things-to-do list with admin management
Deploy with Docker Compose / deploy (push) Successful in 16m21s

Backend: new Place GORM model (title, location, notes, image, category,
cost, priority, done) with auto-migration, a place.graphql schema, and
resolvers for the places query plus admin-only create/update/delete.
Regenerate gqlgen output against gqlgen v0.17.95, which requires Go 1.26 —
bump go.mod and the builder image to match.

Frontend: a places Pinia store, a CreatePlace admin form, and a
PlacesTable rendered as a new tab in the Collage cell, with inline
done-toggle and delete for admins. Rework the Admin page into a
sidebar-navigated panel layout (picking up the previously unreachable
CreateBookmark form) and give Login proper field labels, submit state,
and error feedback.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KcFtkisHcKJuTZAnv3fVzA
This commit is contained in:
2026-09-12 18:10:41 +01:00
co-authored by Claude Opus 5
parent f83d683180
commit 894c158afd
30 changed files with 4170 additions and 2975 deletions
+133 -9
View File
@@ -1,23 +1,147 @@
<script setup>
import { ref, computed } from "vue";
import { useAuthStore } from "@/stores/auth";
import Button from "@/components/input/Button.vue";
import CreateUser from "./CreateUser.vue";
import CreatePost from "./CreatePost.vue";
import CreateFavorite from "./CreateFavorite.vue";
import CreateActivity from "./CreateActivity.vue";
import CreateRowing from "./CreateRowing.vue";
import CreateBookmark from "./CreateBookmark.vue";
import CreatePlace from "./CreatePlace.vue";
import ManageUsers from "./ManageUsers.vue";
import ManageRadio from "./ManageRadio.vue";
const auth = useAuthStore();
const sections = [
{ id: "user", label: "User", component: CreateUser },
{ id: "post", label: "Post", component: CreatePost },
{ id: "favorite", label: "Favorite", component: CreateFavorite },
{ id: "activity", label: "Activity", component: CreateActivity },
{ id: "rowing", label: "Rowing", component: CreateRowing },
{ id: "bookmark", label: "Bookmark", component: CreateBookmark },
{ id: "place", label: "Place / Thing To Do", component: CreatePlace },
{ id: "users", label: "Manage Users", component: ManageUsers },
{ id: "radio", label: "Manage Radio", component: ManageRadio },
];
const active = ref("place");
const activeSection = computed(() =>
sections.find((s) => s.id === active.value),
);
function handleLogout() {
auth.logOut();
}
</script>
<template>
<main class="justify-center flex flex-row w-full h-full">
<div class="bdr-1 flex flex-col">
<CreateUser class="bdr-2 bg-surface" />
<CreatePost class="bdr-2 bg-surface" />
<CreateFavorite class="bdr-2 bg-surface" />
<CreateActivity class="bdr-2 bg-surface" />
<CreateRowing class="bdr-2 bg-surface" />
<ManageUsers class="bdr-2 bg-surface" />
<ManageRadio class="bdr-2 bg-surface" />
<main class="admin-page">
<div class="admin-shell bdr-1">
<header class="admin-header">
<div class="flex flex-col">
<h1>Admin</h1>
<small v-if="auth.user?.username">
signed in as {{ auth.user.username }}
</small>
</div>
<Button @click="handleLogout">Log Out</Button>
</header>
<div class="admin-body">
<nav class="admin-nav">
<button
v-for="section in sections"
:key="section.id"
class="admin-nav-link"
:class="{ 'is-active': active === section.id }"
@click="active = section.id"
>
{{ section.label }}
</button>
</nav>
<section class="admin-panel bdr-2 bg-surface">
<component :is="activeSection.component" />
</section>
</div>
</div>
</main>
</template>
<style scoped>
.admin-page {
display: flex;
justify-content: center;
width: 100%;
padding: 8px;
}
.admin-shell {
width: 100%;
max-width: 900px;
background-color: var(--color-surface);
display: flex;
flex-direction: column;
}
.admin-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 12px;
border-bottom: 1px solid var(--color-quaternary);
}
.admin-body {
display: grid;
grid-template-columns: 200px 1fr;
gap: 8px;
padding: 8px;
}
.admin-nav {
display: flex;
flex-direction: column;
gap: 3px;
}
.admin-nav-link {
text-align: left;
padding: 6px 10px;
color: var(--color-primary);
background-color: var(--color-link-bg);
border: 1px solid transparent;
font-family: var(--font-heading);
letter-spacing: 0.025em;
cursor: pointer;
transition:
background-color 120ms ease,
border-color 120ms ease,
color 120ms ease;
}
.admin-nav-link:hover {
border-color: var(--color-primary);
}
.admin-nav-link.is-active {
border-color: var(--color-primary);
color: var(--color-tertiary);
background-color: var(--color-surface-tint);
}
.admin-panel {
padding: 12px;
min-height: 300px;
}
.admin-panel :deep(h1) {
margin-top: 0;
}
@media (max-width: 700px) {
.admin-body {
grid-template-columns: 1fr;
}
}
</style>