l-min-components 1.6.1237 → 1.6.1244

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.6.1237",
3
+ "version": "1.6.1244",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -276,7 +276,8 @@ const AppMainLayout = ({ children }) => {
276
276
  setNewNotifications,
277
277
  notificationMarkReadData,
278
278
  handleGetNotificationMarkRead,
279
- }}>
279
+ }}
280
+ >
280
281
  {/* display mobile layout on device width*/}
281
282
  {deviceWidth < 1200 ? (
282
283
  <MobileLayout findText={findText} />
@@ -288,7 +289,8 @@ const AppMainLayout = ({ children }) => {
288
289
  ) : (
289
290
  <Layout
290
291
  coming={coming}
291
- hasLayoutBackgroundImage={hasLayoutBackgroundImage}>
292
+ hasLayoutBackgroundImage={hasLayoutBackgroundImage}
293
+ >
292
294
  <HeaderComponent
293
295
  setNewNotifications={setNewNotifications}
294
296
  findText={findText}
@@ -338,7 +340,7 @@ const AppMainLayout = ({ children }) => {
338
340
  !window.location.pathname.includes("enterprise") &&
339
341
  !window.location.pathname.includes("manage-teams") && (
340
342
  <InstructorAccountSwitcher
341
- setAccountType={setAffiliatesActive}
343
+ // setAccountType={setAffiliatesActive}
342
344
  generalData={generalData}
343
345
  onChange={(v) => setAffiliateAccount(v)}
344
346
  />
@@ -0,0 +1,76 @@
1
+ import React from "react";
2
+
3
+ const BoxIcon = () => {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width="57"
8
+ height="56"
9
+ viewBox="0 0 57 56"
10
+ fill="none"
11
+ >
12
+ <path
13
+ fillRule="evenodd"
14
+ clipRule="evenodd"
15
+ d="M32.1669 18.4472C31.4002 18.1557 30.5959 17.9703 29.7772 17.8963C29.7195 17.8914 29.6634 17.8753 29.612 17.8489C29.5607 17.8226 29.5152 17.7864 29.4782 17.7426C29.4412 17.6989 29.4134 17.6483 29.3964 17.5939C29.3795 17.5395 29.3737 17.4823 29.3795 17.4257C29.3852 17.369 29.4023 17.3141 29.4299 17.264C29.4574 17.214 29.4948 17.1698 29.5398 17.134C29.5849 17.0982 29.6368 17.0716 29.6924 17.0557C29.748 17.0398 29.8063 17.0348 29.8639 17.0412C30.7636 17.1229 31.6474 17.3274 32.4897 17.6488C32.5975 17.6909 32.6839 17.7732 32.7298 17.8778C32.7758 17.9824 32.7776 18.1007 32.7347 18.2065C32.6919 18.3124 32.608 18.3972 32.5015 18.4424C32.395 18.4875 32.2747 18.4892 32.1669 18.4472ZM27.6335 17.88C26.5992 17.9565 25.6525 17.9728 24.788 17.9367C24.7299 17.9354 24.6726 17.9227 24.6196 17.8994C24.5665 17.8761 24.5188 17.8427 24.479 17.801C24.4393 17.7594 24.4083 17.7104 24.3881 17.6569C24.3678 17.6034 24.3586 17.5465 24.361 17.4895C24.3634 17.4325 24.3773 17.3765 24.402 17.3248C24.4266 17.2731 24.4615 17.2268 24.5046 17.1885C24.5477 17.1502 24.5981 17.1207 24.6529 17.1018C24.7077 17.0828 24.7659 17.0748 24.8239 17.0782C25.6577 17.1126 26.5704 17.0962 27.5679 17.0223C27.6804 17.0194 27.7898 17.0591 27.8733 17.1332C27.9568 17.2074 28.0081 17.3102 28.0166 17.4205C28.025 17.5307 27.9899 17.6399 27.9186 17.7255C27.8473 17.811 27.7452 17.8663 27.6335 17.88ZM22.4255 17.6823C21.4052 17.4941 20.5399 17.2157 19.8127 16.8728C19.7609 16.8484 19.7145 16.8141 19.6761 16.7721C19.6378 16.73 19.6082 16.681 19.5892 16.6277C19.5701 16.5744 19.5619 16.518 19.5651 16.4616C19.5682 16.4053 19.5827 16.35 19.6076 16.2992C19.6324 16.2483 19.6673 16.2027 19.7101 16.165C19.7529 16.1273 19.8029 16.0983 19.8571 16.0796C19.9113 16.0609 19.9688 16.0528 20.0262 16.0559C20.0836 16.059 20.1398 16.0732 20.1916 16.0976C20.8584 16.4122 21.652 16.6657 22.5874 16.8384C22.6456 16.8469 22.7014 16.8669 22.7516 16.8971C22.8018 16.9274 22.8452 16.9672 22.8793 17.0143C22.9134 17.0615 22.9375 17.1148 22.9501 17.1713C22.9627 17.2278 22.9636 17.2861 22.9527 17.3429C22.9418 17.3998 22.9194 17.4538 22.8867 17.5019C22.854 17.55 22.8118 17.5911 22.7626 17.6228C22.7134 17.6545 22.6582 17.6761 22.6002 17.6863C22.5423 17.6965 22.4829 17.6952 22.4255 17.6823ZM18.0295 15.6791C17.2455 14.9358 16.7852 14.0798 16.5779 13.2093C16.5514 13.0983 16.5709 12.9815 16.6321 12.8846C16.6933 12.7878 16.7912 12.7188 16.9042 12.6928C17.0173 12.6668 17.1361 12.686 17.2348 12.7461C17.3334 12.8062 17.4037 12.9023 17.4301 13.0133C17.6016 13.7361 17.9866 14.4442 18.6367 15.0604C18.6781 15.0995 18.7112 15.1463 18.7342 15.198C18.7571 15.2498 18.7695 15.3054 18.7705 15.3618C18.7716 15.4183 18.7613 15.4743 18.7403 15.5268C18.7193 15.5794 18.688 15.6273 18.6481 15.6679C18.6082 15.7086 18.5606 15.7411 18.5079 15.7636C18.4553 15.7862 18.3986 15.7983 18.3412 15.7994C18.2837 15.8004 18.2266 15.7903 18.1731 15.7697C18.1197 15.749 18.0709 15.7183 18.0295 15.6791ZM16.7861 10.2504C17.1335 9.34466 17.7224 8.57552 18.4399 8.08911C18.5355 8.0245 18.6533 7.99983 18.7674 8.02054C18.8816 8.04125 18.9826 8.10564 19.0484 8.19954C19.1142 8.29345 19.1393 8.40917 19.1182 8.52126C19.0972 8.63335 19.0316 8.73262 18.936 8.79724C18.3559 9.18997 17.886 9.81904 17.6051 10.5529C17.5643 10.6596 17.482 10.746 17.3763 10.793C17.2706 10.8401 17.1502 10.844 17.0416 10.8039C16.933 10.7638 16.8451 10.6829 16.7972 10.5791C16.7492 10.4753 16.7453 10.3571 16.7861 10.2504ZM28.1856 8.0874C27.7052 5.87365 25.7907 4.79685 24.41 4.78911C23.9567 4.78654 23.5639 4.89138 23.36 5.15951C23.2392 5.31849 23.2025 5.53161 23.2489 5.79286C23.2686 5.90523 23.2421 6.02069 23.1751 6.11384C23.1082 6.20699 23.0063 6.27021 22.8919 6.28958C22.7775 6.30896 22.6599 6.2829 22.5651 6.21714C22.4702 6.15139 22.4058 6.05132 22.3861 5.93896C22.2916 5.40185 22.4106 4.9713 22.6591 4.6456C23.0065 4.18755 23.6435 3.92544 24.4144 3.92974C26.0952 3.93919 28.4569 5.21365 29.0414 7.90865C29.0543 7.9642 29.0559 8.02174 29.046 8.07791C29.0361 8.13408 29.015 8.18775 28.9838 8.23581C28.9525 8.28386 28.9119 8.32533 28.8642 8.35781C28.8165 8.39029 28.7627 8.41312 28.7059 8.42498C28.6492 8.43684 28.5906 8.43748 28.5335 8.42688C28.4765 8.41628 28.4222 8.39464 28.3738 8.36322C28.3254 8.3318 28.2838 8.29123 28.2515 8.24388C28.2192 8.19653 28.1968 8.14333 28.1856 8.0874Z"
16
+ fill="#C6CCCC"
17
+ />
18
+ <path
19
+ fillRule="evenodd"
20
+ clipRule="evenodd"
21
+ d="M29.0411 8.09114C28.4487 10.7724 26.0958 12.0408 24.4193 12.0511C23.589 12.0554 22.9161 11.7521 22.5871 11.227C22.3885 10.9108 22.3018 10.5077 22.3946 10.0153C22.5083 9.40943 22.9143 8.63341 23.764 7.71216C23.802 7.66865 23.8486 7.63306 23.9009 7.6075C23.9532 7.58194 24.0101 7.56693 24.0684 7.56334C24.1267 7.55975 24.1852 7.56767 24.2403 7.58662C24.2954 7.60557 24.3462 7.63517 24.3895 7.67368C24.4327 7.71219 24.4678 7.75882 24.4924 7.81083C24.5171 7.86284 24.5309 7.91917 24.533 7.9765C24.5351 8.03383 24.5255 8.091 24.5048 8.14464C24.4841 8.19828 24.4527 8.24729 24.4123 8.2888C23.8208 8.93075 23.47 9.47818 23.316 9.93794C23.1996 10.2886 23.2022 10.5696 23.3317 10.7767C23.449 10.9632 23.659 11.0758 23.9118 11.1376C24.2295 11.215 24.6101 11.209 25.0117 11.1256C26.2953 10.8592 27.7671 9.80474 28.1853 7.90896C28.2147 7.80237 28.2846 7.71094 28.3806 7.65355C28.4767 7.59616 28.5915 7.5772 28.7014 7.60059C28.8112 7.62398 28.9078 7.68793 28.971 7.77923C29.0342 7.87053 29.0593 7.98219 29.0411 8.09114Z"
22
+ fill="#C6CCCC"
23
+ />
24
+ <path
25
+ fillRule="evenodd"
26
+ clipRule="evenodd"
27
+ d="M28.7266 8.85938H22.8684C22.6364 8.85938 22.4138 8.76883 22.2497 8.60767C22.0856 8.44651 21.9934 8.22792 21.9934 8C21.9934 7.77208 22.0856 7.55349 22.2497 7.39233C22.4138 7.23117 22.6364 7.14062 22.8684 7.14062H28.7266C28.9586 7.14062 29.1812 7.23117 29.3453 7.39233C29.5094 7.55349 29.6016 7.77208 29.6016 8C29.6016 8.22792 29.5094 8.44651 29.3453 8.60767C29.1812 8.76883 28.9586 8.85938 28.7266 8.85938Z"
28
+ fill="#ADB3B3"
29
+ />
30
+ <path
31
+ fillRule="evenodd"
32
+ clipRule="evenodd"
33
+ d="M46.4375 42.4038V47.224C46.4375 48.1727 45.804 49.0089 44.8783 49.2813L29.1283 53.922C28.7185 54.0431 28.2815 54.0431 27.8718 53.922L12.1217 49.2813C11.6711 49.1488 11.276 48.877 10.9951 48.5064C10.7142 48.1357 10.5625 47.686 10.5625 47.224V40.3516C10.5625 40.2376 10.6086 40.1283 10.6906 40.0477C10.7727 39.9671 10.884 39.9219 11 39.9219C11.116 39.9219 11.2273 39.9671 11.3094 40.0477C11.3914 40.1283 11.4375 40.2376 11.4375 40.3516V47.224C11.4375 47.7929 11.8181 48.2948 12.3729 48.4589L28.1229 53.0995C28.3689 53.1717 28.6311 53.1717 28.8771 53.0995L44.6271 48.4589C44.8974 48.379 45.1343 48.2158 45.3027 47.9934C45.4712 47.7709 45.5623 47.5012 45.5625 47.224V42.4038C45.5625 42.2898 45.6086 42.1805 45.6906 42.0999C45.7727 42.0193 45.884 41.9741 46 41.9741C46.116 41.9741 46.2273 42.0193 46.3094 42.0999C46.3914 42.1805 46.4375 42.2898 46.4375 42.4038Z"
34
+ fill="#C6CCCC"
35
+ />
36
+ <path
37
+ fillRule="evenodd"
38
+ clipRule="evenodd"
39
+ d="M47.4583 32.6659L50.806 37.5403C50.92 37.7057 50.9932 37.8949 51.0199 38.0928C51.0466 38.2908 51.026 38.4922 50.9598 38.681C50.8936 38.8698 50.7836 39.0409 50.6384 39.1808C50.4933 39.3206 50.317 39.4254 50.1235 39.4868L34.3779 44.5115C34.1072 44.5979 33.8153 44.5956 33.5461 44.5049C33.2769 44.4143 33.0449 44.2402 32.8852 44.0088L28.14 37.1321C28.102 37.0769 28.0775 37.0138 28.0686 36.9477C28.0597 36.8817 28.0665 36.8145 28.0886 36.7515C28.1107 36.6884 28.1474 36.6313 28.1958 36.5846C28.2442 36.5379 28.303 36.5029 28.3675 36.4824L45.8675 30.9051C45.976 30.8768 46.0914 30.8904 46.1899 30.9431C46.2885 30.9959 46.3627 31.0838 46.3972 31.1886C46.4318 31.2935 46.424 31.4074 46.3756 31.5069C46.3272 31.6063 46.2418 31.6837 46.137 31.7232L29.1909 37.1235L33.6097 43.5267C33.6629 43.6039 33.7403 43.662 33.8301 43.6922C33.9199 43.7225 34.0173 43.7232 34.1075 43.6943L49.8532 38.6695C49.9176 38.649 49.9763 38.614 50.0246 38.5673C50.0729 38.5207 50.1095 38.4637 50.1316 38.4008C50.1536 38.3379 50.1605 38.2708 50.1517 38.2049C50.1428 38.1389 50.1185 38.0759 50.0807 38.0207L46.7329 33.1463C46.6996 33.0996 46.6762 33.0468 46.6639 32.991C46.6516 32.9353 46.6508 32.8777 46.6614 32.8217C46.672 32.7656 46.6939 32.7121 46.7257 32.6645C46.7576 32.6168 46.7988 32.5758 46.8469 32.5439C46.8951 32.512 46.9492 32.4899 47.0061 32.4788C47.0631 32.4676 47.1217 32.4677 47.1786 32.4791C47.2355 32.4905 47.2896 32.5128 47.3376 32.5449C47.3856 32.577 47.4266 32.6181 47.4583 32.6659Z"
40
+ fill="#C6CCCC"
41
+ />
42
+ <path
43
+ fillRule="evenodd"
44
+ clipRule="evenodd"
45
+ d="M13.6285 31.7006L28.6391 36.4847C28.6952 36.5009 28.7474 36.528 28.7926 36.5643C28.8379 36.6007 28.8752 36.6456 28.9025 36.6963C28.9298 36.7471 28.9465 36.8027 28.9515 36.8599C28.9565 36.9171 28.9499 36.9747 28.9318 37.0293C28.9138 37.0839 28.8849 37.1345 28.8466 37.1779C28.8084 37.2213 28.7617 37.2568 28.7093 37.2822C28.6569 37.3076 28.5998 37.3225 28.5415 37.3259C28.4831 37.3293 28.4247 37.3211 28.3696 37.302L13.359 32.5187C13.2485 32.4836 13.1568 32.4068 13.1039 32.3053C13.0511 32.2038 13.0415 32.0858 13.0772 31.9773C13.113 31.8688 13.1911 31.7787 13.2945 31.7268C13.3979 31.6749 13.518 31.6655 13.6285 31.7006Z"
46
+ fill="#C6CCCC"
47
+ />
48
+ <path
49
+ fillRule="evenodd"
50
+ clipRule="evenodd"
51
+ d="M27.6285 38.9298L24.1224 44.0113C23.7942 44.4866 23.1861 44.6911 22.6296 44.5141L6.88399 39.4893C6.69051 39.4279 6.51423 39.3231 6.36908 39.1833C6.22393 39.0434 6.11391 38.8723 6.0477 38.6835C5.9815 38.4947 5.96093 38.2933 5.98762 38.0953C6.01431 37.8974 6.08753 37.7082 6.20149 37.5428L10.6421 31.076C10.7073 30.9817 10.8079 30.9165 10.9218 30.8948C11.0358 30.8731 11.1538 30.8965 11.2502 30.96C11.3463 31.024 11.4126 31.1228 11.4348 31.2347C11.4569 31.3466 11.433 31.4626 11.3684 31.5573L6.92686 38.0232C6.88936 38.0785 6.86536 38.1415 6.85672 38.2073C6.84808 38.2732 6.85504 38.3402 6.87706 38.4029C6.89907 38.4657 6.93555 38.5227 6.98365 38.5694C7.03175 38.616 7.09017 38.6512 7.15437 38.672L22.9 43.6968C22.9903 43.7257 23.0876 43.725 23.1775 43.6948C23.2673 43.6645 23.3446 43.6064 23.3979 43.5292L26.904 38.4477C26.9691 38.3534 27.0697 38.2883 27.1836 38.2668C27.2976 38.2453 27.4156 38.2691 27.5117 38.333C27.6077 38.3969 27.674 38.4957 27.6959 38.6077C27.7178 38.7196 27.6936 38.8355 27.6285 38.9298ZM43.2122 30.8758L28.3696 26.1303C28.3053 26.1093 28.2468 26.074 28.1987 26.0271C28.1506 25.9803 28.1142 25.9231 28.0923 25.8601C28.0705 25.7971 28.0637 25.73 28.0727 25.664C28.0816 25.598 28.106 25.535 28.1439 25.4798L32.3797 19.361C32.5395 19.1302 32.7713 18.9566 33.0402 18.8663C33.309 18.7759 33.6005 18.7737 33.8707 18.86L49.6172 23.8848C49.8104 23.9467 49.9863 24.0518 50.1311 24.1919C50.2759 24.3319 50.3857 24.5029 50.4519 24.6916C50.518 24.8804 50.5387 25.0816 50.5123 25.2794C50.4859 25.4773 50.4131 25.6665 50.2997 25.8321L46.3684 31.5573C46.3014 31.6471 46.2016 31.7079 46.09 31.727C45.9783 31.7461 45.8635 31.722 45.7695 31.6597C45.6756 31.5975 45.6099 31.5019 45.5861 31.3931C45.5623 31.2843 45.5824 31.1706 45.6421 31.076L49.5744 25.3517C49.6122 25.2965 49.6365 25.2334 49.6454 25.1674C49.6542 25.1014 49.6473 25.0342 49.6253 24.9713C49.6032 24.9083 49.5666 24.8512 49.5183 24.8045C49.47 24.7578 49.4113 24.7227 49.3469 24.702L33.6004 19.6773C33.5103 19.6485 33.4132 19.6492 33.3236 19.6792C33.2339 19.7093 33.1567 19.7671 33.1034 19.844L29.1947 25.4901L43.4826 30.0585C43.5918 30.0947 43.682 30.1716 43.7338 30.2727C43.7855 30.3738 43.7946 30.4909 43.759 30.5985C43.7234 30.7061 43.646 30.7956 43.5436 30.8475C43.4413 30.8994 43.3222 30.9096 43.2122 30.8758Z"
52
+ fill="#C6CCCC"
53
+ />
54
+ <path
55
+ fillRule="evenodd"
56
+ clipRule="evenodd"
57
+ d="M28.6355 26.1303L11.1355 31.7248C11.0451 31.754 10.9476 31.7534 10.8576 31.7231C10.7676 31.6929 10.69 31.6347 10.6368 31.5573L6.70539 25.8321C6.59198 25.6665 6.51923 25.4773 6.49283 25.2794C6.46643 25.0816 6.48711 24.8804 6.55325 24.6916C6.61939 24.5029 6.72918 24.3319 6.874 24.1919C7.01883 24.0518 7.19473 23.9467 7.38789 23.8848L23.1344 18.86C23.4046 18.7737 23.6961 18.7759 23.965 18.8663C24.2338 18.9566 24.4656 19.1302 24.6254 19.361L27.6861 23.7816C27.7515 23.8759 27.776 23.9918 27.7543 24.1038C27.7327 24.2158 27.6666 24.3148 27.5706 24.3789C27.4747 24.4431 27.3567 24.4672 27.2427 24.4459C27.1286 24.4246 27.0278 24.3597 26.9625 24.2655L23.9018 19.844C23.8485 19.7671 23.7712 19.7093 23.6816 19.6792C23.5919 19.6492 23.4948 19.6485 23.4048 19.6773L7.65826 24.702C7.59405 24.723 7.53562 24.7582 7.48753 24.805C7.43943 24.8518 7.40296 24.9088 7.38095 24.9716C7.35895 25.0345 7.35199 25.1015 7.36063 25.1674C7.36927 25.2333 7.39327 25.2964 7.43077 25.3517L11.1784 30.8079L28.3643 25.3131C28.4746 25.2777 28.5947 25.2869 28.6982 25.3385C28.8017 25.3902 28.88 25.4801 28.916 25.5885C28.9519 25.6969 28.9426 25.8148 28.89 25.9164C28.8374 26.0181 28.7459 26.095 28.6355 26.1303Z"
58
+ fill="#C6CCCC"
59
+ />
60
+ <path
61
+ fillRule="evenodd"
62
+ clipRule="evenodd"
63
+ d="M15.2506 31.3157L28.5042 35.5387L41.7578 31.3157L28.5042 27.0781L15.2506 31.3157Z"
64
+ fill="#ADB3B3"
65
+ />
66
+ <path
67
+ fillRule="evenodd"
68
+ clipRule="evenodd"
69
+ d="M32.8806 25.6799C33.116 25.3542 33.3181 25.0268 33.4879 24.6993C33.5407 24.598 33.6322 24.5214 33.7425 24.4863C33.8528 24.4512 33.9727 24.4606 34.076 24.5122C34.1792 24.5639 34.2574 24.6537 34.2933 24.762C34.3292 24.8702 34.3199 24.988 34.2675 25.0895C34.0794 25.453 33.8554 25.8165 33.5937 26.1783C33.5264 26.2712 33.4243 26.334 33.3099 26.353C33.1954 26.3719 33.078 26.3454 32.9834 26.2793C32.8889 26.2132 32.8249 26.1129 32.8056 26.0005C32.7863 25.8881 32.8133 25.7728 32.8806 25.6799ZM34.0942 22.9118C34.1724 22.4395 34.1768 21.9581 34.1074 21.4844C34.0905 21.3716 34.12 21.2568 34.1894 21.1654C34.2587 21.0739 34.3622 21.0133 34.477 20.9967C34.5919 20.9802 34.7088 21.0092 34.8019 21.0773C34.895 21.1454 34.9568 21.247 34.9736 21.3598C35.0552 21.9191 35.0501 22.4872 34.9587 23.045C34.9408 23.1576 34.878 23.2586 34.7842 23.3257C34.6904 23.3929 34.5733 23.4206 34.4587 23.403C34.344 23.3853 34.2412 23.3236 34.1729 23.2315C34.1045 23.1394 34.0763 23.0244 34.0942 22.9118Z"
70
+ fill="#C6CCCC"
71
+ />
72
+ </svg>
73
+ );
74
+ };
75
+
76
+ export default BoxIcon;
@@ -8,6 +8,7 @@ import styled from "styled-components";
8
8
  import moment from "moment";
9
9
  import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
10
10
  import { Carousel as ReactCarousl } from "react-responsive-carousel";
11
+ import BoxIcon from "./boxIcon";
11
12
 
12
13
  const EnterpriseRightBar = ({ planState }) => {
13
14
  const {
@@ -41,22 +42,10 @@ const EnterpriseRightBar = ({ planState }) => {
41
42
  <EnterpriseContainer
42
43
  className={planState === "GRACE PERIOD" ? "grace_period" : ""}
43
44
  >
44
- {courses?.length > 0 && courses && (
45
- <Banner>
46
- <h3>Courses ending soon</h3>
45
+ <Banner>
46
+ <h3>Courses ending soon</h3>
47
+ {courses?.length > 0 ? (
47
48
  <ReactCarousl
48
- // responsive={responsive}
49
- // arrows={false}
50
- // showDots
51
- // autoPlaySpeed={1000}
52
- // autoPlay
53
- // infinite
54
- // transitionDuration={2000}
55
- // renderDotsOutside
56
- // containerClass="carousel-container"
57
- // dotListClass="custom-dot-list-style"
58
- // defaultActiveIndex={0}
59
- // customDot={<CustomDots />}
60
49
  autoPlay
61
50
  infiniteLoop={courses?.length > 1}
62
51
  showArrows={false}
@@ -92,8 +81,14 @@ const EnterpriseRightBar = ({ planState }) => {
92
81
  </Course>
93
82
  ))}
94
83
  </ReactCarousl>
95
- </Banner>
96
- )}
84
+ ) : (
85
+ <EmptyCourse>
86
+ <BoxIcon />
87
+ <p>There is no course ending in the next 30 days </p>
88
+ </EmptyCourse>
89
+ )}
90
+ </Banner>
91
+
97
92
  <RecentAddedEnterprie>
98
93
  <Button
99
94
  type="primary"
@@ -118,6 +113,7 @@ const EnterpriseRightBar = ({ planState }) => {
118
113
  planState={planState}
119
114
  siotCount={slotData?.total}
120
115
  remainingSlot={slotData?.remaining}
116
+ data={slotData}
121
117
  />
122
118
  </EnterpriseContainer>
123
119
  );
@@ -275,4 +271,23 @@ const Course = styled.div`
275
271
  object-fit: cover;
276
272
  }
277
273
  `;
274
+
275
+ const EmptyCourse = styled.div`
276
+ height: 132px;
277
+ width: 100%;
278
+ border-radius: 20px;
279
+ background: #f5f7f7;
280
+ display: flex;
281
+ flex-direction: column;
282
+ align-items: center;
283
+ justify-content: center;
284
+ > p {
285
+ color: #636666;
286
+ text-align: center;
287
+ width: 100%;
288
+ max-width: 144px;
289
+ margin: 0 auto;
290
+ font-size: 12px;
291
+ }
292
+ `;
278
293
  export default EnterpriseRightBar;
@@ -4,20 +4,23 @@ import Button from "../../button";
4
4
  // import UpgradeIcon from "../assets/Feature.png";
5
5
  import EnterpriseUpgrade from "../assets/yellow-lock.png";
6
6
  import Staricon from "../assets/star";
7
+ import styled from "styled-components";
7
8
 
8
9
  const UpgradeComponent = ({
9
10
  UpgradeClick,
10
11
  planState,
11
12
  siotCount = 0,
12
13
  remainingSlot = 0,
14
+ data,
13
15
  }) => {
16
+ const lowSlot = data && remainingSlot < 1;
14
17
  return (
15
18
  <Upgrade
16
19
  className={`${
17
20
  planState === "GRACE PERIOD" ? "deactivated" : ""
18
- } more-slot`}
21
+ } more-slot `}
19
22
  >
20
- <div className="container">
23
+ <div className={`container ${lowSlot ? "red" : ""}`}>
21
24
  <img src={EnterpriseUpgrade} alt="upgrad box" />
22
25
  <span className="star star-1">
23
26
  <Staricon />
@@ -31,12 +34,22 @@ const UpgradeComponent = ({
31
34
  <span className="star star-4">
32
35
  <Staricon />
33
36
  </span>
34
- <div className="upgrade_text">
35
- <p>You are running out of slot?</p>
36
- </div>
37
- <p className="reminder">
38
- {remainingSlot} slots remaining out of {siotCount} slots
39
- </p>
37
+ {lowSlot && (
38
+ <div className="upgrade_text">
39
+ <p>You are running out of slot?</p>
40
+ </div>
41
+ )}
42
+ <SlotCount>
43
+ <li>
44
+ <p>Total slots:</p>
45
+ <span>{siotCount}</span>
46
+ </li>
47
+ <li>
48
+ <p>Used slots:</p>
49
+ <span>{remainingSlot}</span>
50
+ </li>
51
+ </SlotCount>
52
+
40
53
  <Button
41
54
  type="primary"
42
55
  text="Buy Slot"
@@ -57,4 +70,30 @@ const UpgradeComponent = ({
57
70
  );
58
71
  };
59
72
 
73
+ const SlotCount = styled.ul`
74
+ list-style: none;
75
+ width: 100%;
76
+ padding: 0 12px;
77
+ display: flex;
78
+ flex-direction: column;
79
+ gap: 5px;
80
+ li {
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: space-between;
84
+ span {
85
+ text-align: right;
86
+ font-size: 14px !important;
87
+ font-weight: 400 !important;
88
+ }
89
+ p {
90
+ padding: 0;
91
+ margin: 0;
92
+ text-align: left !important;
93
+ color: #636666 !important;
94
+ font-size: 14px !important;
95
+ font-weight: 400 !important;
96
+ }
97
+ }
98
+ `;
60
99
  export default UpgradeComponent;
@@ -201,6 +201,15 @@ export const Upgrade = styled.div`
201
201
  padding: 10px;
202
202
  margin-top: 20px;
203
203
 
204
+ &.more-slot {
205
+ height: 216px;
206
+ width: 100%;
207
+ display: flex;
208
+ flex-direction: column;
209
+ justify-content: flex-end;
210
+ align-items: flex-end;
211
+ }
212
+
204
213
  .container {
205
214
  /* background-color: #fff; */
206
215
  border-radius: 23.185px;
@@ -215,6 +224,15 @@ export const Upgrade = styled.div`
215
224
  align-items: center;
216
225
  margin-top: 20px;
217
226
  position: relative;
227
+ &.red {
228
+ background-color: #fff2f2;
229
+ .upgrade_text {
230
+ background: #f9545419;
231
+ p {
232
+ color: #f95454;
233
+ }
234
+ }
235
+ }
218
236
  .star {
219
237
  position: absolute;
220
238
  &.star-1 {
@@ -62,7 +62,7 @@ const ChatHeader = ({
62
62
  {chatRecipient?.is_online && <span className="online-dot"></span>}
63
63
  </div>
64
64
  <div className="user-details">
65
- <h5>{chatRecipient?.course || courseName}</h5>
65
+ <h5>{courseName || chatRecipient?.course}</h5>
66
66
  <div className="friend_cont">
67
67
  {/* <div className="friend-tag">
68
68
  <HiUser /> {userType}
@@ -32,7 +32,8 @@ const SideMenu = ({
32
32
  // const [isOpen, setIsOpen] = useState(false);
33
33
  const [gracePeriod, setGracePeriod] = useState(true);
34
34
 
35
- const { setGeneralData, generalData } = useContext(OutletContext);
35
+ const { setGeneralData, generalData, messageKit } = useContext(OutletContext);
36
+ const { state } = messageKit;
36
37
  const onToggle = () => {
37
38
  setIsOpen(!isOpen);
38
39
  window.localStorage.setItem("isOpen", !isOpen);
@@ -88,8 +89,11 @@ const SideMenu = ({
88
89
  const InstructorRight = <InstructorRightBar />;
89
90
 
90
91
  const renderNavigationItem = (route, index) => {
92
+ console.log(route, "route");
93
+ let notificationCount;
91
94
  const { icon, iconActive, text, notifications, path, affiliates, newTab } =
92
95
  route;
96
+
93
97
  const handlePathCheck = () => {
94
98
  let statusText;
95
99
  //console.log(window.location.pathname, "pathname");
@@ -268,6 +272,11 @@ const SideMenu = ({
268
272
  }
269
273
  };
270
274
  const active = handlePathCheck();
275
+ if (notifications && String(text).toLowerCase().includes("message")) {
276
+ notificationCount = state.roomsByCourses.reduce((acc, group) => {
277
+ return acc + group.total_unread_count;
278
+ }, 0);
279
+ }
271
280
 
272
281
  return (
273
282
  <NavigationItemContainer
@@ -280,16 +289,15 @@ const SideMenu = ({
280
289
  }}
281
290
  key={index}
282
291
  className={cx(`${route.text} ${active && "active"}`)}
283
- minimal={isOpen}
284
- >
292
+ minimal={isOpen}>
285
293
  <IconContainer active={active}>
286
294
  {active ? iconActive : icon}
287
295
  </IconContainer>
288
296
  <TextContainer minimal={isOpen}>{findText(text)}</TextContainer>
289
297
 
290
- {notifications && (
298
+ {!!notifications && (
291
299
  <NotificationCount minimal={isOpen}>
292
- <div className="text">{notifications}</div>
300
+ <div className="text">{notificationCount}</div>
293
301
  </NotificationCount>
294
302
  )}
295
303
  </NavigationItemContainer>
@@ -304,8 +312,7 @@ const SideMenu = ({
304
312
  generalData?.selectedAccount?.type?.toLowerCase() === "enterprise"
305
313
  ? "grace_period disabled"
306
314
  : ""
307
- }
308
- >
315
+ }>
309
316
  <UserCard user={user} isOpen={isOpen} findText={findText} />
310
317
 
311
318
  {!isPendingDelete && (
@@ -20,7 +20,6 @@ export const SideMenuContainer = styled.div`
20
20
 
21
21
  &.disabled {
22
22
  pointer-events: none;
23
-
24
23
  }
25
24
 
26
25
  .toggle {
@@ -99,10 +98,9 @@ export const NavigationItemContainer = styled.p`
99
98
  }
100
99
  }
101
100
 
102
-
103
- /* GRACE PERIOD AND DEACTIVATED */
104
- &.grace_period{
105
- background: var(--Neutral-40, #ADB2B2);
101
+ /* GRACE PERIOD AND DEACTIVATED */
102
+ &.grace_period {
103
+ background: var(--Neutral-40, #adb2b2);
106
104
  margin: 2px 0px;
107
105
  }
108
106
 
@@ -142,7 +140,7 @@ export const TextContainer = styled.div`
142
140
  `;
143
141
 
144
142
  export const NotificationCount = styled.div`
145
- background-color: #009999;
143
+ background-color: rgba(254, 191, 16, 0.7);
146
144
  color: #fff;
147
145
  font-size: 12px;
148
146
  font-weight: 500;
@@ -658,6 +658,69 @@ const useMessageKit = (/*affiliatesActive*/) => {
658
658
 
659
659
  // --- 2. Update State ---
660
660
  setState((prevState) => {
661
+ // --- Check if room exists before updating state ---
662
+ let roomExistsInState = false;
663
+ for (const courseGroup of prevState.roomsByCourses) {
664
+ if (courseGroup.rooms.some((room) => room.id === roomId)) {
665
+ roomExistsInState = true;
666
+ break;
667
+ }
668
+ }
669
+
670
+ // If room doesn't exist, fetch rooms and skip this state update
671
+ if (!roomExistsInState) {
672
+ console.log(
673
+ `Room ${roomId} not found in state after sending message, refetching room list.`
674
+ );
675
+ getMessageRoomsByCourses(null, true); // Fetch room list
676
+
677
+ // --- Update chats state even if room metadata isn't found yet ---
678
+ const chatHistoryForMissingRoom = prevState.chats[roomId] || [];
679
+ let updatedChatHistoryForMissingRoom = [...chatHistoryForMissingRoom];
680
+ const todayDateStringForMissing = "today"; // Assume API uses "today"
681
+
682
+ const todayGroupIndexForMissing =
683
+ updatedChatHistoryForMissingRoom.findIndex(
684
+ (group) => group.date === todayDateStringForMissing
685
+ );
686
+
687
+ if (todayGroupIndexForMissing !== -1) {
688
+ const todayGroup =
689
+ updatedChatHistoryForMissingRoom[todayGroupIndexForMissing];
690
+ if (
691
+ !todayGroup.messages.some((msg) => msg.id === newChatMessage.id)
692
+ ) {
693
+ const updatedTodayGroup = {
694
+ ...todayGroup,
695
+ messages: [...todayGroup.messages, newChatMessage],
696
+ };
697
+ updatedChatHistoryForMissingRoom.splice(
698
+ todayGroupIndexForMissing,
699
+ 1,
700
+ updatedTodayGroup
701
+ );
702
+ }
703
+ } else {
704
+ const newTodayGroup = {
705
+ date: todayDateStringForMissing,
706
+ messages: [newChatMessage],
707
+ };
708
+ updatedChatHistoryForMissingRoom = [
709
+ newTodayGroup,
710
+ ...updatedChatHistoryForMissingRoom,
711
+ ];
712
+ }
713
+
714
+ const updatedChatsOnly = {
715
+ ...prevState.chats,
716
+ [roomId]: updatedChatHistoryForMissingRoom,
717
+ };
718
+
719
+ // Return state with only chats updated, roomsByCourses will update after fetch
720
+ return { ...prevState, chats: updatedChatsOnly };
721
+ }
722
+
723
+ // --- Room exists, proceed with updates for both chats and roomsByCourses ---
661
724
  // --- 2a. Update chats state ---
662
725
  const currentChatHistory = prevState.chats[roomId] || [];
663
726
  let updatedChatHistory = [...currentChatHistory];