Skip to content

Commit d434b4a

Browse files
committed
show identifiers screen validation error in stepper
1 parent 6c88c5f commit d434b4a

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/components/Stepper.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@
4747
/>
4848

4949
<q-step
50-
color="primary"
50+
error-color="negative"
51+
error-icon="warning"
5152
icon=""
5253
name="identifiers"
5354
title="Identifiers"
55+
v-bind:active-icon="isValidScreenIdentifiers.hasError ? 'warning' : 'edit'"
56+
v-bind:color="isValidScreenIdentifiers.hasError ? 'negative' : 'primary'"
57+
v-bind:error="isValidScreenIdentifiers.hasError"
5458
v-bind:order="3"
5559
v-if="showAdvanced"
5660
v-on:click="setStepName('identifiers')"
@@ -133,16 +137,18 @@ import { computed } from 'vue'
133137
import { useCff } from 'src/store/cff'
134138
import { authorsErrors } from 'src/authors-errors'
135139
import { relatedResourcesErrors } from 'src/related-resources-errors'
140+
import { identifiersErrors } from 'src/identifiers-errors'
136141
137142
export default {
138143
setup () {
139144
const { showAdvanced, stepName, setStepName } = useApp()
140-
const { authors } = useCff()
145+
const { authors, identifiers } = useCff()
141146
return {
142147
isValidScreenAuthors: computed(() => authorsErrors(authors.value)),
148+
isValidScreenIdentifiers: computed(() => identifiersErrors(identifiers.value)),
149+
isValidScreenRelatedResources: computed(relatedResourcesErrors),
143150
isValidScreenStart: computed(() => getMyErrors('', ['message', 'title'])),
144151
isValidScreenVersionSpecific: computed(() => getMyErrors('/date-released')),
145-
isValidScreenRelatedResources: computed(relatedResourcesErrors),
146152
setStepName,
147153
showAdvanced,
148154
stepName

0 commit comments

Comments
 (0)