l-min-components 1.0.1195 → 1.0.1200
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/package.json +1 -1
- package/src/components/fileRightBar/enterpriseRightBar/index.jsx +4 -7
- package/src/components/header/getHeaderDetails.js +38 -0
- package/src/components/messageAddon/hooks/useMessaging.js +2 -1
- package/src/components/messageAddon/hooks/useRooms.js +2 -1
- package/src/components/messageAddon/messages/messages.jsx +3 -3
- package/src/hooks/leftNavMenu.jsx +3 -0
package/package.json
CHANGED
|
@@ -32,12 +32,6 @@ const EnterpriseRightBar = ({ planState }) => {
|
|
|
32
32
|
></CustomDotsContainer>
|
|
33
33
|
);
|
|
34
34
|
};
|
|
35
|
-
const responsive = {
|
|
36
|
-
mobile: {
|
|
37
|
-
breakpoint: { max: 5000, min: 0 },
|
|
38
|
-
items: 1,
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
35
|
|
|
42
36
|
const host = window?.location?.hostname;
|
|
43
37
|
const port = window?.location?.port ? `:${window.location.port}` : "";
|
|
@@ -64,7 +58,7 @@ const EnterpriseRightBar = ({ planState }) => {
|
|
|
64
58
|
// defaultActiveIndex={0}
|
|
65
59
|
// customDot={<CustomDots />}
|
|
66
60
|
autoPlay
|
|
67
|
-
infiniteLoop
|
|
61
|
+
infiniteLoop={courses?.length > 1}
|
|
68
62
|
showArrows={false}
|
|
69
63
|
showStatus={false}
|
|
70
64
|
showThumbs={false}
|
|
@@ -223,6 +217,9 @@ const EnterpriseContainer = styled.div`
|
|
|
223
217
|
bottom: 30;
|
|
224
218
|
}
|
|
225
219
|
}
|
|
220
|
+
.more-slot {
|
|
221
|
+
padding: 0px !important;
|
|
222
|
+
}
|
|
226
223
|
`;
|
|
227
224
|
|
|
228
225
|
const Course = styled.div`
|
|
@@ -332,6 +332,44 @@ const useHeader = () => {
|
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
|
|
335
|
+
|
|
336
|
+
const [{ ...getTotalMessagesCountData }, getTotalMessagesCount] = useAxios(
|
|
337
|
+
{
|
|
338
|
+
method: "GET",
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
manual: true,
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
|
|
345
|
+
const handleTotalMessagesCount = async (
|
|
346
|
+
account_type,
|
|
347
|
+
enterprise_account_id
|
|
348
|
+
) => {
|
|
349
|
+
try {
|
|
350
|
+
let apiUrl;
|
|
351
|
+
|
|
352
|
+
if (account_type === "instructor") {
|
|
353
|
+
// For instructor account type
|
|
354
|
+
apiUrl = enterprise_account_id
|
|
355
|
+
? `/notify/v1/instructor/${enterprise_account_id}/chats/new_messages/` // Affiliate instructor
|
|
356
|
+
: `/notify/v1/${account_type}/chats/new_messages/`; // Non-affiliate instructor
|
|
357
|
+
} else if (account_type === "enterprise") {
|
|
358
|
+
// For enterprise account type
|
|
359
|
+
apiUrl = `/notify/v1/${account_type}/chats/new_messages/`; // Enterprise
|
|
360
|
+
} else if (account_type === "personal") {
|
|
361
|
+
apiUrl = `/notify/v1/chats/new_messages/`;
|
|
362
|
+
} else {
|
|
363
|
+
}
|
|
364
|
+
await getTotalMessagesCount({
|
|
365
|
+
url: apiUrl,
|
|
366
|
+
});
|
|
367
|
+
} catch (err) {
|
|
368
|
+
console.log(err);
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
|
|
335
373
|
return {
|
|
336
374
|
handleGetUserDetails,
|
|
337
375
|
userDetails,
|
|
@@ -267,12 +267,13 @@ const useMessaging = () => {
|
|
|
267
267
|
account_id,
|
|
268
268
|
course_id,
|
|
269
269
|
room_id,
|
|
270
|
+
enterprise_account_id,
|
|
270
271
|
limit,
|
|
271
272
|
offset
|
|
272
273
|
) => {
|
|
273
274
|
try {
|
|
274
275
|
await roomMessageAffiliate({
|
|
275
|
-
url: `/notify/v1/instructor/${
|
|
276
|
+
url: `/notify/v1/instructor/${enterprise_account_id}/chats/`,
|
|
276
277
|
params: {
|
|
277
278
|
account_id,
|
|
278
279
|
course_id,
|
|
@@ -196,7 +196,7 @@ const Messages = ({
|
|
|
196
196
|
handleRoomRecipientDetails(accountType, receiverID, courseID);
|
|
197
197
|
}
|
|
198
198
|
if (affiliates && accountType === "instructor") {
|
|
199
|
-
handleRoomMessageAffiliate(receiverID, courseID, roomID);
|
|
199
|
+
handleRoomMessageAffiliate(receiverID, courseID, roomID, enterpriseAffiliateID);
|
|
200
200
|
handleRoomRecipientDetailsAffiliate(enterpriseAffiliateID, receiverID, courseID); //check later
|
|
201
201
|
// handleRoomRecipientDetails(accountType, receiverID, courseID);
|
|
202
202
|
}
|
|
@@ -223,8 +223,8 @@ const Messages = ({
|
|
|
223
223
|
handleRoomRecipientDetails(accountType, receiverID, courseID);
|
|
224
224
|
}
|
|
225
225
|
if (affiliates && accountType === "instructor") {
|
|
226
|
-
handleRoomMessageAffiliate(receiverID, courseID, roomID);
|
|
227
|
-
|
|
226
|
+
handleRoomMessageAffiliate(receiverID, courseID, roomID, enterpriseAffiliateID);
|
|
227
|
+
handleRoomRecipientDetailsAffiliate(enterpriseAffiliateID, receiverID, courseID); //
|
|
228
228
|
}
|
|
229
229
|
if (accountType === "personal") {
|
|
230
230
|
handleRetrieveMessage(receiverID, courseID, roomID);
|
|
@@ -149,6 +149,7 @@ export const sideMenuOptions = [
|
|
|
149
149
|
icon: <MessagesIcon />,
|
|
150
150
|
iconActive: <MessagesIconActive />,
|
|
151
151
|
text: "Messages",
|
|
152
|
+
notifications: true,
|
|
152
153
|
},
|
|
153
154
|
{
|
|
154
155
|
path: "/enterprise/announcements",
|
|
@@ -196,6 +197,7 @@ export const sideMenuOptions = [
|
|
|
196
197
|
icon: <MessagesIcon />,
|
|
197
198
|
iconActive: <MessagesIconActive />,
|
|
198
199
|
text: "Messages",
|
|
200
|
+
notifications: true,
|
|
199
201
|
},
|
|
200
202
|
{
|
|
201
203
|
path: "/instructor/announcements",
|
|
@@ -250,6 +252,7 @@ export const sideMenuOptions = [
|
|
|
250
252
|
icon: <MessagesIcon />,
|
|
251
253
|
iconActive: <MessagesIconActive />,
|
|
252
254
|
text: "Messages",
|
|
255
|
+
notifications: true,
|
|
253
256
|
},
|
|
254
257
|
{
|
|
255
258
|
path: "/personal/addons",
|