@glissandoo/lib 1.102.8 → 1.102.9
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.
|
@@ -5,6 +5,8 @@ export default class EventoPlayerBasic {
|
|
|
5
5
|
protected data: AEventPlayerBasicData;
|
|
6
6
|
constructor(eventId: string, data: AEventPlayerBasicData);
|
|
7
7
|
get id(): string;
|
|
8
|
+
get name(): string;
|
|
9
|
+
get lastname(): string;
|
|
8
10
|
get username(): string;
|
|
9
11
|
get displayName(): string;
|
|
10
12
|
get photoURL(): string;
|
|
@@ -17,6 +17,9 @@ export default class GroupPlayer extends UserExtended<GroupPlayerData> {
|
|
|
17
17
|
get joinedAt(): FirebaseFirestore.Timestamp;
|
|
18
18
|
get leavedAt(): FirebaseFirestore.Timestamp | null;
|
|
19
19
|
get leavedBy(): string | null;
|
|
20
|
+
get additionalInfo(): import("../../../helpers/slate").Descendant[];
|
|
21
|
+
get lastEditAdditionalInfoAt(): FirebaseFirestore.Timestamp | null;
|
|
22
|
+
get lastEditAdditionalInfoBy(): string | null;
|
|
20
23
|
get isActive(): boolean;
|
|
21
24
|
get eventsInvited(): number;
|
|
22
25
|
get eventsAnswered(): number;
|
|
@@ -47,6 +47,15 @@ class GroupPlayer extends extended_1.default {
|
|
|
47
47
|
get leavedBy() {
|
|
48
48
|
return this.data.leavedBy || null;
|
|
49
49
|
}
|
|
50
|
+
get additionalInfo() {
|
|
51
|
+
return this.data.additionalInfo || [];
|
|
52
|
+
}
|
|
53
|
+
get lastEditAdditionalInfoAt() {
|
|
54
|
+
return this.data.lastEditAdditionalInfoAt || null;
|
|
55
|
+
}
|
|
56
|
+
get lastEditAdditionalInfoBy() {
|
|
57
|
+
return this.data.lastEditAdditionalInfoBy || null;
|
|
58
|
+
}
|
|
50
59
|
get isActive() {
|
|
51
60
|
return this.exists && (0, lodash_1.isNull)(this.leavedAt);
|
|
52
61
|
}
|
|
@@ -148,47 +157,6 @@ class GroupPlayer extends extended_1.default {
|
|
|
148
157
|
const field = [type, 'rollcall', action, 'count'].join('_');
|
|
149
158
|
return (0, lodash_1.get)(this.data, field) || 0;
|
|
150
159
|
}
|
|
151
|
-
// public rollCallData(type?: EventType) {
|
|
152
|
-
// if (type) {
|
|
153
|
-
// const total = (this.get(`${type}_rollcall_count`) as number) || 0;
|
|
154
|
-
// const confirmed = (this.get(`${type}_rollcall_confirmed_count`) as number) || 0;
|
|
155
|
-
// const declined = (this.get(`${type}_rollcall_declined_count`) as number) || 0;
|
|
156
|
-
// return {
|
|
157
|
-
// total,
|
|
158
|
-
// confirmed,
|
|
159
|
-
// declined,
|
|
160
|
-
// nostatus: total - confirmed - declined,
|
|
161
|
-
// };
|
|
162
|
-
// }
|
|
163
|
-
// return {
|
|
164
|
-
// total: this.eventsRollCall,
|
|
165
|
-
// confirmed: this.eventsRollCallConfirmed,
|
|
166
|
-
// declined: this.eventsRollCallDeclined,
|
|
167
|
-
// nostatus:
|
|
168
|
-
// this.eventsRollCall - this.eventsRollCallConfirmed - this.eventsRollCallDeclined,
|
|
169
|
-
// };
|
|
170
|
-
// }
|
|
171
|
-
// public percPassEventsAnswered() {
|
|
172
|
-
// if (this.eventsPassed === 0) {
|
|
173
|
-
// return 0;
|
|
174
|
-
// }
|
|
175
|
-
// return Math.floor((this.eventsPassedAnswered * 100) / this.eventsPassed);
|
|
176
|
-
// }
|
|
177
|
-
// public answeredFreq() {
|
|
178
|
-
// const perc = this.percPassEventsAnswered();
|
|
179
|
-
// if (perc >= 0 && perc < 10) {
|
|
180
|
-
// return 'never';
|
|
181
|
-
// } else if (perc >= 10 && perc < 40) {
|
|
182
|
-
// return 'sometimes';
|
|
183
|
-
// } else if (perc >= 40 && perc < 70) {
|
|
184
|
-
// return 'often';
|
|
185
|
-
// } else if (perc >= 70 && perc < 90) {
|
|
186
|
-
// return 'usually';
|
|
187
|
-
// } else if (perc >= 90 && perc <= 100) {
|
|
188
|
-
// return 'always';
|
|
189
|
-
// }
|
|
190
|
-
// return null;
|
|
191
|
-
// }
|
|
192
160
|
getBadgeLevel(field, level) {
|
|
193
161
|
const _level = level || this.getCurrentBadgeLevel(field);
|
|
194
162
|
const badge = this[field];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Timestamp } from '@google-cloud/firestore';
|
|
2
2
|
import { InstrumentId } from '../../../helpers/instruments';
|
|
3
|
+
import { Descendant } from '../../../helpers/slate';
|
|
3
4
|
import { UserExtendedData } from '../../User/types';
|
|
4
5
|
export declare enum GroupPlayerRole {
|
|
5
6
|
Admin = "admin",
|
|
@@ -17,6 +18,9 @@ export interface GroupPlayerData extends UserExtendedData {
|
|
|
17
18
|
joinedAt: Timestamp;
|
|
18
19
|
leavedAt: Timestamp | null;
|
|
19
20
|
leavedBy: string | null;
|
|
21
|
+
additionalInfo: Descendant[];
|
|
22
|
+
lastEditAdditionalInfoAt: Timestamp | null;
|
|
23
|
+
lastEditAdditionalInfoBy: string | null;
|
|
20
24
|
badgeAccPractices?: BadgeLevels;
|
|
21
25
|
badgeAccPerformances?: BadgeLevels;
|
|
22
26
|
badgeStrikePractices?: BadgeLevels;
|