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

+4 -5
View File
@@ -3,14 +3,14 @@ import { reactive } from 'vue'
import { Link } from '@adonisjs/inertia/vue'
import { usePage } from '@inertiajs/vue3'
import CustomSelect from '~/pages/widgets/CustomSelect.vue'
import type { Component, ComponentType } from '~/pages/types/UITypes'
const { props } = usePage<{
component: any
types: any[]
origin: string
component: Component
types: ComponentType[]
errors?: Record<string, string>
}>()
const { component, types, origin } = props
const { component, types } = props
const form = reactive({
id: component.id,
@@ -18,7 +18,6 @@ const form = reactive({
price: component.price,
typeId: component.type.id,
purchaseDate: component.purchaseDate,
origin: origin,
})
</script>