- examples/fixture-invoicing/: FastAPI + Vue + Postgres demo (4-entity invoice fixture)
- cfg/sample/: wraps the fixture (managed.repos points at examples/)
- ctrl/kind-{up,down,status}.sh + per-room k8s render in soleprint/ctrl/k8s/
- build.py: relative repo paths, resilient rmtree, optional k8s render hook
- cfg/.gitignore: stop ignoring sample/ and standalone/ template rooms
Manifests render cleanly but kind cluster has not been run end-to-end yet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
72 lines
1.5 KiB
Vue
72 lines
1.5 KiB
Vue
<template>
|
|
<h2>Customers</h2>
|
|
|
|
<div class="card">
|
|
<h3>Add customer</h3>
|
|
<div class="actions">
|
|
<input v-model="draft.name" placeholder="Name" />
|
|
<input v-model="draft.email" placeholder="Email" />
|
|
<button @click="add" :disabled="!draft.name || !draft.email">Add</button>
|
|
</div>
|
|
</div>
|
|
|
|
<table v-if="customers.length">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Email</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="c in customers" :key="c.id">
|
|
<td>{{ c.id }}</td>
|
|
<td>{{ c.name }}</td>
|
|
<td>{{ c.email }}</td>
|
|
<td>
|
|
<button class="ghost" @click="remove(c.id)">Delete</button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p v-else class="muted">No customers yet.</p>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref, onMounted, reactive } from "vue";
|
|
import { api } from "../api.js";
|
|
|
|
const customers = ref([]);
|
|
const draft = reactive({ name: "", email: "" });
|
|
|
|
async function load() {
|
|
customers.value = await api.listCustomers();
|
|
}
|
|
|
|
async function add() {
|
|
await api.createCustomer({ name: draft.name, email: draft.email });
|
|
draft.name = "";
|
|
draft.email = "";
|
|
await load();
|
|
}
|
|
|
|
async function remove(id) {
|
|
await api.deleteCustomer(id);
|
|
await load();
|
|
}
|
|
|
|
onMounted(load);
|
|
</script>
|
|
|
|
<style scoped>
|
|
.actions input {
|
|
padding: 8px 10px;
|
|
border: 1px solid #334;
|
|
border-radius: 4px;
|
|
background: #0d1b2a;
|
|
color: var(--text);
|
|
min-width: 180px;
|
|
}
|
|
</style>
|