4 changed files with 30 additions and 2 deletions
@ -0,0 +1,17 @@
|
||||
import { Controller } from '@hotwired/stimulus' |
||||
|
||||
export default class extends Controller { |
||||
updateProfitStatusOptions(event) { |
||||
const providerType = event.target.value; |
||||
const profitStatusSelect = document.getElementById('organisation-profit-status-field'); |
||||
|
||||
if (profitStatusSelect) { |
||||
profitStatusSelect.disabled = false; |
||||
|
||||
if (providerType === "LA") { |
||||
profitStatusSelect.value = "3"; |
||||
profitStatusSelect.disabled = true; |
||||
} |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue