Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/api/teamTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const getTeamTypes = async (cursor, limit, filter) => {
teamType.annualBillingInterval = annualInterval
}
} else {
teamType.billingPrice = 'free'
teamType.billingPrice = ''
teamType.billingInterval = ''
}
return teamType
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/TeamTypeSelection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export default {
async created () {
const { types } = await teamTypesApi.getTeamTypes()
this.types = types.sort((a, b) => a.order - b.order)
// If any of the available types has an annualBillingPrice, show the annual billing toggle
this.annualBillingAvailable = this.types.some(type => !!type.annualBillingPrice)
}
}
</script>
8 changes: 2 additions & 6 deletions frontend/src/pages/team/changeType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,8 @@ export default {
}).sort((a, b) => a.order - b.order)
this.input.teamTypeId = this.team.type.id

this.teamTypes.forEach(tt => {
// Check if *any* team type has annual billing available
if (tt.annualBillingPrice) {
this.annualBillingAvailable = true
}
})
// If any of the available types has an annualBillingPrice, show the annual billing toggle
this.annualBillingAvailable = this.teamTypes.some(type => !!type.annualBillingPrice)

const instanceTypes = (await instanceTypesApi.getInstanceTypes()).types
instanceTypes.forEach(instanceType => {
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/team/create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ export default {

this.teamTypes = (await teamTypesPromise).types.sort((a, b) => a.order - b.order)
this.input.teamTypeId = this.teamTypes[0].id
// If any of the available types has an annualBillingPrice, show the annual billing toggle
this.annualBillingAvailable = this.teamTypes.some(type => !!type.annualBillingPrice)

if (this.$route.query.teamType) {
this.input.teamTypeId = this.$route.query.teamType
Expand Down
Loading