File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 :error =" error"
3030 v-model =" stepThree"
3131 @previous-step =" goToStep(2)"
32+ @next-step =" goToStep(4)"
33+ @submit =" createWiki"
34+ />
35+
36+ <KnowledgeEquityCreateWikiWizardStep
37+ v-show =" step === 4"
38+ :title =" title"
39+ :inFlight =" inFlight"
40+ :error =" error"
41+ v-model =" stepFour"
42+ @previous-step =" goToStep(3)"
3243 @submit =" createWiki"
3344 />
3445 </v-form >
@@ -39,13 +50,15 @@ import config from '~/config'
3950import SiteDetailsCreateWikiWizardStep from ' ./SiteDetailsCreateWikiWizardStep.vue'
4051import AudienceAndPurposeWizardStep from ' ./AudienceAndPurposeWizardStep.vue'
4152import TemporalityCreateWikiWizardStep from ' ./TemporalityCreateWikiWizardStep.vue'
53+ import KnowledgeEquityCreateWikiWizardStep from ' ./KnowledgeEquityCreateWikiWizardStep.vue'
4254
4355export default {
4456 name: ' CreateWiki' ,
4557 components: {
4658 SiteDetailsCreateWikiWizardStep,
4759 AudienceAndPurposeWizardStep,
48- TemporalityCreateWikiWizardStep
60+ TemporalityCreateWikiWizardStep,
61+ KnowledgeEquityCreateWikiWizardStep
4962 },
5063 props: [
5164 ' title'
Original file line number Diff line number Diff line change 1+ <template >
2+ <v-card class =" elevation-12" >
3+ <v-toolbar dark color =" primary" >
4+ <v-toolbar-title >{{ title }}</v-toolbar-title >
5+ </v-toolbar >
6+
7+ <v-card-text >
8+
9+ </v-card-text >
10+ </v-card >
11+ </template >
Original file line number Diff line number Diff line change 8181 type =" button"
8282 color =" primary"
8383 :disabled =" inFlight"
84- @click =" submitWholeForm "
84+ @click =" primaryBtnAction "
8585 >
86- Create Wiki
86+ {{primaryBtnLabel}}
8787 </v-btn >
8888 </v-card-actions >
8989 </v-card >
@@ -98,26 +98,39 @@ export default {
9898 value: Object ,
9999 error: Array
100100 },
101+ computed: {
102+ primaryBtnLabel () {
103+ if (this .value .temporality === ' permanent' ) {
104+ return ' Next >'
105+ } else {
106+ return ' Create Wiki'
107+ }
108+ }
109+ },
101110 methods: {
102- previousStep () {
111+ primaryBtnAction () {
103112 if (this .value .temporality !== ' other' ) {
104113 this .value .otherTemporality = undefined
105114 }
106115
107- this .$emit (' previous-step' )
116+ if (this .$refs .inputForm .validate () === false ) {
117+ return
118+ }
119+
120+ if (this .value .temporality === ' permanent' ) {
121+ this .$emit (' next-step' )
122+ } else {
123+ this .$emit (' submit' )
124+ }
108125 },
109- submitWholeForm () {
126+ previousStep () {
110127 if (this .value .temporality !== ' other' ) {
111128 this .value .otherTemporality = undefined
112129 }
113130
114- this .$refs .inputForm .validate ()
115- if (this .$refs .inputForm .validate () === true ) {
116- this .$emit (' submit' )
117- }
131+ this .$emit (' previous-step' )
118132 }
119133 }
120-
121134}
122135 </script >
123136
You can’t perform that action at this time.
0 commit comments