From 338150978295e4d190dc3c8bc28c601d1f280d13 Mon Sep 17 00:00:00 2001 From: Arsenije Savic Date: Thu, 21 Sep 2023 13:02:10 -0600 Subject: [PATCH] refactor: clean up --- src/components/dao/settings-plans-billing.vue | 4 ++-- src/layouts/DhoSelector.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/dao/settings-plans-billing.vue b/src/components/dao/settings-plans-billing.vue index d4afdcdd1..7ebb51392 100644 --- a/src/components/dao/settings-plans-billing.vue +++ b/src/components/dao/settings-plans-billing.vue @@ -159,7 +159,7 @@ export default { computed: { ...mapGetters('dao', ['daoSettings', 'selectedDao', 'selectedDaoPlan']), - isFreePlan () { return this.selectedDaoPlan.price === 0 }, + isFreePlan () { return !this.selectedDaoPlan.id }, isPlanModalOpen () { return [STATES.UPDATING_PLAIN, STATES.CREATING_SESSION].includes(this.state) }, plans () { @@ -251,7 +251,7 @@ export default { q-btn.q-px-xl.rounded-border.text-bold.q-ml-xs( :disable="selectedDaoPlan.id === plan.id" :label="$t('configuration.settings-plans-billing.plan.modal.cta')" - @click="upgrade(plan.id)" + @click="isFreePlan ? checkout(plan.id) : upgrade(plan.id)" color="secondary" no-caps rounded diff --git a/src/layouts/DhoSelector.vue b/src/layouts/DhoSelector.vue index 258da2b6d..c0f3983c1 100644 --- a/src/layouts/DhoSelector.vue +++ b/src/layouts/DhoSelector.vue @@ -15,7 +15,7 @@ const DAO_ACTIVE_QUERY = ` communityMembersCount price id: planId - planName + name: planName } queryDao @cascade(fields: ["settings"]) {