Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(const): add plan type #2471

Merged
merged 1 commit into from
Sep 20, 2023
Merged
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
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'
})
Loading