Merge pull request #946 from dod-ccpo/fix-obligated-amount-NaN-bug
Fix Obligated Amount Masking Issues
This commit is contained in:
commit
a719fef078
@ -103,7 +103,8 @@ export default {
|
||||
this.value = e.target.value.trim()
|
||||
|
||||
if (this.validation === 'dollars') {
|
||||
this.value = formatDollars(this._rawValue(e.target.value))
|
||||
let value = Number.isNaN(e.target.value) ? '0' : e.target.value
|
||||
this.value = formatDollars(this._rawValue(value))
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -11,10 +11,16 @@ export default {
|
||||
|
||||
computed: {
|
||||
formattedObligated: function() {
|
||||
return formatDollars(this.obligated)
|
||||
return formatDollars(this._filterNaN(this.obligated))
|
||||
},
|
||||
formattedContractAmount: function() {
|
||||
return formatDollars(this.contractAmount)
|
||||
return formatDollars(this._filterNaN(this.contractAmount))
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
_filterNaN: function(value) {
|
||||
return Number.isNaN(value) ? 0 : value
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -359,7 +359,12 @@
|
||||
</fieldset>
|
||||
</date-selector>
|
||||
|
||||
<textinput :name="'clins-' + clinIndex + '-obligated_amount'" validation="dollars" :watch='true' inline-template>
|
||||
<textinput
|
||||
v-cloak
|
||||
inline-template
|
||||
:name="'clins-' + clinIndex + '-obligated_amount'"
|
||||
validation="dollars"
|
||||
:watch='true'>
|
||||
<div class="usa-input usa-input--validation--dollars noMaxWidth">
|
||||
<label :for="name">
|
||||
<div class="usa-input__title">Funds obligated for cloud</div>
|
||||
@ -376,7 +381,7 @@
|
||||
v-bind:pipe='pipe'
|
||||
v-bind:keep-char-positions='keepCharPositions'
|
||||
v-bind:aria-invalid='showError'
|
||||
v-bind:show-mask='true'
|
||||
v-bind:show-mask='false'
|
||||
type='text'
|
||||
:id='name'
|
||||
ref='input'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user