Skip to content

Commit

Permalink
Fix billingTiers
Browse files Browse the repository at this point in the history
  • Loading branch information
satkunas committed Jan 7, 2019
1 parent 1622955 commit 44d8a1c
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -563,14 +563,17 @@ export const pfConfigurationConnectionProfileViewFields = (context = {}) => {
placeholder: i18n.t('Click to select a billing tier'),
trackBy: 'value',
label: 'text',
options: billingTiers.map(billing_tier => {
return { text: `${billing_tier.id} (${billing_tier.name} - ${billing_tier.description})`, value: billing_tier.id }
options: billingTiers.map(billingTier => {
return { text: `${billingTier.id} (${billingTier.name} - ${billingTier.description})`, value: billingTier.id }
})
},
validators: {
[i18n.t('Billing Tier required.')]: required,
[i18n.t('Duplicate Billing Tier.')]: conditional((value) => {
return !(connectionProfile.billingTiers.filter(v => v === value).length > 1)
if (connectionProfile.billingTiers === Array) {
return !(connectionProfile.billingTiers.filter(v => v === value).length > 1)
}
return true
})
}
}
Expand Down

0 comments on commit 44d8a1c

Please sign in to comment.