@glissandoo/lib 1.51.2 → 1.52.1
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
|
@@ -72,7 +72,7 @@ export default class Evento extends EventoPromoter<EventData> {
|
|
|
72
72
|
get templateId(): string | null;
|
|
73
73
|
get repeat(): import("./types").EventRepeatType | null;
|
|
74
74
|
isPlayer: (userId: string) => boolean;
|
|
75
|
-
isPlayerActive: (userId: string) => boolean
|
|
75
|
+
isPlayerActive: (userId: string) => boolean;
|
|
76
76
|
getPlayer: (userId: string) => EventPlayerBasicData | null;
|
|
77
77
|
isPlayerConfirmed(player: EventPlayerBasicData): boolean;
|
|
78
78
|
isPlayerDeclined(player: EventPlayerBasicData): boolean;
|
|
@@ -82,6 +82,8 @@ export default class Evento extends EventoPromoter<EventData> {
|
|
|
82
82
|
option: EventResponseDeadlineOptions;
|
|
83
83
|
customAt: import("../../types/firestore").Timestamp | null;
|
|
84
84
|
};
|
|
85
|
+
get isSelectionMode(): boolean;
|
|
85
86
|
get selectionModeClosedAt(): import("../../types/firestore").Timestamp | null;
|
|
86
87
|
get isSelectionModeClose(): boolean;
|
|
88
|
+
get isSelectionModeOpen(): boolean;
|
|
87
89
|
}
|
package/models/Evento/index.js
CHANGED
|
@@ -19,7 +19,7 @@ class Evento extends promoter_1.default {
|
|
|
19
19
|
};
|
|
20
20
|
this.isPlayerActive = (userId) => {
|
|
21
21
|
const player = this.getPlayer(userId);
|
|
22
|
-
return player && player.selected !== false;
|
|
22
|
+
return player !== null && player.selected !== false;
|
|
23
23
|
};
|
|
24
24
|
this.getPlayer = (userId) => {
|
|
25
25
|
return userId in this.players ? this.players[userId] : null;
|
|
@@ -192,11 +192,17 @@ class Evento extends promoter_1.default {
|
|
|
192
192
|
customAt: null,
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
+
get isSelectionMode() {
|
|
196
|
+
return !(0, lodash_1.isNull)(this.selectionMode);
|
|
197
|
+
}
|
|
195
198
|
get selectionModeClosedAt() {
|
|
196
199
|
return this.data.selectionModeClosedAt || null;
|
|
197
200
|
}
|
|
198
201
|
get isSelectionModeClose() {
|
|
199
|
-
return (this.selectionModeClosedAt
|
|
202
|
+
return (!(0, lodash_1.isNull)(this.selectionModeClosedAt) && this.selectionMode === types_2.EventSelectionMode.Closed);
|
|
203
|
+
}
|
|
204
|
+
get isSelectionModeOpen() {
|
|
205
|
+
return (0, lodash_1.isNull)(this.selectionModeClosedAt) && this.selectionMode === types_2.EventSelectionMode.Open;
|
|
200
206
|
}
|
|
201
207
|
}
|
|
202
208
|
exports.default = Evento;
|