fix: TS errors, serialize calls, unused imports, pre-commit hook
Build & Deploy / build (push) Successful in 32s
Build & Deploy / docker (push) Successful in 1m42s

This commit is contained in:
Kevin
2026-07-07 20:49:52 +02:00
parent 15d3a13d0a
commit c4cad4f875
16 changed files with 27 additions and 101 deletions
+1 -14
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, reactive } from 'vue'
import { reactive } from 'vue'
import { Link } from '@adonisjs/inertia/vue'
import { usePage } from '@inertiajs/vue3'
import CustomSelect from '~/pages/widgets/CustomSelect.vue'
@@ -11,7 +11,6 @@ const { props } = usePage<{
errors?: Record<string, string>
}>()
const { component, types, origin } = props
const errors = computed(() => props.errors || {})
const form = reactive({
id: component.id,
@@ -21,18 +20,6 @@ const form = reactive({
purchaseDate: component.purchaseDate,
origin: origin,
})
function getErrorMessage(field: string): string | null {
return errors.value[field] || null
}
function formatDateForMySQL(date: string) {
const d = new Date(date)
const year = d.getFullYear()
const month = String(d.getMonth() + 1).padStart(2, '0')
const day = String(d.getDate()).padStart(2, '0')
form.purchase_date = `${year}-${month}-${day}`
}
</script>
<template>