@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.
- package/models/Group/index.d.ts +1 -0
- package/models/Group/index.js +4 -0
- package/package.json +1 -1
package/models/Group/index.d.ts
CHANGED
|
@@ -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 & {
|
package/models/Group/index.js
CHANGED
|
@@ -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
|
}
|