|
|
@ -10,7 +10,7 @@ export default class extends Controller { |
|
|
|
let selectedValue = this.element.value |
|
|
|
let selectedValue = this.element.value |
|
|
|
let conditional_for = JSON.parse(this.element.dataset.info) |
|
|
|
let conditional_for = JSON.parse(this.element.dataset.info) |
|
|
|
Object.entries(conditional_for).map(([targetQuestion, conditions]) => { |
|
|
|
Object.entries(conditional_for).map(([targetQuestion, conditions]) => { |
|
|
|
if(conditions.includes(selectedValue)) { |
|
|
|
if(conditions.map(String).includes(String(selectedValue))) { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const textNumericInput = document.getElementById(`case-log-${targetQuestion.replaceAll("_","-")}-field`) |
|
|
|
const textNumericInput = document.getElementById(`case-log-${targetQuestion.replaceAll("_","-")}-field`) |
|
|
|
if (textNumericInput == null) { |
|
|
|
if (textNumericInput == null) { |
|
|
|