Bug 32030: Disable and blank "Closure reason" if status is not "closed"

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-05-03 08:23:03 +02:00 committed by Tomas Cohen Arazi
parent 587a44dbe8
commit f0fc4af561
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -82,7 +82,7 @@
id="agreement_closure_reason"
v-model="agreement.closure_reason"
:disabled="
agreement.status == 'closed' ? true : false
agreement.status == 'closed' ? false : true
"
>
<option value=""></option>
@ -262,8 +262,8 @@ export default {
}
)
},
onStatusChange(status) {
if (status == 'closed') {
onStatusChange(event) {
if (event.target.value != 'closed') {
this.agreement.closure_reason = ''
}
}