@glissandoo/lib 1.67.0 → 1.68.0

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.
@@ -66,6 +66,7 @@ export default class Group extends GroupBasic<GroupData> {
66
66
  isAdmin: (userId: string) => boolean;
67
67
  isPlayer: (userId: string) => boolean;
68
68
  get isExpiredTrial(): boolean;
69
+ get isUpgradePlanRequired(): boolean;
69
70
  get firstAnswerAt(): FirebaseFirestore.Timestamp | null;
70
71
  get repertoireTags(): Record<string, import("./types").GroupRepertoireTag>;
71
72
  get repertoireTagsList(): (import("./types").GroupRepertoireTag & {
@@ -179,6 +179,10 @@ class Group extends basic_1.default {
179
179
  const isAboveMembersLimitPlanFree = members > plans_1.membersPerPlan[plans_1.PlansGroup.Piano];
180
180
  return this.status !== types_1.GroupStatus.Premium && isOutDateTrial && isAboveMembersLimitPlanFree;
181
181
  }
182
+ get isUpgradePlanRequired() {
183
+ const members = this.activePlayers.length;
184
+ return members > plans_1.membersPerPlan[this.planId];
185
+ }
182
186
  get firstAnswerAt() {
183
187
  return this.data.firstAnswerAt || null;
184
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.67.0",
3
+ "version": "1.68.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",