Fixed some error text not showing in create dialog

This commit is contained in:
Stefan Zermatten
2023-06-07 13:52:21 +02:00
parent 3acf42394d
commit 6e47395327
16 changed files with 31 additions and 19 deletions

View File

@@ -12,6 +12,7 @@
label="Name"
style="flex-basis: 320px;"
:value="model.name"
:error-messages="errors.name"
@change="(value, ack) => $emit('change', {path: ['name'], value, ack})"
/>
<icon-color-menu
@@ -24,6 +25,7 @@
:is="model.type"
class="creature-property-form mb-4"
:model="model"
:errors="errors"
@change="e => $emit('change', e)"
@push="e => $emit('push', e)"
@pull="e => $emit('pull', e)"
@@ -47,6 +49,7 @@
hint="The property type that this slot filler pretends to be when being searched for by a slot"
:items="slotTypes"
:value="model.slotFillerType"
:error-messages="errors.slotFillerType"
@change="(value, ack) => $emit('change', {path: ['slotFillerType'], value, ack})"
/>
</v-col>
@@ -60,6 +63,7 @@
min="0"
hint="How many properties this counts as when filling a slot"
:value="model.slotQuantityFilled"
:error-messages="errors.slotQuantityFilled"
@change="(value, ack) => $emit('change', {path: ['slotQuantityFilled'], value, ack})"
/>
</v-col>
@@ -73,6 +77,7 @@
hint="A caclulation to determine if this property can be added to a character"
placeholder="Always active"
:value="model.slotFillerCondition"
:error-messages="errors.slotFillerCondition"
@change="(value, ack) => $emit('change', {path: ['slotFillerCondition'], value, ack})"
/>
</v-col>
@@ -86,6 +91,7 @@
hint="Text to display if the condition isn't met"
placeholder="Always active"
:value="model.slotFillerConditionNote"
:error-messages="errors.slotFillerConditionNote"
@change="(value, ack) => $emit('change', {path: ['slotFillerConditionNote'], value, ack})"
/>
</v-col>
@@ -99,6 +105,7 @@
deletable-chips
hint="Used to let slots find this property in a library"
:value="model.libraryTags"
:error-messages="errors.libraryTags"
@change="(value, ack) => $emit('change', {path: ['libraryTags'], value, ack})"
/>
</v-col>
@@ -119,6 +126,7 @@
deletable-chips
hint="Tags let other properties target this property with interactions"
:value="model.tags"
:error-messages="errors.tags"
@change="(value, ack) => $emit('change', {path: ['tags'], value, ack})"
/>
</v-col>
@@ -229,6 +237,10 @@ export default {
type: String,
default: 'creatureProperties'
},
errors: {
type: Object,
default: () => ({}),
},
embedded: Boolean, // This dialog is embedded in a page
noChildInsert: Boolean, // Don't allow inserting of children in this form
},

View File

@@ -79,7 +79,7 @@
label="Summary"
hint="This will appear in the action card in the character sheet, summarize what the action does"
:model="model.summary"
:error-messages="errors.summary"
:error-messages="errors['summary.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['summary', ...path], value, ack})"
/>
@@ -88,7 +88,7 @@
label="Description"
hint="This text will be displayed in the log when the action is taken"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -70,7 +70,7 @@
<inline-computation-field
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -3,7 +3,7 @@
<inline-computation-field
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -17,7 +17,7 @@
<inline-computation-field
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -33,7 +33,7 @@
label="Description"
hint="A brief description of what this class level gives a character"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -66,7 +66,7 @@
class="mt-4"
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -4,7 +4,7 @@
label="Summary"
hint="This will appear in the feature card in the character sheet"
:model="model.summary"
:error-messages="errors.summary"
:error-messages="errors['summary.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['summary', ...path], value, ack})"
/>
@@ -13,7 +13,7 @@
label="Description"
hint="The rest of the description that doesn't fit in the summary goes here"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -75,7 +75,7 @@
<inline-computation-field
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -4,7 +4,7 @@
label="Summary"
hint="This will appear in the card in the character sheet"
:model="model.summary"
:error-messages="errors.summary"
:error-messages="errors['summary.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['summary', ...path], value, ack})"
/>
@@ -13,7 +13,7 @@
label="Description"
hint="Text that does not fit in the summary"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -47,7 +47,7 @@
<inline-computation-field
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -3,7 +3,7 @@
<text-area
label="Description"
:value="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="change('description', ...arguments)"
/>
<form-sections

View File

@@ -100,7 +100,7 @@
<inline-computation-field
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -220,14 +220,14 @@
label="Summary"
hint="This will appear in the action card in the character sheet, summarise what the action does"
:model="model.summary"
:error-messages="errors.summary"
:error-messages="errors['summary.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['summary', ...path], value, ack})"
/>
<inline-computation-field
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -58,7 +58,7 @@
<inline-computation-field
label="Description"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>

View File

@@ -77,7 +77,7 @@
label="Description"
hint="The rest of the description that doesn't fit in the summary goes here"
:model="model.description"
:error-messages="errors.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>