Skip to content

Commit

Permalink
feat(const): add plan type
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenijesavic committed Sep 20, 2023
1 parent 2773fa8 commit 936661b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/dao/settings-plans-billing.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import { mapGetters } from 'vuex'
import gql from 'graphql-tag'
import { ORIGIN } from '~/const'
import { ORIGIN, PLAN_TYPE } from '~/const'
const STATES = Object.freeze({
WAITING: 'WAITING',
Expand Down Expand Up @@ -55,7 +55,9 @@ export default {
state: STATES.WAITING,
paymentInterval: 'year',
planType: 'SAAS'
PLAN_TYPE,
planType: PLAN_TYPE.SAAS
}
},
Expand Down Expand Up @@ -131,9 +133,9 @@ export default {
).q-pa-none
template(v-slot:header)
q-btn.q-px-xl.rounded-border.text-bold(
:color="planType === 'EAAS' ? 'primary' : 'secondary'"
:label="planType === 'EAAS' ? 'Single' : 'Ecosystem'"
@click="planType = 'EAAS', paymentInterval = null"
:color="planType === PLAN_TYPE.EAAS ? 'primary' : 'secondary'"
:label="planType === PLAN_TYPE.EAAS ? 'Single' : 'Ecosystem'"
@click="planType = PLAN_TYPE.EAAS, paymentInterval = null"
no-caps
rounded
unelevated
Expand All @@ -144,7 +146,7 @@ export default {
.hr.q-my-md
section
nav.full-width.row.justify-center.items-center(v-if="planType ==='SAAS'")
nav.full-width.row.justify-center.items-center(v-if="planType === PLAN_TYPE.SAAS")
q-btn.q-px-xl.rounded-border.text-bold(
@click="paymentInterval = 'month'"
:color="paymentInterval === 'month' ? 'primary' : 'secondary'"
Expand Down
5 changes: 5 additions & 0 deletions src/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,8 @@ export const ROUTE_NAMES = Object.freeze({
})

export const ORIGIN = window.location.origin

export const PLAN_TYPE = Object.freeze({
EAAS: 'EAAS',
SAAS: 'SAAS'
})

0 comments on commit 936661b

Please sign in to comment.