@glissandoo/lib 1.52.1 → 1.52.2
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/Evento/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export default class Evento extends EventoPromoter<EventData> {
|
|
|
62
62
|
photoURL: string;
|
|
63
63
|
id: string;
|
|
64
64
|
}[];
|
|
65
|
+
get interestedPlayers(): string[];
|
|
65
66
|
get confirmedPlayers(): string[];
|
|
66
67
|
get declinedPlayers(): string[];
|
|
67
68
|
get pendingPlayers(): string[];
|
|
@@ -74,6 +75,7 @@ export default class Evento extends EventoPromoter<EventData> {
|
|
|
74
75
|
isPlayer: (userId: string) => boolean;
|
|
75
76
|
isPlayerActive: (userId: string) => boolean;
|
|
76
77
|
getPlayer: (userId: string) => EventPlayerBasicData | null;
|
|
78
|
+
isPlayerInterested(player: EventPlayerBasicData): boolean;
|
|
77
79
|
isPlayerConfirmed(player: EventPlayerBasicData): boolean;
|
|
78
80
|
isPlayerDeclined(player: EventPlayerBasicData): boolean;
|
|
79
81
|
isPlayerRollCallConfirmed(player: EventPlayerBasicData): boolean;
|
package/models/Evento/index.js
CHANGED
|
@@ -147,6 +147,9 @@ class Evento extends promoter_1.default {
|
|
|
147
147
|
return orderedPlayers;
|
|
148
148
|
return orderedPlayers.filter((player) => this.isPlayerActive(player.id));
|
|
149
149
|
}
|
|
150
|
+
get interestedPlayers() {
|
|
151
|
+
return this.playerIds.filter((playerId) => this.isPlayerInterested(this.players[playerId]));
|
|
152
|
+
}
|
|
150
153
|
get confirmedPlayers() {
|
|
151
154
|
return this.playerIds.filter((playerId) => this.isPlayerConfirmed(this.players[playerId]));
|
|
152
155
|
}
|
|
@@ -174,6 +177,9 @@ class Evento extends promoter_1.default {
|
|
|
174
177
|
get repeat() {
|
|
175
178
|
return this.data.repeat || null;
|
|
176
179
|
}
|
|
180
|
+
isPlayerInterested(player) {
|
|
181
|
+
return player.interested === true;
|
|
182
|
+
}
|
|
177
183
|
isPlayerConfirmed(player) {
|
|
178
184
|
return player.status === types_1.EventPlayerStatus.Confirmed;
|
|
179
185
|
}
|