l-min-components 1.7.1508 → 1.7.1510
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/AppMainLayout/index.jsx +43 -200
- package/src/components/deactivated/index.jsx +22 -20
- package/src/components/deactivated/modal/subscription-expired-modal.jsx +0 -4
- package/src/components/errorPage/index.jsx +2 -2
- package/src/components/getErrorFeatures/errorWrapper.jsx +21 -6
- package/src/components/header/account-dropdown.jsx +13 -4
- package/src/components/header/index.jsx +4 -2
- package/src/components/instructorAccountSwitcher/components/renew modal/index.jsx +2 -2
- package/src/components/instructorAccountSwitcher/index.jsx +8 -5
- package/src/hooks/adminSideMenuItems.jsx +10 -7
package/package.json
CHANGED
|
@@ -170,10 +170,10 @@ const AppMainLayout = ({ children }) => {
|
|
|
170
170
|
user,
|
|
171
171
|
userDetails,
|
|
172
172
|
handleGetFileStorageSummary,
|
|
173
|
-
getFileStorageSummaryData,
|
|
173
|
+
// getFileStorageSummaryData,
|
|
174
174
|
} = useHeader({ default: true });
|
|
175
175
|
|
|
176
|
-
//
|
|
176
|
+
// Get current default account and store in cookie (from api);
|
|
177
177
|
useEffect(() => {
|
|
178
178
|
if (getDefaultAccount?.data) {
|
|
179
179
|
const date = new Date();
|
|
@@ -197,6 +197,16 @@ const AppMainLayout = ({ children }) => {
|
|
|
197
197
|
|
|
198
198
|
localStorage.setItem("defaultLang", getDefaultAccount?.data?.language);
|
|
199
199
|
|
|
200
|
+
const { registration_step } = getDefaultAccount?.data;
|
|
201
|
+
// If registration step is "REGISTRATION_COMPLETED" - go to acct type selection page
|
|
202
|
+
if (registration_step === "REGISTRATION_COMPLETED") {
|
|
203
|
+
window.location.href = "/auth/account-type";
|
|
204
|
+
}
|
|
205
|
+
// If registration step is "REGISTRATION_PARTIALLY_COMPLETED" go to /register where the user can provide the missing fields.
|
|
206
|
+
else if (registration_step === "REGISTRATION_PARTIALLY_COMPLETED") {
|
|
207
|
+
window.location.href = "/auth/register";
|
|
208
|
+
}
|
|
209
|
+
|
|
200
210
|
// set default acct when you receive the default acct data
|
|
201
211
|
handleSetDefaultAccount(getDefaultAccount?.data?.id);
|
|
202
212
|
|
|
@@ -237,7 +247,6 @@ const AppMainLayout = ({ children }) => {
|
|
|
237
247
|
// Use setTimeout to ensure navigation happens after React Router is ready
|
|
238
248
|
setTimeout(() => {
|
|
239
249
|
const targetUrl = `/${defaultAccountType}`;
|
|
240
|
-
console.log(`Navigating to: ${targetUrl}`);
|
|
241
250
|
|
|
242
251
|
// Try using window.location.replace for staging compatibility
|
|
243
252
|
if (window.location.hostname.includes("staging")) {
|
|
@@ -245,7 +254,7 @@ const AppMainLayout = ({ children }) => {
|
|
|
245
254
|
} else {
|
|
246
255
|
window.location.href = targetUrl;
|
|
247
256
|
}
|
|
248
|
-
},
|
|
257
|
+
}, 1000);
|
|
249
258
|
}
|
|
250
259
|
}
|
|
251
260
|
}
|
|
@@ -311,16 +320,6 @@ const AppMainLayout = ({ children }) => {
|
|
|
311
320
|
handleGetDefaultAccount();
|
|
312
321
|
}, [defaultAcct]);
|
|
313
322
|
|
|
314
|
-
// Debug the API response
|
|
315
|
-
useEffect(() => {
|
|
316
|
-
console.log("getDefaultAccount state changed:", {
|
|
317
|
-
data: getDefaultAccount?.data,
|
|
318
|
-
loading: getDefaultAccount?.loading,
|
|
319
|
-
error: getDefaultAccount?.error,
|
|
320
|
-
response: getDefaultAccount?.response,
|
|
321
|
-
});
|
|
322
|
-
}, [getDefaultAccount]);
|
|
323
|
-
|
|
324
323
|
// setting current environment type
|
|
325
324
|
useEffect(() => {
|
|
326
325
|
if (window.location.hostname.includes("staging")) {
|
|
@@ -384,12 +383,12 @@ const AppMainLayout = ({ children }) => {
|
|
|
384
383
|
"Build the future with Learngual!",
|
|
385
384
|
"Choose our custom plans for more calls and better flexibility.",
|
|
386
385
|
"We know it's inconvenient. For better user accessibility, login with a desktop device.",
|
|
387
|
-
|
|
386
|
+
|
|
387
|
+
// Additional text from codebase analysis - ONLY actual strings found
|
|
388
388
|
"Student",
|
|
389
389
|
"Instructor account",
|
|
390
390
|
"Enterprise account",
|
|
391
391
|
"Student account",
|
|
392
|
-
"Personal Account",
|
|
393
392
|
"Dashboard",
|
|
394
393
|
"Courses",
|
|
395
394
|
"My courses",
|
|
@@ -406,188 +405,28 @@ const AppMainLayout = ({ children }) => {
|
|
|
406
405
|
"Demo",
|
|
407
406
|
"Explore",
|
|
408
407
|
"Connect",
|
|
409
|
-
"
|
|
408
|
+
"Select affiliate",
|
|
409
|
+
"Search affiliates",
|
|
410
|
+
"Affiliates",
|
|
411
|
+
"GRACE PERIOD",
|
|
412
|
+
"ACTIVE",
|
|
413
|
+
"Oops!",
|
|
414
|
+
"Select plans",
|
|
415
|
+
"Renew subscription",
|
|
416
|
+
"Instructor",
|
|
417
|
+
"Learngual logo",
|
|
410
418
|
"profile",
|
|
411
419
|
"account photo",
|
|
412
|
-
"
|
|
413
|
-
"
|
|
414
|
-
"Pending",
|
|
415
|
-
"Loading",
|
|
416
|
-
"Error",
|
|
417
|
-
"Success",
|
|
418
|
-
"Warning",
|
|
419
|
-
"Info",
|
|
420
|
-
"Confirm",
|
|
421
|
-
"Yes",
|
|
422
|
-
"No",
|
|
423
|
-
"OK",
|
|
424
|
-
"Cancel",
|
|
425
|
-
"Continue",
|
|
426
|
-
"Back",
|
|
427
|
-
"Next",
|
|
428
|
-
"Submit",
|
|
429
|
-
"Close",
|
|
430
|
-
"Open",
|
|
431
|
-
"View",
|
|
432
|
-
"Edit",
|
|
433
|
-
"Delete",
|
|
434
|
-
"Save",
|
|
435
|
-
"Create",
|
|
436
|
-
"Update",
|
|
437
|
-
"Name",
|
|
438
|
-
"Email",
|
|
439
|
-
"Password",
|
|
440
|
-
"Username",
|
|
441
|
-
"Login",
|
|
442
|
-
"Logout",
|
|
443
|
-
"Register",
|
|
444
|
-
"Signup",
|
|
445
|
-
"Signin",
|
|
446
|
-
"User",
|
|
447
|
-
"Admin",
|
|
448
|
-
"Account",
|
|
449
|
-
"Profile",
|
|
450
|
-
"Preferences",
|
|
451
|
-
"Configuration",
|
|
452
|
-
"Options",
|
|
453
|
-
"Language",
|
|
454
|
-
"Translation",
|
|
420
|
+
"Select Plans",
|
|
421
|
+
"Search by Name / Email / Username",
|
|
455
422
|
"Text",
|
|
456
|
-
"
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
"
|
|
462
|
-
"
|
|
463
|
-
"Move",
|
|
464
|
-
"Rename",
|
|
465
|
-
"Filter",
|
|
466
|
-
"Sort",
|
|
467
|
-
"Search",
|
|
468
|
-
"Results",
|
|
469
|
-
"Total",
|
|
470
|
-
"Count",
|
|
471
|
-
"Date",
|
|
472
|
-
"Time",
|
|
473
|
-
"Status",
|
|
474
|
-
"Type",
|
|
475
|
-
"Category",
|
|
476
|
-
"Priority",
|
|
477
|
-
"Level",
|
|
478
|
-
"Progress",
|
|
479
|
-
"Score",
|
|
480
|
-
"Grade",
|
|
481
|
-
"Free",
|
|
482
|
-
"Premium",
|
|
483
|
-
"Basic",
|
|
484
|
-
"Advanced",
|
|
485
|
-
"Pro",
|
|
486
|
-
"Enterprise",
|
|
487
|
-
"Personal",
|
|
488
|
-
"Public",
|
|
489
|
-
"Private",
|
|
490
|
-
"Online",
|
|
491
|
-
"Offline",
|
|
492
|
-
"Available",
|
|
493
|
-
"Unavailable",
|
|
494
|
-
"Enabled",
|
|
495
|
-
"Disabled",
|
|
496
|
-
"Required",
|
|
497
|
-
"Optional",
|
|
498
|
-
"Popular",
|
|
499
|
-
"Featured",
|
|
500
|
-
"Latest",
|
|
501
|
-
"Recent",
|
|
502
|
-
"New",
|
|
503
|
-
"Updated",
|
|
504
|
-
"Completed",
|
|
505
|
-
"In Progress",
|
|
506
|
-
"Approved",
|
|
507
|
-
"Rejected",
|
|
508
|
-
"Cancelled",
|
|
509
|
-
"Scheduled",
|
|
510
|
-
"Valid",
|
|
511
|
-
"Invalid",
|
|
512
|
-
"Correct",
|
|
513
|
-
"Incorrect",
|
|
514
|
-
"Start",
|
|
515
|
-
"Stop",
|
|
516
|
-
"Play",
|
|
517
|
-
"Pause",
|
|
518
|
-
"Resume",
|
|
519
|
-
"Record",
|
|
520
|
-
"Volume",
|
|
521
|
-
"Speed",
|
|
522
|
-
"Quality",
|
|
523
|
-
"Size",
|
|
524
|
-
"Format",
|
|
525
|
-
"Original",
|
|
526
|
-
"Source",
|
|
527
|
-
"Target",
|
|
528
|
-
"Input",
|
|
529
|
-
"Output",
|
|
530
|
-
"Audio",
|
|
531
|
-
"Video",
|
|
532
|
-
"Image",
|
|
533
|
-
"Button",
|
|
534
|
-
"Menu",
|
|
535
|
-
"Page",
|
|
536
|
-
"Section",
|
|
537
|
-
"Header",
|
|
538
|
-
"Footer",
|
|
539
|
-
"Content",
|
|
540
|
-
"Navigation",
|
|
541
|
-
"List",
|
|
542
|
-
"Table",
|
|
543
|
-
"Row",
|
|
544
|
-
"Column",
|
|
545
|
-
"Field",
|
|
546
|
-
"Value",
|
|
547
|
-
"Option",
|
|
548
|
-
"Selection",
|
|
549
|
-
"Modal",
|
|
550
|
-
"Dialog",
|
|
551
|
-
"Alert",
|
|
552
|
-
"Notification",
|
|
553
|
-
"Message",
|
|
554
|
-
"Card",
|
|
555
|
-
"Item",
|
|
556
|
-
"Entry",
|
|
557
|
-
"Record",
|
|
558
|
-
"Data",
|
|
559
|
-
"Information",
|
|
560
|
-
"Details",
|
|
561
|
-
"Summary",
|
|
562
|
-
"Overview",
|
|
563
|
-
"Preview",
|
|
564
|
-
"Icon",
|
|
565
|
-
"Avatar",
|
|
566
|
-
"Theme",
|
|
567
|
-
"Style",
|
|
568
|
-
"Color",
|
|
569
|
-
"Font",
|
|
570
|
-
"Mobile",
|
|
571
|
-
"Desktop",
|
|
572
|
-
"Tablet",
|
|
573
|
-
"Device",
|
|
574
|
-
"Browser",
|
|
575
|
-
"Application",
|
|
576
|
-
"System",
|
|
577
|
-
"Network",
|
|
578
|
-
"Internet",
|
|
579
|
-
"Connection",
|
|
580
|
-
"Server",
|
|
581
|
-
"Database",
|
|
582
|
-
"Storage",
|
|
583
|
-
"Session",
|
|
584
|
-
"Token",
|
|
585
|
-
"Key",
|
|
586
|
-
"Permission",
|
|
587
|
-
"Role",
|
|
588
|
-
"Member",
|
|
589
|
-
"Customer",
|
|
590
|
-
"Visitor",
|
|
423
|
+
"add",
|
|
424
|
+
"Ready",
|
|
425
|
+
"play",
|
|
426
|
+
|
|
427
|
+
// expired instructor
|
|
428
|
+
"You haven’t been added to an enterprise account yet",
|
|
429
|
+
"This account will be active once an enterprise assigns you as an instructor.",
|
|
591
430
|
];
|
|
592
431
|
|
|
593
432
|
const {
|
|
@@ -782,6 +621,7 @@ const AppMainLayout = ({ children }) => {
|
|
|
782
621
|
onChange={(v) => setAffiliateAccount(v)}
|
|
783
622
|
setSearch={setAffilitateSearch}
|
|
784
623
|
defaultAffiliate={getDefaultAffiliateData?.data}
|
|
624
|
+
findText={findText}
|
|
785
625
|
/>
|
|
786
626
|
</>
|
|
787
627
|
)}
|
|
@@ -812,6 +652,7 @@ const AppMainLayout = ({ children }) => {
|
|
|
812
652
|
gracePeriod={gracePeriod}
|
|
813
653
|
stateType={planState === "GRACE PERIOD" ? 1 : 2}
|
|
814
654
|
planState={planState}
|
|
655
|
+
findText={findText}
|
|
815
656
|
/>
|
|
816
657
|
) : activeAccountType === "instructor" &&
|
|
817
658
|
!userPlanData?.loading &&
|
|
@@ -824,17 +665,19 @@ const AppMainLayout = ({ children }) => {
|
|
|
824
665
|
!getAllAffiliateData?.loading &&
|
|
825
666
|
!window.location.pathname.includes("notif") ? (
|
|
826
667
|
<div className="instructor_expired">
|
|
827
|
-
<h1>Dashboard</h1>
|
|
668
|
+
<h1>{findText("Dashboard")}</h1>
|
|
828
669
|
<div className="instructor_expired_body">
|
|
829
670
|
<div className="instructor_expired_center">
|
|
830
671
|
<img src={instructorImage} alt="" />
|
|
831
672
|
<h4>
|
|
832
|
-
|
|
833
|
-
|
|
673
|
+
{findText(
|
|
674
|
+
"You haven’t been added to an enterprise account yet"
|
|
675
|
+
)}
|
|
834
676
|
</h4>
|
|
835
677
|
<p>
|
|
836
|
-
|
|
837
|
-
|
|
678
|
+
{findText(
|
|
679
|
+
"This account will be active once an enterprise assigns you as an instructor."
|
|
680
|
+
)}
|
|
838
681
|
</p>
|
|
839
682
|
</div>
|
|
840
683
|
</div>
|
|
@@ -22,6 +22,7 @@ const GracePeriod = ({
|
|
|
22
22
|
handleCurrentSubscription,
|
|
23
23
|
gracePeriod,
|
|
24
24
|
stateType,
|
|
25
|
+
findText,
|
|
25
26
|
}) => {
|
|
26
27
|
console.log("🚀 ~ gracePeriod:", gracePeriod);
|
|
27
28
|
const location = useLocation();
|
|
@@ -80,7 +81,7 @@ const GracePeriod = ({
|
|
|
80
81
|
|
|
81
82
|
return (
|
|
82
83
|
<GracePeriodWrapper>
|
|
83
|
-
<h1>{pageTitle}</h1>
|
|
84
|
+
<h1>{findText(pageTitle)}</h1>
|
|
84
85
|
{stateType === 1 ? (
|
|
85
86
|
<div
|
|
86
87
|
className="grace_period_body"
|
|
@@ -94,26 +95,26 @@ const GracePeriod = ({
|
|
|
94
95
|
}}
|
|
95
96
|
>
|
|
96
97
|
<img src={warning} alt="" />
|
|
97
|
-
<h2>Your subscription to Learngual has expired</h2>
|
|
98
|
-
<p
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
<h2>{findText("Your subscription to Learngual has expired")}</h2>
|
|
99
|
+
<p
|
|
100
|
+
dangerouslySetInnerHTML={{
|
|
101
|
+
__html: findText(
|
|
102
|
+
"Your students and instructors will no longer {br1} be able to access your courses after {br2} {span}",
|
|
103
|
+
{
|
|
104
|
+
br1: `<br>`,
|
|
105
|
+
br2: `<br>`,
|
|
106
|
+
span: `<span style="fontWeight: 700; color: red;">${timeLeft}</span>`,
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
}}
|
|
110
|
+
></p>
|
|
110
111
|
<div
|
|
111
112
|
onClick={() => {
|
|
112
113
|
window.location.href = "/settings/payment";
|
|
113
114
|
}}
|
|
114
115
|
>
|
|
115
116
|
<Button
|
|
116
|
-
text="Renew subscription"
|
|
117
|
+
text={findText("Renew subscription")}
|
|
117
118
|
styles={{
|
|
118
119
|
height: "35px",
|
|
119
120
|
padding: "4px 20px",
|
|
@@ -125,10 +126,11 @@ const GracePeriod = ({
|
|
|
125
126
|
) : (
|
|
126
127
|
<>
|
|
127
128
|
<Expire>
|
|
128
|
-
<h4>Your subscription has expired</h4>
|
|
129
|
+
<h4>{findText("Your subscription has expired")}</h4>
|
|
129
130
|
<h5>
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
{findText(
|
|
132
|
+
"You don’t have an active plan, renew your subscription to gain full access to your account."
|
|
133
|
+
)}
|
|
132
134
|
</h5>
|
|
133
135
|
|
|
134
136
|
<div
|
|
@@ -137,7 +139,7 @@ const GracePeriod = ({
|
|
|
137
139
|
}}
|
|
138
140
|
>
|
|
139
141
|
<Button
|
|
140
|
-
text="Choose plan"
|
|
142
|
+
text={findText("Choose plan")}
|
|
141
143
|
styles={{
|
|
142
144
|
height: "35px",
|
|
143
145
|
padding: "4px 20px",
|
|
@@ -155,7 +157,7 @@ const GracePeriod = ({
|
|
|
155
157
|
}}
|
|
156
158
|
/>
|
|
157
159
|
<div className="content">
|
|
158
|
-
<p>Sorry, you can’t access your account</p>
|
|
160
|
+
<p>{findText("Sorry, you can’t access your account")}</p>
|
|
159
161
|
</div>
|
|
160
162
|
</div>
|
|
161
163
|
</>
|
|
@@ -75,10 +75,6 @@ const SubscriptionExpiredModal = ({
|
|
|
75
75
|
// };
|
|
76
76
|
// }, []);
|
|
77
77
|
|
|
78
|
-
const noSubError = () => {
|
|
79
|
-
toast.error("Error getting your subscription, please try again!");
|
|
80
|
-
};
|
|
81
|
-
|
|
82
78
|
const subId = getCurrentSubscriptionData?.data?.id;
|
|
83
79
|
|
|
84
80
|
const handleNavigateRenewal = () => {
|
|
@@ -22,8 +22,8 @@ const Index = () => {
|
|
|
22
22
|
<h3>Opss...</h3>
|
|
23
23
|
<h2>Page not found</h2>
|
|
24
24
|
<p>
|
|
25
|
-
Seems we can't find the page your looking for. Let's
|
|
26
|
-
|
|
25
|
+
Seems we can't find the page your looking for. Let's get you back
|
|
26
|
+
home.
|
|
27
27
|
</p>
|
|
28
28
|
<ButtonComponent
|
|
29
29
|
text="Go Back"
|
|
@@ -3,9 +3,10 @@ import styled from "styled-components";
|
|
|
3
3
|
|
|
4
4
|
import logo from "../../assets/images/logo.png";
|
|
5
5
|
import bg from "./images/bg-404.png";
|
|
6
|
-
import redirectURL from "../../utils/redirectURL";
|
|
7
6
|
import useCustomNavigate from "../../hooks/useCustomNavigate";
|
|
8
7
|
import getCookie from "../../utils/getCookie";
|
|
8
|
+
import useTranslation from "../../hooks/useTranslation";
|
|
9
|
+
import FullPageLoader from "../fullPageLoader";
|
|
9
10
|
|
|
10
11
|
const ErrorWrapper = ({
|
|
11
12
|
title = "Oops!",
|
|
@@ -31,7 +32,21 @@ const ErrorWrapper = ({
|
|
|
31
32
|
navigate(fallbackPath || "/", { reload: true });
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
|
|
36
|
+
const wordBank = [
|
|
37
|
+
"Opss...",
|
|
38
|
+
"Page not found",
|
|
39
|
+
"Seems we can't find the page your looking for. Let's get you back home.",
|
|
40
|
+
"Go Back",
|
|
41
|
+
"There was an error",
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const { findText, translations, isTranslationsLoading } =
|
|
45
|
+
useTranslation(wordBank);
|
|
46
|
+
|
|
47
|
+
return isTranslationsLoading && Object.keys(translations)?.length === 0 ? (
|
|
48
|
+
<FullPageLoader hasBackground fixed={true} />
|
|
49
|
+
) : (
|
|
35
50
|
<Container>
|
|
36
51
|
<Navbar>
|
|
37
52
|
<a href="/">
|
|
@@ -40,13 +55,13 @@ const ErrorWrapper = ({
|
|
|
40
55
|
</Navbar>
|
|
41
56
|
<Content>
|
|
42
57
|
<LeftDiv>
|
|
43
|
-
<h1>{title}</h1>
|
|
58
|
+
<h1>{findText(title)}</h1>
|
|
44
59
|
<div>
|
|
45
|
-
{subTitle && <h2>{subTitle}</h2>}
|
|
46
|
-
{message && <p>{message}</p>}
|
|
60
|
+
{subTitle && <h2>{findText(subTitle)}</h2>}
|
|
61
|
+
{message && <p>{findText(message)}</p>}
|
|
47
62
|
</div>
|
|
48
63
|
|
|
49
|
-
<button onClick={handleNav}>{btnText}</button>
|
|
64
|
+
<button onClick={handleNav}>{findText(btnText)}</button>
|
|
50
65
|
</LeftDiv>
|
|
51
66
|
<ImageBox>
|
|
52
67
|
<img src={bgSrc || bg} alt="" />
|
|
@@ -183,7 +183,9 @@ const AccountDropdown = (props) => {
|
|
|
183
183
|
<>
|
|
184
184
|
{props?.instructorAccountData?.length > 0 && (
|
|
185
185
|
<div>
|
|
186
|
-
<h3 style={{ marginBottom: 10 }}>
|
|
186
|
+
<h3 style={{ marginBottom: 10 }}>
|
|
187
|
+
{props.findText("Instructor account")}
|
|
188
|
+
</h3>
|
|
187
189
|
{props?.instructorAccountData?.map((instructorItem, idx) => {
|
|
188
190
|
console.log("account>>", instructorItem);
|
|
189
191
|
return (
|
|
@@ -233,7 +235,9 @@ const AccountDropdown = (props) => {
|
|
|
233
235
|
)}
|
|
234
236
|
{props?.enterpriseAccountData?.length > 0 && (
|
|
235
237
|
<div>
|
|
236
|
-
<h3 style={{ marginBottom: 10 }}>
|
|
238
|
+
<h3 style={{ marginBottom: 10 }}>
|
|
239
|
+
{props?.findText("Enterprise account")}
|
|
240
|
+
</h3>
|
|
237
241
|
{props?.enterpriseAccountData?.map((enterpriseItem, idx) => (
|
|
238
242
|
<div
|
|
239
243
|
className={`account-info ${
|
|
@@ -279,7 +283,9 @@ const AccountDropdown = (props) => {
|
|
|
279
283
|
// dont show personal accounts for developer user
|
|
280
284
|
props?.personalAccountData?.length > 0 && (
|
|
281
285
|
<div>
|
|
282
|
-
<h3 style={{ marginBottom: 10 }}>
|
|
286
|
+
<h3 style={{ marginBottom: 10 }}>
|
|
287
|
+
{props?.findText("Student account")}
|
|
288
|
+
</h3>
|
|
283
289
|
{props?.personalAccountData?.map((personalItem, idx) => (
|
|
284
290
|
<div
|
|
285
291
|
className={`account-info ${
|
|
@@ -329,7 +335,10 @@ const AccountDropdown = (props) => {
|
|
|
329
335
|
<AccountDropdownFooter>
|
|
330
336
|
<button
|
|
331
337
|
onClick={() => {
|
|
332
|
-
window.location.
|
|
338
|
+
window.location.hostname?.includes("coming")
|
|
339
|
+
? (window.location.href =
|
|
340
|
+
"https://learngual.com/auth/account-type")
|
|
341
|
+
: (window.location.href = "/auth/account-type");
|
|
333
342
|
}}
|
|
334
343
|
style={{ cursor: "pointer" }}
|
|
335
344
|
>
|
|
@@ -552,8 +552,10 @@ const HeaderComponent = (props) => {
|
|
|
552
552
|
<h5 style={{ textTransform: "capitalize" }}>{accountName}</h5>
|
|
553
553
|
<h6 style={{ textTransform: "capitalize" }}>
|
|
554
554
|
{props?.selectedAccount?.type?.toLowerCase() === "personal"
|
|
555
|
-
? "Student"
|
|
556
|
-
: props?.
|
|
555
|
+
? props?.findText("Student")
|
|
556
|
+
: props?.findText(
|
|
557
|
+
props?.selectedAccount?.type?.toLowerCase()
|
|
558
|
+
)}
|
|
557
559
|
</h6>
|
|
558
560
|
</div>
|
|
559
561
|
<ArrowDownIcon width={16} height={10} />
|
|
@@ -33,11 +33,11 @@ const RenewModal = ({
|
|
|
33
33
|
<BtnGroup>
|
|
34
34
|
<Button
|
|
35
35
|
type="secondary"
|
|
36
|
-
text={btn1Text || "Select
|
|
36
|
+
text={btn1Text || "Select plans"}
|
|
37
37
|
onClick={btn1onClick}
|
|
38
38
|
/>
|
|
39
39
|
<Button
|
|
40
|
-
text={btn2Text || "Renew
|
|
40
|
+
text={btn2Text || "Renew subscription"}
|
|
41
41
|
onClick={btn2onClick}
|
|
42
42
|
/>
|
|
43
43
|
</BtnGroup>
|
|
@@ -17,6 +17,7 @@ const InstructorAccountSwitcher = ({
|
|
|
17
17
|
affiliateList,
|
|
18
18
|
setSearch,
|
|
19
19
|
defaultAffiliate,
|
|
20
|
+
findText,
|
|
20
21
|
}) => {
|
|
21
22
|
// const [expiryFlow, setExpiryFlow] = useState();
|
|
22
23
|
const [switchValue, setSwitchValue] = useState("affiliates");
|
|
@@ -169,7 +170,7 @@ const InstructorAccountSwitcher = ({
|
|
|
169
170
|
className="placeholder"
|
|
170
171
|
onClick={() => setDropdown(!dropdown)}
|
|
171
172
|
>
|
|
172
|
-
<p>Select affiliate</p>
|
|
173
|
+
<p>{findText("Select affiliate")}</p>
|
|
173
174
|
<ArrowDown />
|
|
174
175
|
</div>
|
|
175
176
|
) : (
|
|
@@ -189,7 +190,7 @@ const InstructorAccountSwitcher = ({
|
|
|
189
190
|
<AffiliatesDropDownWrapper>
|
|
190
191
|
<div className="search_wrapper">
|
|
191
192
|
<Search
|
|
192
|
-
placeholder="Search
|
|
193
|
+
placeholder={findText("Search affiliates")}
|
|
193
194
|
onSubmit={setSearch}
|
|
194
195
|
/>
|
|
195
196
|
</div>
|
|
@@ -205,7 +206,9 @@ const InstructorAccountSwitcher = ({
|
|
|
205
206
|
<img src={item?.image} alt="" />
|
|
206
207
|
<p>{item?.name}</p>
|
|
207
208
|
</div>
|
|
208
|
-
{item.count ?
|
|
209
|
+
{item.count ? (
|
|
210
|
+
<span>{findText(item.count)}</span>
|
|
211
|
+
) : null}
|
|
209
212
|
</li>
|
|
210
213
|
))}
|
|
211
214
|
</ul>
|
|
@@ -222,7 +225,7 @@ const InstructorAccountSwitcher = ({
|
|
|
222
225
|
className={switchValue !== "affiliates" ? "active" : ""}
|
|
223
226
|
onClick={() => handleSwitch(1)}
|
|
224
227
|
>
|
|
225
|
-
<span>Personal</span>
|
|
228
|
+
<span>{findText("Personal")}</span>
|
|
226
229
|
<span className="circle"></span>
|
|
227
230
|
</button>
|
|
228
231
|
)}
|
|
@@ -230,7 +233,7 @@ const InstructorAccountSwitcher = ({
|
|
|
230
233
|
className={switchValue === "affiliates" ? "active" : ""}
|
|
231
234
|
onClick={() => handleSwitch(2)}
|
|
232
235
|
>
|
|
233
|
-
<span>Affiliates</span>
|
|
236
|
+
<span>{findText("Affiliates")}</span>
|
|
234
237
|
<span className="circle"></span>
|
|
235
238
|
</button>
|
|
236
239
|
</div>
|
|
@@ -23,7 +23,10 @@ import {
|
|
|
23
23
|
AccountsIconActive,
|
|
24
24
|
} from "../assets/adminSvg/accountsIcon";
|
|
25
25
|
import { ManagersIcon, ManagersIconActive } from "../assets/adminSvg/managers";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
RequestsIcon,
|
|
28
|
+
RequestsIconActive,
|
|
29
|
+
} from "../assets/adminSvg/requestsIcon";
|
|
27
30
|
|
|
28
31
|
export const adminSideMenuOptions = [
|
|
29
32
|
{
|
|
@@ -139,25 +142,25 @@ export const adminSideMenuOptions = [
|
|
|
139
142
|
path: "/personal-account",
|
|
140
143
|
hasNotification: false,
|
|
141
144
|
notifications: null,
|
|
142
|
-
text: "Personal
|
|
145
|
+
text: "Personal account",
|
|
143
146
|
},
|
|
144
147
|
{
|
|
145
148
|
path: "/instructor-account",
|
|
146
149
|
hasNotification: false,
|
|
147
150
|
notifications: null,
|
|
148
|
-
text: "Instructor
|
|
151
|
+
text: "Instructor account",
|
|
149
152
|
},
|
|
150
153
|
{
|
|
151
154
|
path: "/enterprise-account",
|
|
152
155
|
hasNotification: false,
|
|
153
156
|
notifications: null,
|
|
154
|
-
text: "Enterprise
|
|
157
|
+
text: "Enterprise account",
|
|
155
158
|
},
|
|
156
159
|
{
|
|
157
160
|
path: "/developer-account",
|
|
158
161
|
hasNotification: false,
|
|
159
162
|
notifications: null,
|
|
160
|
-
text: "Developer
|
|
163
|
+
text: "Developer account",
|
|
161
164
|
},
|
|
162
165
|
],
|
|
163
166
|
},
|
|
@@ -220,7 +223,7 @@ export const adminSideMenuOptions = [
|
|
|
220
223
|
path: "/all-users",
|
|
221
224
|
icon: <UsersIcon />,
|
|
222
225
|
iconActive: <UsersIconActive />,
|
|
223
|
-
text: "All
|
|
226
|
+
text: "All users",
|
|
224
227
|
hasNotification: false,
|
|
225
228
|
hasDropdown: false,
|
|
226
229
|
notifications: null,
|
|
@@ -229,7 +232,7 @@ export const adminSideMenuOptions = [
|
|
|
229
232
|
],
|
|
230
233
|
},
|
|
231
234
|
{
|
|
232
|
-
optionType: "Dev.
|
|
235
|
+
optionType: "Dev. management",
|
|
233
236
|
routes: [
|
|
234
237
|
{
|
|
235
238
|
path: "/accounts",
|