@hulkapps/app-manager-vue 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hulkapps/app-manager-vue",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Vue SDK to render app manager contents",
5
5
  "main": "dist/app-manager-vue.ssr.js",
6
6
  "browser": "dist/app-manager-vue.esm.js",
@@ -4,6 +4,7 @@
4
4
  v-for="(header, key) in mappedStaticContentHeaders" :key="key"
5
5
  :id="`static-content-header-${key}`"
6
6
  :status="header.status"
7
+ :title="header.title"
7
8
  @dismiss="() => dismissBanner(key)"
8
9
  >
9
10
  <span v-html="header.content"></span>
@@ -228,9 +228,6 @@
228
228
  plans.push(this.plans[planKey]);
229
229
  }
230
230
  }
231
- if (plans.length === 0) {
232
- this.selectedPlan = 'yearly';
233
- }
234
231
  return plans;
235
232
  },
236
233
  yearlyPlan() {
@@ -240,9 +237,6 @@
240
237
  plans.push(this.plans[planKey]);
241
238
  }
242
239
  }
243
- if (plans.length === 0) {
244
- this.selectedPlan = 'monthly';
245
- }
246
240
  return plans;
247
241
  }
248
242
  },
@@ -271,7 +265,7 @@
271
265
  },
272
266
  calculateDiscountedPrice(plan) {
273
267
  if (plan.discount_type === 'percentage') {
274
- return plan.price - (plan.price/plan.discount)
268
+ return plan.price - (plan.price * plan.discount)/100
275
269
  }
276
270
  else if (plan.discount_type === 'amount') {
277
271
  return plan.price - plan.discount
@@ -333,6 +327,9 @@
333
327
  }
334
328
  this.shopify_plan = plansData.data.shopify_plan;
335
329
  this.plan = plansData.data.plan;
330
+ if (this.plan?.interval === 'ANNUAL') {
331
+ this.selectedPlan = 'annually'
332
+ }
336
333
  this.default_plan_id = plansData.data.default_plan_id;
337
334
  this.onboard = !this.plan
338
335
  }