Homepage, verejna cast, vetsi sada uprav a oprav

This commit is contained in:
Michal Kváček
2023-08-21 22:45:58 +02:00
parent 8bc477a611
commit 8c3b8d19dd
54 changed files with 550 additions and 372 deletions
+6 -13
View File
@@ -1,10 +1,9 @@
<script setup>
import {onMounted, reactive} from "vue";
import FormWrapper from "components/FormWrapper.vue";
import {setDefaultData} from "src/composables/form/formHandling";
import {defaultValues, isRequestPending} from "src/composables/form/props";
import {isRequired, maxLength, minLength} from "src/composables/form/rules";
import {isNumber, isRequired, maxLength, minLength} from "src/composables/form/rules";
import {commonProps} from "src/composables/inputs";
const formData = reactive({
@@ -24,14 +23,8 @@ const props = defineProps({
});
const rules = {
callSign: [
isRequired,
minLength(4),
maxLength(8)
],
seats: [
isNumber
]
callSign: [isRequired, minLength(4), maxLength(8)],
seats: [isRequired, isNumber]
};
onMounted(() => {
@@ -41,7 +34,7 @@ onMounted(() => {
</script>
<template>
<FormWrapper v-model="formData" :is-request-pending="isRequestPending">
<FormWrapper v-model="formData" :is-request-pending="props.isRequestPending">
<q-img :src="props.defaultValues.photoUrl" v-if="props.defaultValues.photoUrl"/>
<q-input
@@ -67,8 +60,8 @@ onMounted(() => {
<q-input
type="number"
v-model="formData.seats"
label="Počet míst"
v-model.number="formData.seats"
label="Počet míst (včetně pilota)"
min="1"
:rules="rules.seats"
v-bind="commonProps"