From ba17aa001754c1a62c90a7096aff3d6041d5755c Mon Sep 17 00:00:00 2001 From: Tanya Fomina Date: Sat, 11 Jan 2025 22:25:45 +0300 Subject: [PATCH] Fix --- src/api/plans/queries.ts | 1 - src/components/modals/PaymentDetailsDialog.vue | 3 ++- src/types/plan.d.ts | 6 ------ src/types/workspaces.ts | 3 +++ 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/api/plans/queries.ts b/src/api/plans/queries.ts index 8ce2a0ef5..87f5887e9 100644 --- a/src/api/plans/queries.ts +++ b/src/api/plans/queries.ts @@ -10,7 +10,6 @@ export const QUERY_PLANS = ` monthlyCharge monthlyChargeCurrency eventsLimit - paymentFrequency } } `; diff --git a/src/components/modals/PaymentDetailsDialog.vue b/src/components/modals/PaymentDetailsDialog.vue index 2d225238d..36bc9214c 100644 --- a/src/components/modals/PaymentDetailsDialog.vue +++ b/src/components/modals/PaymentDetailsDialog.vue @@ -313,6 +313,7 @@ export default Vue.extend({ * New plan */ plan(): Plan { + console.log(this.$store.getters.getPlanById(this.tariffPlanId)) return this.$store.getters.getPlanById(this.tariffPlanId); }, @@ -571,7 +572,7 @@ export default Vue.extend({ checksum: data.checksum, }; - const interval = this.plan.paymentFrequency === 'daily' ? 'Day' : 'Month'; + const interval = this.workspace.isDebug ? 'Day' : 'Month'; if (this.isRecurrent) { paymentData.cloudPayments = { diff --git a/src/types/plan.d.ts b/src/types/plan.d.ts index e00545f1e..100b3443a 100644 --- a/src/types/plan.d.ts +++ b/src/types/plan.d.ts @@ -31,10 +31,4 @@ export interface Plan { * Is plan default */ isDefault?: boolean; - - /** - * How often to charge payment for the plan. - * Monthly by default. - */ - paymentFrequency?: 'monthly' | 'daily' } diff --git a/src/types/workspaces.ts b/src/types/workspaces.ts index 31b1f7d3d..5f771b802 100644 --- a/src/types/workspaces.ts +++ b/src/types/workspaces.ts @@ -50,6 +50,9 @@ export interface Workspace { * Returns from CloudPayments */ subscriptionId?: string; + + /** True if workspace is used for debugging */ + isDebug?: boolean; } /**