parent
c5012c8431
commit
252072df57
|
@ -40,12 +40,12 @@
|
||||||
:rules="[notEmpty]"
|
:rules="[notEmpty]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
v-model="job.required_services"
|
v-model.number="job.required_services"
|
||||||
filled
|
filled
|
||||||
class="col-xs-12 col-sm-6 q-pa-sm"
|
class="col-xs-12 col-sm-6 q-pa-sm"
|
||||||
label="Dienstanzahl"
|
label="Dienstanzahl"
|
||||||
type="number"
|
type="number"
|
||||||
:rules="[notEmpty]"
|
:rules="[minOneService, notEmpty]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
v-model="job.comment"
|
v-model="job.comment"
|
||||||
|
@ -134,6 +134,10 @@ export default defineComponent({
|
||||||
validate: () => form.value?.validate() || Promise.resolve(true),
|
validate: () => form.value?.validate() || Promise.resolve(true),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function minOneService(val: number) {
|
||||||
|
return parseInt(val) > 0 || 'Mindestens ein Dienst nötig';
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
form,
|
form,
|
||||||
formatStartEnd,
|
formatStartEnd,
|
||||||
|
@ -141,6 +145,7 @@ export default defineComponent({
|
||||||
job,
|
job,
|
||||||
jobtypes,
|
jobtypes,
|
||||||
notEmpty,
|
notEmpty,
|
||||||
|
minOneService,
|
||||||
typeName,
|
typeName,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue