@glissandoo/lib 1.7.11 → 1.8.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/functions/eventPlayer.d.ts +7 -0
- package/functions/index.d.ts +1 -0
- package/functions/index.js +1 -0
- package/functions/regions.js +1 -0
- package/helpers/reasons.d.ts +6 -0
- package/helpers/reasons.js +31 -0
- package/models/Evento/Player/types.d.ts +7 -0
- package/models/Evento/Player/types.js +9 -1
- package/models/Evento/types.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventPlayerReason } from '../models/Evento/Player/types';
|
|
1
2
|
export declare namespace EventoPlayerFbFunctionsTypes {
|
|
2
3
|
enum SwitchAssistanceActions {
|
|
3
4
|
Confirm = "confirm",
|
|
@@ -9,6 +10,12 @@ export declare namespace EventoPlayerFbFunctionsTypes {
|
|
|
9
10
|
action: SwitchAssistanceActions;
|
|
10
11
|
}
|
|
11
12
|
type SwitchAssistanceResult = void;
|
|
13
|
+
interface SetReasonAttendanceParams {
|
|
14
|
+
eventId: string;
|
|
15
|
+
note: string | null;
|
|
16
|
+
reason: EventPlayerReason | null;
|
|
17
|
+
}
|
|
18
|
+
type SetReasonAttendanceResult = void;
|
|
12
19
|
interface EditParams {
|
|
13
20
|
eventId: string;
|
|
14
21
|
userIds: string[];
|
package/functions/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare enum FbFunctionName {
|
|
|
11
11
|
EventOnUpdate = "event-onUpdate",
|
|
12
12
|
EventPlayerEdit = "eventPlayer-edit",
|
|
13
13
|
EventPlayerSwitchAssistance = "eventPlayer-switchAssistance",
|
|
14
|
+
EventPlayerSetReasonAttendance = "eventPlayer-setReasonAttendance",
|
|
14
15
|
EventPublish = "event-publish",
|
|
15
16
|
EventRemove = "event-remove",
|
|
16
17
|
EventRepertoryDownloadPdf = "eventRepertory-downloadPdf",
|
package/functions/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var FbFunctionName;
|
|
|
15
15
|
FbFunctionName["EventOnUpdate"] = "event-onUpdate";
|
|
16
16
|
FbFunctionName["EventPlayerEdit"] = "eventPlayer-edit";
|
|
17
17
|
FbFunctionName["EventPlayerSwitchAssistance"] = "eventPlayer-switchAssistance";
|
|
18
|
+
FbFunctionName["EventPlayerSetReasonAttendance"] = "eventPlayer-setReasonAttendance";
|
|
18
19
|
FbFunctionName["EventPublish"] = "event-publish";
|
|
19
20
|
FbFunctionName["EventRemove"] = "event-remove";
|
|
20
21
|
FbFunctionName["EventRepertoryDownloadPdf"] = "eventRepertory-downloadPdf";
|
package/functions/regions.js
CHANGED
|
@@ -53,6 +53,7 @@ const regionByFunctions = {
|
|
|
53
53
|
[index_1.FbFunctionName.EventOnCreate]: GCloudRegions.UsCentral1,
|
|
54
54
|
[index_1.FbFunctionName.EventOnUpdate]: GCloudRegions.UsCentral1,
|
|
55
55
|
[index_1.FbFunctionName.EventPlayerSwitchAssistance]: GCloudRegions.UsCentral1,
|
|
56
|
+
[index_1.FbFunctionName.EventPlayerSetReasonAttendance]: GCloudRegions.EuropeWest6,
|
|
56
57
|
[index_1.FbFunctionName.EventPlayerEdit]: GCloudRegions.UsCentral1,
|
|
57
58
|
[index_1.FbFunctionName.EventRepertoryEdit]: GCloudRegions.UsCentral1,
|
|
58
59
|
[index_1.FbFunctionName.EventRepertoryDownloadPdf]: GCloudRegions.EuropeWest6,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EventPlayerReason, EventPlayerStatus } from '../models/Evento/Player/types';
|
|
2
|
+
export declare const reasonEmojis: Record<EventPlayerReason, string>;
|
|
3
|
+
export declare const getOptionsByType: (type: EventPlayerStatus) => {
|
|
4
|
+
id: EventPlayerReason;
|
|
5
|
+
emoji: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOptionsByType = exports.reasonEmojis = void 0;
|
|
4
|
+
const types_1 = require("../models/Evento/Player/types");
|
|
5
|
+
exports.reasonEmojis = {
|
|
6
|
+
[types_1.EventPlayerReason.ArrivingLate]: '⏱',
|
|
7
|
+
[types_1.EventPlayerReason.LeavingEarly]: '🏃',
|
|
8
|
+
[types_1.EventPlayerReason.Sick]: '🤒',
|
|
9
|
+
[types_1.EventPlayerReason.Vacation]: '🏖',
|
|
10
|
+
[types_1.EventPlayerReason.Other]: '✏️',
|
|
11
|
+
};
|
|
12
|
+
const reasonsByType = {
|
|
13
|
+
[types_1.EventPlayerStatus.Confirmed]: [
|
|
14
|
+
types_1.EventPlayerReason.ArrivingLate,
|
|
15
|
+
types_1.EventPlayerReason.LeavingEarly,
|
|
16
|
+
types_1.EventPlayerReason.Other,
|
|
17
|
+
],
|
|
18
|
+
[types_1.EventPlayerStatus.Declined]: [
|
|
19
|
+
types_1.EventPlayerReason.Vacation,
|
|
20
|
+
types_1.EventPlayerReason.Sick,
|
|
21
|
+
types_1.EventPlayerReason.Other,
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
const getOptionsByType = (type) => {
|
|
25
|
+
const reasons = Object.values(reasonsByType[type] || {});
|
|
26
|
+
return reasons.map((id) => ({
|
|
27
|
+
id,
|
|
28
|
+
emoji: exports.reasonEmojis[id],
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
exports.getOptionsByType = getOptionsByType;
|
|
@@ -4,6 +4,13 @@ export declare enum EventPlayerStatus {
|
|
|
4
4
|
Confirmed = "confirmed",
|
|
5
5
|
Declined = "declined"
|
|
6
6
|
}
|
|
7
|
+
export declare enum EventPlayerReason {
|
|
8
|
+
Sick = "Sick",
|
|
9
|
+
Vacation = "Vacation",
|
|
10
|
+
ArrivingLate = "ArrivingLate",
|
|
11
|
+
LeavingEarly = "LeavingEarly",
|
|
12
|
+
Other = "Other"
|
|
13
|
+
}
|
|
7
14
|
export interface EventPlayerData extends EventPlayerBasicData {
|
|
8
15
|
joinedAt: Timestamp;
|
|
9
16
|
rollCalledAt: Timestamp | null;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventPlayerStatus = void 0;
|
|
3
|
+
exports.EventPlayerReason = exports.EventPlayerStatus = void 0;
|
|
4
4
|
var EventPlayerStatus;
|
|
5
5
|
(function (EventPlayerStatus) {
|
|
6
6
|
EventPlayerStatus["Confirmed"] = "confirmed";
|
|
7
7
|
EventPlayerStatus["Declined"] = "declined";
|
|
8
8
|
})(EventPlayerStatus = exports.EventPlayerStatus || (exports.EventPlayerStatus = {}));
|
|
9
|
+
var EventPlayerReason;
|
|
10
|
+
(function (EventPlayerReason) {
|
|
11
|
+
EventPlayerReason["Sick"] = "Sick";
|
|
12
|
+
EventPlayerReason["Vacation"] = "Vacation";
|
|
13
|
+
EventPlayerReason["ArrivingLate"] = "ArrivingLate";
|
|
14
|
+
EventPlayerReason["LeavingEarly"] = "LeavingEarly";
|
|
15
|
+
EventPlayerReason["Other"] = "Other";
|
|
16
|
+
})(EventPlayerReason = exports.EventPlayerReason || (exports.EventPlayerReason = {}));
|
package/models/Evento/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { StageTemplate } from '../../helpers/types';
|
|
|
3
3
|
import { GroupBasicData } from '../Group/types';
|
|
4
4
|
import { PlayerBasicData } from '../Player/types';
|
|
5
5
|
import { ThemeBasicData } from '../Repertory/types';
|
|
6
|
-
import { EventPlayerStatus } from './Player/types';
|
|
6
|
+
import { EventPlayerReason, EventPlayerStatus } from './Player/types';
|
|
7
7
|
export declare enum EventFiles {
|
|
8
8
|
StageThumbnail = "stageThumbnail.png",
|
|
9
9
|
StagePDF = "stage.pdf",
|
|
@@ -35,6 +35,8 @@ export interface EventViewer {
|
|
|
35
35
|
}
|
|
36
36
|
export declare type EventStage = Pick<StageTemplate, 'boardMap' | 'boardSettings'>;
|
|
37
37
|
export interface EventPlayerBasicData extends PlayerBasicData {
|
|
38
|
+
note?: string | null;
|
|
39
|
+
reason?: EventPlayerReason | null;
|
|
38
40
|
status: EventPlayerStatus | null;
|
|
39
41
|
rollcall: EventPlayerStatus | null;
|
|
40
42
|
}
|