refactor: uniform validation, fix create form UX, dedupe filter dropdowns

- Remove dead registerValidator (Auth/register.ts), unused since signupValidator
  is the one actually wired to NewAccountController
- computers/create.vue: switch to useForm() + @submit.prevent so the form
  submits on Enter and shows a processing state, matching components/create.vue
- components/edit.vue: drop the 'origin' field, which was never provided by
  the backend (edit() never shared it) and therefore always undefined
- Extract FilterDropdown.vue and reuse it in ComponentsViewer/ComputersViewer,
  removing ~80 lines of duplicated dropdown markup/logic and fixing duplicate
  HTML ids (id="used" appeared twice in ComputersViewer)
- Move MIGRATION_*.md artifacts into docs/migration-history/
This commit is contained in:
Kevin L'Hereec committed 2026-07-23 11:10:17 +02:00
1 parent 3cc189c534
commit 3579c9dfec
10 files changed
+163 -262

No files matched your search

-15
View File
@@ -1,15 +0,0 @@
import vine from '@vinejs/vine'
export const registerValidator = vine.compile(
vine.object({
name: vine.string().minLength(3).maxLength(64),
email: vine
.string()
.email()
.unique(async (query, field) => {
const user = await query.from('users').where('email', field).first()
return !user
}),
password: vine.string().minLength(8).maxLength(32),
})
)