@glissandoo/lib 1.104.9 → 1.104.11
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/functions/event.d.ts +1 -0
- package/models/Evento/Player/index.d.ts +2 -0
- package/models/Evento/Player/index.js +6 -0
- package/models/Evento/Player/types.d.ts +5 -3
- package/models/Group/Player/index.d.ts +1 -0
- package/models/Group/Player/index.js +3 -0
- package/models/Group/Player/types.d.ts +9 -0
- package/models/Group/index.d.ts +3 -1
- package/models/Group/index.js +11 -0
- package/models/Group/types.d.ts +28 -0
- package/models/Group/types.js +11 -1
- package/package.json +1 -1
package/functions/event.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ export declare namespace EventoFbFunctionsTypes {
|
|
|
167
167
|
export interface SetRollCallParams {
|
|
168
168
|
eventId: string;
|
|
169
169
|
list: Record<string, RollcallAction>;
|
|
170
|
+
remarks?: Record<string, string>;
|
|
170
171
|
}
|
|
171
172
|
export type SetRollCallResult = void;
|
|
172
173
|
export interface GetByIdParams {
|
|
@@ -31,4 +31,6 @@ export default class EventoPlayer extends PlayerBasic<EventPlayerData> {
|
|
|
31
31
|
get isDiscarded(): boolean;
|
|
32
32
|
get isPendingSelected(): boolean;
|
|
33
33
|
get isActive(): boolean;
|
|
34
|
+
get remarks(): string | null;
|
|
35
|
+
get questions(): import("./types").EventPlayerAnswers[];
|
|
34
36
|
}
|
|
@@ -87,5 +87,11 @@ class EventoPlayer extends basic_1.default {
|
|
|
87
87
|
get isActive() {
|
|
88
88
|
return this.exists && this.selected !== false;
|
|
89
89
|
}
|
|
90
|
+
get remarks() {
|
|
91
|
+
return this.data.remarks || null;
|
|
92
|
+
}
|
|
93
|
+
get questions() {
|
|
94
|
+
return this.data.questions || [];
|
|
95
|
+
}
|
|
90
96
|
}
|
|
91
97
|
exports.default = EventoPlayer;
|
|
@@ -17,7 +17,7 @@ export interface EventPlayerAnswers {
|
|
|
17
17
|
answers: string[];
|
|
18
18
|
note: string | null;
|
|
19
19
|
}
|
|
20
|
-
type EventPlayerHistoricalProperties = Extract<keyof
|
|
20
|
+
type EventPlayerHistoricalProperties = Extract<keyof EventPlayerData, 'status' | 'rollcall' | 'interested' | 'selected' | 'questions' | 'note' | 'remarks'>;
|
|
21
21
|
interface EventPlayerHistoryAction<T extends EventPlayerHistoricalProperties, V = EventPlayerData[T], M extends object = EmptyObject> {
|
|
22
22
|
type: T;
|
|
23
23
|
value: V;
|
|
@@ -26,10 +26,11 @@ interface EventPlayerHistoryAction<T extends EventPlayerHistoricalProperties, V
|
|
|
26
26
|
export type EventPlayerHistoryStatusAction = EventPlayerHistoryAction<'status', EventPlayerData['status']>;
|
|
27
27
|
export type EventPlayerHistoryQuestionsAction = EventPlayerHistoryAction<'questions', EventPlayerData['questions']>;
|
|
28
28
|
export type EventPlayerHistoryNoteAction = EventPlayerHistoryAction<'note', EventPlayerData['note']>;
|
|
29
|
-
export type EventPlayerHistoryRollcallAction = EventPlayerHistoryAction<'rollcall'>;
|
|
29
|
+
export type EventPlayerHistoryRollcallAction = EventPlayerHistoryAction<'rollcall', EventPlayerData['rollcall']>;
|
|
30
|
+
export type EventPlayerHistoryRollcallRemarksAction = EventPlayerHistoryAction<'remarks', EventPlayerData['remarks']>;
|
|
30
31
|
export type EventPlayerHistoryInterestedAction = EventPlayerHistoryAction<'interested'>;
|
|
31
32
|
export type EventPlayerHistorySelectedAction = EventPlayerHistoryAction<'selected', NonNullable<EventPlayerData['selected']>>;
|
|
32
|
-
export type EventPlayerHistoryActions = EventPlayerHistoryStatusAction | EventPlayerHistoryRollcallAction | EventPlayerHistoryInterestedAction | EventPlayerHistorySelectedAction | EventPlayerHistoryQuestionsAction | EventPlayerHistoryNoteAction;
|
|
33
|
+
export type EventPlayerHistoryActions = EventPlayerHistoryStatusAction | EventPlayerHistoryRollcallAction | EventPlayerHistoryInterestedAction | EventPlayerHistorySelectedAction | EventPlayerHistoryQuestionsAction | EventPlayerHistoryNoteAction | EventPlayerHistoryRollcallRemarksAction;
|
|
33
34
|
export interface EventPlayerHistory {
|
|
34
35
|
action: EventPlayerHistoryActions;
|
|
35
36
|
changedAt: Timestamp;
|
|
@@ -52,6 +53,7 @@ export interface EventPlayerData extends EventPlayerBasicData {
|
|
|
52
53
|
rollCalledAt: Timestamp | null;
|
|
53
54
|
questions: EventPlayerAnswers[];
|
|
54
55
|
history: EventPlayerHistory[];
|
|
56
|
+
remarks: string | null;
|
|
55
57
|
}
|
|
56
58
|
export interface AEventPlayerData extends EventPlayerData {
|
|
57
59
|
id: string;
|
|
@@ -3,6 +3,14 @@ import { InstrumentId } from '../../../helpers/instruments';
|
|
|
3
3
|
import { Descendant } from '../../../helpers/slate';
|
|
4
4
|
import { UserExtendedData } from '../../User/types';
|
|
5
5
|
import { AdminPermissions } from '../types';
|
|
6
|
+
export interface GroupPlayerCustomFieldValue {
|
|
7
|
+
value: string | number | boolean | Timestamp | null;
|
|
8
|
+
updatedAt: Timestamp;
|
|
9
|
+
updatedBy: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AGroupPlayerCustomFieldValue extends GroupPlayerCustomFieldValue {
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
6
14
|
export declare enum GroupPlayerRole {
|
|
7
15
|
Admin = "admin",
|
|
8
16
|
Member = "member",
|
|
@@ -21,6 +29,7 @@ export interface GroupPlayerData extends UserExtendedData {
|
|
|
21
29
|
leavedAt: Timestamp | null;
|
|
22
30
|
leavedBy: string | null;
|
|
23
31
|
additionalInfo: Descendant[];
|
|
32
|
+
customFields: Record<string, GroupPlayerCustomFieldValue>;
|
|
24
33
|
lastEditAdditionalInfoAt: Timestamp | null;
|
|
25
34
|
lastEditAdditionalInfoBy: string | null;
|
|
26
35
|
badgeAccPractices?: BadgeLevels;
|
package/models/Group/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { LanguagesTypes } from '../../lang';
|
|
|
4
4
|
import { EventPlayerStatus } from '../Evento/Player/types';
|
|
5
5
|
import { DocumentModel } from '../Model';
|
|
6
6
|
import GroupBasic from './basic';
|
|
7
|
-
import { AdminPermissions, CustomGroupInstrument, GroupConfigShowAttendanceToMembers, GroupData, GroupStatus, SocialNetwork } from './types';
|
|
7
|
+
import { AGroupCustomField, AdminPermissions, CustomGroupInstrument, GroupConfigShowAttendanceToMembers, GroupData, GroupStatus, SocialNetwork } from './types';
|
|
8
8
|
export default class Group extends GroupBasic<GroupData> {
|
|
9
9
|
constructor(doc: DocumentModel, lang?: LanguagesTypes);
|
|
10
10
|
get owner(): DocumentReference;
|
|
@@ -129,4 +129,6 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
129
129
|
multiselect: boolean;
|
|
130
130
|
id: string;
|
|
131
131
|
} | undefined;
|
|
132
|
+
get customFields(): Record<string, import("./types").GroupCustomField>;
|
|
133
|
+
get customFieldsList(): AGroupCustomField[];
|
|
132
134
|
}
|
package/models/Group/index.js
CHANGED
|
@@ -281,5 +281,16 @@ class Group extends basic_1.default {
|
|
|
281
281
|
getDefaultQuestion(status) {
|
|
282
282
|
return this.questionsList.find((q) => q.isDefault && q.status === status);
|
|
283
283
|
}
|
|
284
|
+
get customFields() {
|
|
285
|
+
return this.data.customFields || {};
|
|
286
|
+
}
|
|
287
|
+
get customFieldsList() {
|
|
288
|
+
return Object.entries(this.customFields)
|
|
289
|
+
.map(([id, field]) => ({
|
|
290
|
+
id,
|
|
291
|
+
...field,
|
|
292
|
+
}))
|
|
293
|
+
.sort((a, b) => a.order - b.order);
|
|
294
|
+
}
|
|
284
295
|
}
|
|
285
296
|
exports.default = Group;
|
package/models/Group/types.d.ts
CHANGED
|
@@ -6,6 +6,33 @@ import { CreatedOn } from '../../helpers/types';
|
|
|
6
6
|
import { EventPlayerStatus } from '../Evento/Player/types';
|
|
7
7
|
import { EventType } from '../Evento/types';
|
|
8
8
|
import { PlayerBasicData } from '../Player/types';
|
|
9
|
+
export declare enum GroupCustomFieldType {
|
|
10
|
+
TEXT = "text",
|
|
11
|
+
NUMBER = "number",
|
|
12
|
+
DATE = "date",
|
|
13
|
+
SELECT = "select",
|
|
14
|
+
EMAIL = "email",
|
|
15
|
+
PHONE = "phone"
|
|
16
|
+
}
|
|
17
|
+
export interface GroupCustomFieldOption {
|
|
18
|
+
id: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GroupCustomField {
|
|
22
|
+
label: string;
|
|
23
|
+
type: GroupCustomFieldType;
|
|
24
|
+
required: boolean;
|
|
25
|
+
placeholder: string | null;
|
|
26
|
+
options: GroupCustomFieldOption[];
|
|
27
|
+
order: number;
|
|
28
|
+
createdAt: Timestamp;
|
|
29
|
+
updatedAt: Timestamp;
|
|
30
|
+
createdBy: string;
|
|
31
|
+
updatedBy: string;
|
|
32
|
+
}
|
|
33
|
+
export interface AGroupCustomField extends GroupCustomField {
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
9
36
|
export interface GroupOnboardingMessage {
|
|
10
37
|
type: string;
|
|
11
38
|
createdAt: Timestamp;
|
|
@@ -197,6 +224,7 @@ export interface GroupData extends GroupBasicData {
|
|
|
197
224
|
onboardingMessages: GroupOnboardingMessage[];
|
|
198
225
|
subscriptionId: string | null;
|
|
199
226
|
questions: Record<string, GroupEventQuestion>;
|
|
227
|
+
customFields: Record<string, GroupCustomField>;
|
|
200
228
|
readonly createdOn: CreatedOn;
|
|
201
229
|
readonly owner: DocumentReference;
|
|
202
230
|
readonly createdAt: Timestamp;
|
package/models/Group/types.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigSitesKey = exports.GroupConfigKey = exports.AdminPermissions = void 0;
|
|
3
|
+
exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigSitesKey = exports.GroupConfigKey = exports.AdminPermissions = exports.GroupCustomFieldType = void 0;
|
|
4
|
+
// types/CustomFields.ts
|
|
5
|
+
var GroupCustomFieldType;
|
|
6
|
+
(function (GroupCustomFieldType) {
|
|
7
|
+
GroupCustomFieldType["TEXT"] = "text";
|
|
8
|
+
GroupCustomFieldType["NUMBER"] = "number";
|
|
9
|
+
GroupCustomFieldType["DATE"] = "date";
|
|
10
|
+
GroupCustomFieldType["SELECT"] = "select";
|
|
11
|
+
GroupCustomFieldType["EMAIL"] = "email";
|
|
12
|
+
GroupCustomFieldType["PHONE"] = "phone";
|
|
13
|
+
})(GroupCustomFieldType = exports.GroupCustomFieldType || (exports.GroupCustomFieldType = {}));
|
|
4
14
|
var AdminPermissions;
|
|
5
15
|
(function (AdminPermissions) {
|
|
6
16
|
AdminPermissions["Owner"] = "owner";
|