Skip to content

Commit

Permalink
Pre-select paradigm in generate page based on POS
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcamilleri committed Apr 12, 2020
1 parent f09b8a3 commit b9cbb45
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions public/javascripts/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ new Vue({
axios.get(`${baseURL}/lexemes/${this.lexemeID}`)
.then(response => {
this.lexeme = response.data
switch (this.lexeme.pos) {
case 'NOUN':
this.paradigm = 'noun'
break
case 'ADJ':
this.paradigm = 'adjective'
break
case 'VERB':
this.paradigm = 'loan-verb'
break
}
})
.catch(error => {
console.error(error)
Expand Down

0 comments on commit b9cbb45

Please sign in to comment.