@glissandoo/lib 1.104.6 → 1.104.8
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/customer.d.ts
CHANGED
|
@@ -111,3 +111,21 @@ export declare enum NotificationActions {
|
|
|
111
111
|
OfferApplicantAdd = "offer.applicant.add",
|
|
112
112
|
OfferSelectApplicant = "offer.select.applicant"
|
|
113
113
|
}
|
|
114
|
+
export declare enum NotificationActionsFilter {
|
|
115
|
+
EventCreated = "eventCreated",
|
|
116
|
+
PracticeEdited = "practiceEdited",
|
|
117
|
+
PerformanceEdited = "performanceEdited",
|
|
118
|
+
EventCanceled = "eventCanceled",
|
|
119
|
+
EventReminder = "eventReminder",
|
|
120
|
+
EventAttendanceConfirmed = "eventAttendanceConfirmed",
|
|
121
|
+
EventAttendanceDeclined = "eventAttendanceDeclined",
|
|
122
|
+
CommunicationCreated = "communicationCreated",
|
|
123
|
+
CommunicationComment = "communicationComment",
|
|
124
|
+
BadgeNew = "badgeNew",
|
|
125
|
+
MemberJoined = "memberJoined",
|
|
126
|
+
MemberLeft = "memberLeft",
|
|
127
|
+
MemberEdit = "memberEdit",
|
|
128
|
+
Offers = "offers",
|
|
129
|
+
ThemeClaims = "themeClaims"
|
|
130
|
+
}
|
|
131
|
+
export declare const notificationByFilter: Record<NotificationActionsFilter, NotificationActions[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotificationActions = void 0;
|
|
3
|
+
exports.notificationByFilter = exports.NotificationActionsFilter = exports.NotificationActions = void 0;
|
|
4
4
|
var NotificationActions;
|
|
5
5
|
(function (NotificationActions) {
|
|
6
6
|
NotificationActions["BadgeAccPerformancesFirstLevel"] = "badgeAccPerformances.firstLevel";
|
|
@@ -108,3 +108,123 @@ var NotificationActions;
|
|
|
108
108
|
NotificationActions["OfferApplicantAdd"] = "offer.applicant.add";
|
|
109
109
|
NotificationActions["OfferSelectApplicant"] = "offer.select.applicant";
|
|
110
110
|
})(NotificationActions = exports.NotificationActions || (exports.NotificationActions = {}));
|
|
111
|
+
var NotificationActionsFilter;
|
|
112
|
+
(function (NotificationActionsFilter) {
|
|
113
|
+
NotificationActionsFilter["EventCreated"] = "eventCreated";
|
|
114
|
+
NotificationActionsFilter["PracticeEdited"] = "practiceEdited";
|
|
115
|
+
NotificationActionsFilter["PerformanceEdited"] = "performanceEdited";
|
|
116
|
+
NotificationActionsFilter["EventCanceled"] = "eventCanceled";
|
|
117
|
+
NotificationActionsFilter["EventReminder"] = "eventReminder";
|
|
118
|
+
NotificationActionsFilter["EventAttendanceConfirmed"] = "eventAttendanceConfirmed";
|
|
119
|
+
NotificationActionsFilter["EventAttendanceDeclined"] = "eventAttendanceDeclined";
|
|
120
|
+
NotificationActionsFilter["CommunicationCreated"] = "communicationCreated";
|
|
121
|
+
NotificationActionsFilter["CommunicationComment"] = "communicationComment";
|
|
122
|
+
NotificationActionsFilter["BadgeNew"] = "badgeNew";
|
|
123
|
+
NotificationActionsFilter["MemberJoined"] = "memberJoined";
|
|
124
|
+
NotificationActionsFilter["MemberLeft"] = "memberLeft";
|
|
125
|
+
NotificationActionsFilter["MemberEdit"] = "memberEdit";
|
|
126
|
+
NotificationActionsFilter["Offers"] = "offers";
|
|
127
|
+
NotificationActionsFilter["ThemeClaims"] = "themeClaims";
|
|
128
|
+
})(NotificationActionsFilter = exports.NotificationActionsFilter || (exports.NotificationActionsFilter = {}));
|
|
129
|
+
exports.notificationByFilter = {
|
|
130
|
+
[NotificationActionsFilter.EventCreated]: [
|
|
131
|
+
NotificationActions.PerformanceCreate,
|
|
132
|
+
NotificationActions.PracticeCreate,
|
|
133
|
+
NotificationActions.PracticesCreate,
|
|
134
|
+
],
|
|
135
|
+
[NotificationActionsFilter.PerformanceEdited]: [
|
|
136
|
+
NotificationActions.PerformanceEditAttendance,
|
|
137
|
+
NotificationActions.PerformanceEditComments,
|
|
138
|
+
NotificationActions.PerformanceEditDatetime,
|
|
139
|
+
NotificationActions.PerformanceEditLocality,
|
|
140
|
+
NotificationActions.PerformanceEditRepertory,
|
|
141
|
+
NotificationActions.PerformanceEditTitle,
|
|
142
|
+
NotificationActions.PerformanceEditStage,
|
|
143
|
+
NotificationActions.PerformanceEditResponseDeadline,
|
|
144
|
+
NotificationActions.PerformanceEditImages,
|
|
145
|
+
NotificationActions.PerformanceEditAttachments,
|
|
146
|
+
NotificationActions.PerformanceEditQuestions,
|
|
147
|
+
NotificationActions.PerformancePlayersAdd,
|
|
148
|
+
],
|
|
149
|
+
[NotificationActionsFilter.PracticeEdited]: [
|
|
150
|
+
NotificationActions.PracticePlayersAdd,
|
|
151
|
+
NotificationActions.PracticeEditAttendance,
|
|
152
|
+
NotificationActions.PracticeEditComments,
|
|
153
|
+
NotificationActions.PracticeEditDatetime,
|
|
154
|
+
NotificationActions.PracticeEditLocality,
|
|
155
|
+
NotificationActions.PracticeEditRepertory,
|
|
156
|
+
NotificationActions.PracticeEditTitle,
|
|
157
|
+
NotificationActions.PracticeEditStage,
|
|
158
|
+
NotificationActions.PracticeEditResponseDeadline,
|
|
159
|
+
NotificationActions.PracticeEditImages,
|
|
160
|
+
NotificationActions.PracticeEditAttachments,
|
|
161
|
+
NotificationActions.PracticeEditQuestions,
|
|
162
|
+
NotificationActions.PracticesEditAttendance,
|
|
163
|
+
NotificationActions.PracticesEditComments,
|
|
164
|
+
NotificationActions.PracticesEditDatetime,
|
|
165
|
+
NotificationActions.PracticesEditLocality,
|
|
166
|
+
NotificationActions.PracticesEditRepertory,
|
|
167
|
+
NotificationActions.PracticesEditTitle,
|
|
168
|
+
NotificationActions.PracticesEditStage,
|
|
169
|
+
NotificationActions.PracticesEditResponseDeadline,
|
|
170
|
+
NotificationActions.PracticesEditImages,
|
|
171
|
+
NotificationActions.PracticesEditAttachments,
|
|
172
|
+
NotificationActions.PracticesEditQuestions,
|
|
173
|
+
NotificationActions.PracticesPlayersAdd,
|
|
174
|
+
],
|
|
175
|
+
[NotificationActionsFilter.EventCanceled]: [
|
|
176
|
+
NotificationActions.PerformanceCancel,
|
|
177
|
+
NotificationActions.PracticeCancel,
|
|
178
|
+
NotificationActions.PracticesCancel,
|
|
179
|
+
],
|
|
180
|
+
[NotificationActionsFilter.EventReminder]: [
|
|
181
|
+
NotificationActions.PerformanceReminder,
|
|
182
|
+
NotificationActions.PerformanceRollCallReminder,
|
|
183
|
+
NotificationActions.PracticeReminder,
|
|
184
|
+
NotificationActions.PracticeRollCallReminder,
|
|
185
|
+
],
|
|
186
|
+
[NotificationActionsFilter.EventAttendanceConfirmed]: [
|
|
187
|
+
NotificationActions.PerformanceAssistanceConfirm,
|
|
188
|
+
NotificationActions.PerformanceAssistanceConfirmByAdmin,
|
|
189
|
+
NotificationActions.PracticeAssistanceConfirm,
|
|
190
|
+
NotificationActions.PracticeAssistanceConfirmByAdmin,
|
|
191
|
+
],
|
|
192
|
+
[NotificationActionsFilter.EventAttendanceDeclined]: [
|
|
193
|
+
NotificationActions.PerformanceAssistanceDecline,
|
|
194
|
+
NotificationActions.PerformanceAssistanceDeclineByAdmin,
|
|
195
|
+
NotificationActions.PracticeAssistanceDecline,
|
|
196
|
+
NotificationActions.PracticeAssistanceDeclineByAdmin,
|
|
197
|
+
],
|
|
198
|
+
[NotificationActionsFilter.CommunicationCreated]: [NotificationActions.CommunicationCreate],
|
|
199
|
+
[NotificationActionsFilter.CommunicationComment]: [NotificationActions.CommunicationNewComment],
|
|
200
|
+
[NotificationActionsFilter.BadgeNew]: [
|
|
201
|
+
NotificationActions.BadgeAccPerformancesFirstLevel,
|
|
202
|
+
NotificationActions.BadgeAccPerformancesUpLevel,
|
|
203
|
+
NotificationActions.BadgeAccPracticesFirstLevel,
|
|
204
|
+
NotificationActions.BadgeAccPracticesUpLevel,
|
|
205
|
+
NotificationActions.BadgeAnswerEventsFirstLevel,
|
|
206
|
+
NotificationActions.BadgeAnswerEventsUpLevel,
|
|
207
|
+
NotificationActions.BadgeStrikePracticesFirstLevel,
|
|
208
|
+
NotificationActions.BadgeStrikePracticesUpLevel,
|
|
209
|
+
],
|
|
210
|
+
[NotificationActionsFilter.MemberJoined]: [
|
|
211
|
+
NotificationActions.GroupPlayersAdd,
|
|
212
|
+
NotificationActions.GroupPlayersJoin,
|
|
213
|
+
NotificationActions.GroupPlayersJoinPlayers,
|
|
214
|
+
],
|
|
215
|
+
[NotificationActionsFilter.MemberLeft]: [
|
|
216
|
+
NotificationActions.GroupPlayersLeave,
|
|
217
|
+
NotificationActions.GroupPlayersRemove,
|
|
218
|
+
],
|
|
219
|
+
[NotificationActionsFilter.MemberEdit]: [
|
|
220
|
+
NotificationActions.GroupPlayerSwitchInstrumentsByAdmin,
|
|
221
|
+
],
|
|
222
|
+
[NotificationActionsFilter.Offers]: [
|
|
223
|
+
NotificationActions.OfferApplicantAdd,
|
|
224
|
+
NotificationActions.OfferSelectApplicant,
|
|
225
|
+
],
|
|
226
|
+
[NotificationActionsFilter.ThemeClaims]: [
|
|
227
|
+
NotificationActions.ThemeClaimNew,
|
|
228
|
+
NotificationActions.ThemeClaimUpdate,
|
|
229
|
+
],
|
|
230
|
+
};
|
|
@@ -13,6 +13,7 @@ export default class Notification extends Model<UserNotificationData> {
|
|
|
13
13
|
get cleanPhotoURL(): string;
|
|
14
14
|
get isAvatar(): boolean;
|
|
15
15
|
get avatar(): import("../types").UserTinyData | null;
|
|
16
|
+
get userAvatar(): import("../types").UserTinyData | null;
|
|
16
17
|
get title(): string;
|
|
17
18
|
get text(): string;
|
|
18
19
|
get scene(): string;
|
|
@@ -51,6 +51,14 @@ class Notification extends Model_1.default {
|
|
|
51
51
|
}
|
|
52
52
|
return (0, lodash_1.get)(this.meta, [key1, key2]) || null;
|
|
53
53
|
}
|
|
54
|
+
get userAvatar() {
|
|
55
|
+
const userKeys = Object.keys(this.meta.user || {});
|
|
56
|
+
if (userKeys.length === 0) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const firstUserId = userKeys[0];
|
|
60
|
+
return (0, lodash_1.get)(this.meta.user, [firstUserId], null);
|
|
61
|
+
}
|
|
54
62
|
get title() {
|
|
55
63
|
return this.getTranslationByAction('title');
|
|
56
64
|
}
|