|
|
|
@ -1,14 +1,15 @@
|
|
|
|
|
import { Controller } from '@hotwired/stimulus' |
|
|
|
|
|
|
|
|
|
export default class extends Controller { |
|
|
|
|
updateProfitStatusOptions (event) { |
|
|
|
|
const profitStatusSelect = document.getElementById('organisation-profit-status-field') |
|
|
|
|
if (!profitStatusSelect) return |
|
|
|
|
|
|
|
|
|
const localAuthorityOption = profitStatusSelect.querySelector('option[value="local_authority"]') |
|
|
|
|
const nonProfitOption = profitStatusSelect.querySelector('option[value="non_profit"]') |
|
|
|
|
const profitOption = profitStatusSelect.querySelector('option[value="profit"]') |
|
|
|
|
export default class extends Controller { |
|
|
|
|
updateProfitStatusOptions (event) { |
|
|
|
|
const providerType = event.target.value |
|
|
|
|
|
|
|
|
|
if (profitStatusSelect) { |
|
|
|
|
profitStatusSelect.disabled = false |
|
|
|
|
localAuthorityOption.hidden = false |
|
|
|
|
nonProfitOption.hidden = false |
|
|
|
@ -24,4 +25,3 @@ export default class extends Controller {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|