mario-teacher-student-client 1.7.8 → 1.7.9
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/dist/index.css +4 -1
- package/dist/index.js +154 -66
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +154 -66
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/MainLayout.d.ts +1 -1
- package/dist/services/MyProfile.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -4733,7 +4733,8 @@ h2._1KpSK {
|
|
|
4733
4733
|
._r-HQr ._bWHlA {
|
|
4734
4734
|
margin: 10px 0 10px 0;
|
|
4735
4735
|
word-wrap: break-word;
|
|
4736
|
-
width: 100%;
|
|
4736
|
+
width: 100%;
|
|
4737
|
+
overflow: hidden; }
|
|
4737
4738
|
._r-HQr ._bWHlA ._2O323 {
|
|
4738
4739
|
color: black;
|
|
4739
4740
|
font-weight: 400; }
|
|
@@ -4742,6 +4743,8 @@ h2._1KpSK {
|
|
|
4742
4743
|
font-weight: 600; }
|
|
4743
4744
|
._r-HQr ._bWHlA ._15UDz ._a8fEp {
|
|
4744
4745
|
word-wrap: break-word; }
|
|
4746
|
+
._r-HQr ._bWHlA > div {
|
|
4747
|
+
overflow: hidden; }
|
|
4745
4748
|
._r-HQr ._j6FQq {
|
|
4746
4749
|
margin: 10px 0 10px 0;
|
|
4747
4750
|
width: 100%;
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,6 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var React__default = _interopDefault(React);
|
|
5
|
-
var reactRouterDom = require('react-router-dom');
|
|
6
5
|
var reactRedux = require('react-redux');
|
|
7
6
|
var marioCore = require('mario-core');
|
|
8
7
|
var styles$b = require('@material-ui/core/styles');
|
|
@@ -19,6 +18,7 @@ var GroupIcon = _interopDefault(require('@material-ui/icons/Group'));
|
|
|
19
18
|
var SettingsIcon = _interopDefault(require('@material-ui/icons/Settings'));
|
|
20
19
|
var StudentsIcon = _interopDefault(require('@material-ui/icons/Wc'));
|
|
21
20
|
var SchoolIcon = _interopDefault(require('@material-ui/icons/School'));
|
|
21
|
+
var reactRouterDom = require('react-router-dom');
|
|
22
22
|
var Pusher = _interopDefault(require('pusher-js/with-encryption'));
|
|
23
23
|
var dateFns = require('date-fns');
|
|
24
24
|
var moment = _interopDefault(require('moment'));
|
|
@@ -70,6 +70,11 @@ require('react-datepicker/dist/react-datepicker.css');
|
|
|
70
70
|
var DatePicker = _interopDefault(require('react-datepicker'));
|
|
71
71
|
var jsPDF = _interopDefault(require('jspdf'));
|
|
72
72
|
var SaveIcon = _interopDefault(require('@material-ui/icons/Save'));
|
|
73
|
+
var FormControl = _interopDefault(require('@material-ui/core/FormControl'));
|
|
74
|
+
var InputAdornment = _interopDefault(require('@material-ui/core/InputAdornment'));
|
|
75
|
+
var Visibility = _interopDefault(require('@material-ui/icons/Visibility'));
|
|
76
|
+
var VisibilityOff = _interopDefault(require('@material-ui/icons/VisibilityOff'));
|
|
77
|
+
var OutlinedInput = _interopDefault(require('@material-ui/core/OutlinedInput'));
|
|
73
78
|
var Button = _interopDefault(require('@material-ui/core/Button'));
|
|
74
79
|
|
|
75
80
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
@@ -494,12 +499,16 @@ var useStyles = styles$b.makeStyles(function (theme) {
|
|
|
494
499
|
var MainLayout = function MainLayout(_ref) {
|
|
495
500
|
var routes = _ref.routes,
|
|
496
501
|
navigation = _ref.navigation;
|
|
497
|
-
var history = reactRouterDom.useHistory();
|
|
498
502
|
var dispatch = reactRedux.useDispatch();
|
|
499
503
|
var user = reactRedux.useSelector(function (state) {
|
|
500
504
|
return state.common.user;
|
|
501
505
|
});
|
|
502
506
|
var isDistrict = window.location.host.includes("-district");
|
|
507
|
+
|
|
508
|
+
var _useState = React.useState(false),
|
|
509
|
+
isCheckDone = _useState[0],
|
|
510
|
+
setIsCheckDone = _useState[1];
|
|
511
|
+
|
|
503
512
|
var authRoutes = React.useMemo(function () {
|
|
504
513
|
return routes.filter(function (route) {
|
|
505
514
|
return marioCore.canAccessRoute(user === null || user === void 0 ? void 0 : user.roles, route.roles);
|
|
@@ -520,10 +529,13 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
520
529
|
try {
|
|
521
530
|
var _temp2 = _catch(function () {
|
|
522
531
|
return Promise.resolve(marioCore.firstCheckToken()).then(function (tokenStatus) {
|
|
523
|
-
tokenStatus ? loadInfo() : resetAuth()
|
|
532
|
+
return Promise.resolve(tokenStatus ? loadInfo() : resetAuth()).then(function () {
|
|
533
|
+
setIsCheckDone(true);
|
|
534
|
+
});
|
|
524
535
|
});
|
|
525
536
|
}, function () {
|
|
526
537
|
resetAuth();
|
|
538
|
+
setIsCheckDone(true);
|
|
527
539
|
});
|
|
528
540
|
|
|
529
541
|
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
@@ -589,9 +601,12 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
589
601
|
|
|
590
602
|
var resetAuth = function resetAuth() {
|
|
591
603
|
localStorage.removeItem(marioCore.ACCESS_TOKEN);
|
|
592
|
-
history.push("/");
|
|
593
604
|
};
|
|
594
605
|
|
|
606
|
+
if (!isCheckDone) {
|
|
607
|
+
return null;
|
|
608
|
+
}
|
|
609
|
+
|
|
595
610
|
if (!user) {
|
|
596
611
|
return React__default.createElement("div", {
|
|
597
612
|
className: "font-family-lato"
|
|
@@ -7981,7 +7996,8 @@ var ConductIndex = function ConductIndex() {
|
|
|
7981
7996
|
id: "outlined-age-native-simple"
|
|
7982
7997
|
},
|
|
7983
7998
|
style: {
|
|
7984
|
-
borderRadius: "12px"
|
|
7999
|
+
borderRadius: "12px",
|
|
8000
|
+
overflow: "hidden"
|
|
7985
8001
|
}
|
|
7986
8002
|
}, React__default.createElement("option", {
|
|
7987
8003
|
"aria-label": "None",
|
|
@@ -18028,7 +18044,7 @@ var systemProfileUpload$1 = function systemProfileUpload(formData) {
|
|
|
18028
18044
|
return marioCore.api.post(SYSTEM_PROFILE$1, formData);
|
|
18029
18045
|
};
|
|
18030
18046
|
var changePasswordApi = function changePasswordApi(formData) {
|
|
18031
|
-
marioCore.api.post(CHANGE_PASSWORD, formData);
|
|
18047
|
+
return marioCore.api.post(CHANGE_PASSWORD, formData);
|
|
18032
18048
|
};
|
|
18033
18049
|
|
|
18034
18050
|
var useProfile = function useProfile() {
|
|
@@ -18525,6 +18541,9 @@ var useEditLearning = function useEditLearning() {
|
|
|
18525
18541
|
return Promise.reject(e);
|
|
18526
18542
|
}
|
|
18527
18543
|
}, []);
|
|
18544
|
+
React.useEffect(function () {
|
|
18545
|
+
id && getOneLearning();
|
|
18546
|
+
}, []);
|
|
18528
18547
|
return {
|
|
18529
18548
|
createNewLearningPlan: createNewLearningPlan,
|
|
18530
18549
|
getOneLearning: getOneLearning,
|
|
@@ -18559,9 +18578,12 @@ var PrintLearnPDF = function PrintLearnPDF(_ref) {
|
|
|
18559
18578
|
}).toString();
|
|
18560
18579
|
var WIDTH = doc.internal.pageSize.width;
|
|
18561
18580
|
var HEIGHT = doc.internal.pageSize.height;
|
|
18562
|
-
var LEFT =
|
|
18581
|
+
var LEFT = 30;
|
|
18563
18582
|
var WRAP_WIDTH = WIDTH - 2 * LEFT;
|
|
18564
18583
|
var LINE_HEIGHT = 15;
|
|
18584
|
+
var left = 30;
|
|
18585
|
+
var isTitle = true;
|
|
18586
|
+
var isDescription = true;
|
|
18565
18587
|
var page = 1;
|
|
18566
18588
|
var line = 60;
|
|
18567
18589
|
|
|
@@ -18570,20 +18592,43 @@ var PrintLearnPDF = function PrintLearnPDF(_ref) {
|
|
|
18570
18592
|
return newDate;
|
|
18571
18593
|
};
|
|
18572
18594
|
|
|
18573
|
-
var writeText = function writeText(text) {
|
|
18595
|
+
var writeText = function writeText(text, isTitle, isDescription) {
|
|
18574
18596
|
var splitTexts = doc.splitTextToSize(text, WRAP_WIDTH);
|
|
18575
18597
|
|
|
18576
|
-
|
|
18577
|
-
var
|
|
18578
|
-
|
|
18598
|
+
var _loop = function _loop(i) {
|
|
18599
|
+
var arrayOfNormalAndBoldText = splitTexts[i].split("**").filter(function (n) {
|
|
18600
|
+
return n;
|
|
18601
|
+
});
|
|
18602
|
+
arrayOfNormalAndBoldText.map(function (textItems, j) {
|
|
18603
|
+
if (i == 0 && j == 0 && !!isTitle) {
|
|
18604
|
+
doc.setFontSize(12);
|
|
18605
|
+
doc.setFont("Helvetica", "bold");
|
|
18606
|
+
} else {
|
|
18607
|
+
if (!!isDescription) {
|
|
18608
|
+
doc.setFontSize(12);
|
|
18609
|
+
doc.setFont("Helvetica", "italic");
|
|
18610
|
+
} else {
|
|
18611
|
+
doc.setFontSize(12);
|
|
18612
|
+
doc.setFont("Helvetica", "normal");
|
|
18613
|
+
}
|
|
18614
|
+
}
|
|
18615
|
+
|
|
18616
|
+
doc.text(textItems, left, line);
|
|
18617
|
+
left += doc.getTextDimensions(textItems).w;
|
|
18618
|
+
});
|
|
18619
|
+
left = 30;
|
|
18579
18620
|
line += LINE_HEIGHT;
|
|
18580
18621
|
|
|
18581
18622
|
if (line >= HEIGHT - 2.5 * LINE_HEIGHT) {
|
|
18582
18623
|
page++;
|
|
18583
18624
|
doc.addPage();
|
|
18584
18625
|
addHeaderFooter();
|
|
18585
|
-
line =
|
|
18626
|
+
line = 70;
|
|
18586
18627
|
}
|
|
18628
|
+
};
|
|
18629
|
+
|
|
18630
|
+
for (var i = 0; i < splitTexts.length; i++) {
|
|
18631
|
+
_loop(i);
|
|
18587
18632
|
}
|
|
18588
18633
|
};
|
|
18589
18634
|
|
|
@@ -18592,14 +18637,13 @@ var PrintLearnPDF = function PrintLearnPDF(_ref) {
|
|
|
18592
18637
|
var addHeaderFooter = function addHeaderFooter() {
|
|
18593
18638
|
var text = title + " - " + teacher;
|
|
18594
18639
|
doc.setTextColor(128, 128, 128);
|
|
18595
|
-
doc.text(text,
|
|
18596
|
-
doc.line(
|
|
18640
|
+
doc.text(text, 30, 40);
|
|
18641
|
+
doc.line(LEFT, 50, WIDTH - LEFT, 50);
|
|
18597
18642
|
doc.setTextColor(0, 0, 0);
|
|
18598
18643
|
doc.text("" + page, WIDTH / 2 - 5, HEIGHT - 10);
|
|
18599
18644
|
};
|
|
18600
18645
|
|
|
18601
18646
|
doc.setFontSize(12);
|
|
18602
|
-
page++;
|
|
18603
18647
|
addHeaderFooter();
|
|
18604
18648
|
var contentPage1 = [{
|
|
18605
18649
|
content: learningData.disabilityArea,
|
|
@@ -18626,45 +18670,50 @@ var PrintLearnPDF = function PrintLearnPDF(_ref) {
|
|
|
18626
18670
|
content: learningData.noteSourceofEligibility,
|
|
18627
18671
|
title: "Explanation of source"
|
|
18628
18672
|
}];
|
|
18629
|
-
doc.setFont("
|
|
18630
|
-
doc.setFontSize(
|
|
18631
|
-
line +=
|
|
18632
|
-
|
|
18673
|
+
doc.setFont("Helvetica", "bold");
|
|
18674
|
+
doc.setFontSize(20);
|
|
18675
|
+
line += 15;
|
|
18676
|
+
doc.text("Student information", LEFT, line);
|
|
18677
|
+
line += 15;
|
|
18633
18678
|
|
|
18634
18679
|
for (var i = 0; i < contentPage1.length; i++) {
|
|
18635
|
-
line +=
|
|
18680
|
+
line += 10;
|
|
18636
18681
|
doc.setFontSize(12);
|
|
18637
|
-
writeText(contentPage1[i].title + "
|
|
18682
|
+
writeText("**" + contentPage1[i].title + ":** " + contentPage1[i].content, isTitle);
|
|
18638
18683
|
}
|
|
18639
18684
|
|
|
18640
18685
|
doc.addPage();
|
|
18641
18686
|
var line = 60;
|
|
18642
18687
|
var title = "Goals";
|
|
18688
|
+
page++;
|
|
18643
18689
|
addHeaderFooter();
|
|
18644
18690
|
var goals = learningData.goalLearningPlans;
|
|
18645
|
-
doc.setFont("
|
|
18646
|
-
doc.setFontSize(
|
|
18691
|
+
doc.setFont("Helvetica", "bold");
|
|
18692
|
+
doc.setFontSize(20);
|
|
18693
|
+
line += 10;
|
|
18694
|
+
doc.text("Goals", LEFT, line);
|
|
18695
|
+
line += 15;
|
|
18696
|
+
doc.setFontSize(15);
|
|
18647
18697
|
line += 10;
|
|
18648
|
-
|
|
18649
|
-
doc.setFontSize(14);
|
|
18698
|
+
doc.text("Annual Goals", LEFT, line);
|
|
18650
18699
|
line += 15;
|
|
18651
|
-
writeText("Annual Goals");
|
|
18652
18700
|
|
|
18653
18701
|
for (var _i = 0; _i < goals.length; _i++) {
|
|
18654
18702
|
if (_i < 3) {
|
|
18655
18703
|
doc.setFontSize(12);
|
|
18656
|
-
writeText("
|
|
18704
|
+
writeText("** \u2022 " + convertDate(goals[_i].startTime) + " - " + convertDate(goals[_i].endTime) + ":** " + goals[_i].text, isTitle);
|
|
18657
18705
|
}
|
|
18658
18706
|
}
|
|
18659
18707
|
|
|
18660
|
-
doc.setFontSize(
|
|
18708
|
+
doc.setFontSize(15);
|
|
18709
|
+
line += 10;
|
|
18710
|
+
doc.text("Objectives and Reporting Progress", LEFT, line);
|
|
18661
18711
|
line += 15;
|
|
18662
|
-
writeText("Objectives and Reporting Progress");
|
|
18663
18712
|
|
|
18664
18713
|
for (var _i2 = 0; _i2 < goals.length; _i2++) {
|
|
18665
18714
|
if (_i2 >= 3) {
|
|
18666
18715
|
doc.setFontSize(12);
|
|
18667
|
-
writeText("
|
|
18716
|
+
writeText("** \u2022 " + convertDate(goals[_i2].startTime) + " - " + convertDate(goals[_i2].endTime) + ":** " + goals[_i2].text, isTitle);
|
|
18668
18717
|
}
|
|
18669
18718
|
}
|
|
18670
18719
|
|
|
@@ -18708,11 +18757,7 @@ var PrintLearnPDF = function PrintLearnPDF(_ref) {
|
|
|
18708
18757
|
|
|
18709
18758
|
for (var _i3 = 0; _i3 < contentPage2.length; _i3++) {
|
|
18710
18759
|
line += 15;
|
|
18711
|
-
|
|
18712
|
-
doc.setFontSize(13);
|
|
18713
|
-
writeText(contentPage2[_i3].title + " (" + contentPage2[_i3].description + ")");
|
|
18714
|
-
doc.setFont("Roboto", undefined, "normal");
|
|
18715
|
-
doc.setFontSize(12);
|
|
18760
|
+
writeText("**" + contentPage2[_i3].title + "** (" + contentPage2[_i3].description + ")", isTitle, isDescription);
|
|
18716
18761
|
writeText(contentPage2[_i3].content);
|
|
18717
18762
|
}
|
|
18718
18763
|
|
|
@@ -18720,7 +18765,14 @@ var PrintLearnPDF = function PrintLearnPDF(_ref) {
|
|
|
18720
18765
|
page++;
|
|
18721
18766
|
var title = "Signatures";
|
|
18722
18767
|
addHeaderFooter();
|
|
18723
|
-
var
|
|
18768
|
+
var line = 60;
|
|
18769
|
+
doc.setFont("Helvetica", "bold");
|
|
18770
|
+
doc.setFontSize(20);
|
|
18771
|
+
line += 15;
|
|
18772
|
+
doc.text("Signatures", LEFT, line);
|
|
18773
|
+
line += 30;
|
|
18774
|
+
doc.setFont("Helvetica", "normal");
|
|
18775
|
+
doc.setFontSize(12);
|
|
18724
18776
|
var x = 0;
|
|
18725
18777
|
var titleImage = [{
|
|
18726
18778
|
title: "Parent/Guardian",
|
|
@@ -18748,7 +18800,7 @@ var PrintLearnPDF = function PrintLearnPDF(_ref) {
|
|
|
18748
18800
|
type: "Other"
|
|
18749
18801
|
}];
|
|
18750
18802
|
|
|
18751
|
-
var
|
|
18803
|
+
var _loop2 = function _loop2(_i4) {
|
|
18752
18804
|
if (learningData.signatureLeaningPlans[_i4].signatureImage) {
|
|
18753
18805
|
var value = titleImage === null || titleImage === void 0 ? void 0 : titleImage.find(function (item) {
|
|
18754
18806
|
return item.type == learningData.signatureLeaningPlans[_i4].type;
|
|
@@ -18756,20 +18808,20 @@ var PrintLearnPDF = function PrintLearnPDF(_ref) {
|
|
|
18756
18808
|
|
|
18757
18809
|
if (x > 30) {
|
|
18758
18810
|
x = 30;
|
|
18759
|
-
|
|
18811
|
+
line += 120;
|
|
18760
18812
|
} else if (x === 0) {
|
|
18761
18813
|
x = 30;
|
|
18762
18814
|
} else {
|
|
18763
18815
|
x += WIDTH / 2;
|
|
18764
18816
|
}
|
|
18765
18817
|
|
|
18766
|
-
!!value && doc.text(value === null || value === void 0 ? void 0 : value.title, x,
|
|
18767
|
-
doc.addImage(learningData.signatureLeaningPlans[_i4].signatureImage, "PNG", x,
|
|
18818
|
+
!!value && doc.text(value === null || value === void 0 ? void 0 : value.title, x, line - 10);
|
|
18819
|
+
doc.addImage(learningData.signatureLeaningPlans[_i4].signatureImage, "PNG", x, line, WIDTH / 2 - 60, 80);
|
|
18768
18820
|
}
|
|
18769
18821
|
};
|
|
18770
18822
|
|
|
18771
18823
|
for (var _i4 = 0; _i4 < learningData.signatureLeaningPlans.length; _i4++) {
|
|
18772
|
-
|
|
18824
|
+
_loop2(_i4);
|
|
18773
18825
|
}
|
|
18774
18826
|
|
|
18775
18827
|
doc.save("LearningPlan.pdf");
|
|
@@ -20517,12 +20569,12 @@ var useChangePassword = function useChangePassword() {
|
|
|
20517
20569
|
message: "Change password successfully"
|
|
20518
20570
|
}));
|
|
20519
20571
|
});
|
|
20520
|
-
}, function (
|
|
20521
|
-
var
|
|
20572
|
+
}, function (e) {
|
|
20573
|
+
var _e$response, _e$response$data;
|
|
20522
20574
|
|
|
20523
20575
|
dispatch(marioCore.setAlert({
|
|
20524
20576
|
type: "danger",
|
|
20525
|
-
message: ((
|
|
20577
|
+
message: ((_e$response = e.response) === null || _e$response === void 0 ? void 0 : (_e$response$data = _e$response.data) === null || _e$response$data === void 0 ? void 0 : _e$response$data.title) || e.message
|
|
20526
20578
|
}));
|
|
20527
20579
|
});
|
|
20528
20580
|
|
|
@@ -20560,7 +20612,10 @@ var ChangePassword = function ChangePassword() {
|
|
|
20560
20612
|
initialValues: {
|
|
20561
20613
|
oldPassword: "",
|
|
20562
20614
|
newPassword: "",
|
|
20563
|
-
confirmedNewPassword: ""
|
|
20615
|
+
confirmedNewPassword: "",
|
|
20616
|
+
showOldPassword: false,
|
|
20617
|
+
showNewPassword: false,
|
|
20618
|
+
showConfirmNewPassword: false
|
|
20564
20619
|
},
|
|
20565
20620
|
enableReinitialize: true,
|
|
20566
20621
|
onSubmit: function onSubmit(values) {
|
|
@@ -20593,42 +20648,75 @@ var ChangePassword = function ChangePassword() {
|
|
|
20593
20648
|
className: "" + styles$a["change-form"]
|
|
20594
20649
|
}, React__default.createElement(core.Typography, {
|
|
20595
20650
|
className: "" + styles$a["label"]
|
|
20596
|
-
}, "Old password", React__default.createElement("sup", null, "*")), React__default.createElement(
|
|
20597
|
-
name: "oldPassword",
|
|
20651
|
+
}, "Old password", React__default.createElement("sup", null, "*")), React__default.createElement(FormControl, {
|
|
20598
20652
|
variant: "outlined",
|
|
20599
|
-
|
|
20653
|
+
className: "" + styles$a["input-field"]
|
|
20654
|
+
}, React__default.createElement(OutlinedInput, {
|
|
20655
|
+
type: values.showOldPassword ? "text" : "password",
|
|
20600
20656
|
value: values === null || values === void 0 ? void 0 : values.oldPassword,
|
|
20601
|
-
className: "" + styles$a["input-field"],
|
|
20602
20657
|
onChange: function onChange(e) {
|
|
20603
|
-
setFieldValue("oldPassword", e.target.value);
|
|
20604
|
-
}
|
|
20605
|
-
|
|
20658
|
+
return setFieldValue("oldPassword", e.target.value.trim());
|
|
20659
|
+
},
|
|
20660
|
+
endAdornment: React__default.createElement(InputAdornment, {
|
|
20661
|
+
position: "end"
|
|
20662
|
+
}, React__default.createElement(IconButton, {
|
|
20663
|
+
"aria-label": "toggle password visibility",
|
|
20664
|
+
onClick: function onClick() {
|
|
20665
|
+
return setFieldValue("showOldPassword", !values.showOldPassword);
|
|
20666
|
+
},
|
|
20667
|
+
onMouseDown: function onMouseDown(e) {
|
|
20668
|
+
return e.preventDefault();
|
|
20669
|
+
}
|
|
20670
|
+
}, values.showOldPassword ? React__default.createElement(Visibility, null) : React__default.createElement(VisibilityOff, null)))
|
|
20671
|
+
})), errors.oldPassword && touched.oldPassword && React__default.createElement("div", {
|
|
20606
20672
|
className: "" + styles$a["input-error"]
|
|
20607
20673
|
}, errors.oldPassword), React__default.createElement(core.Typography, {
|
|
20608
20674
|
className: "" + styles$a["label"]
|
|
20609
|
-
}, "New Password", React__default.createElement("sup", null, "*")), React__default.createElement(
|
|
20610
|
-
name: "newPassword",
|
|
20675
|
+
}, "New Password", React__default.createElement("sup", null, "*")), React__default.createElement(FormControl, {
|
|
20611
20676
|
variant: "outlined",
|
|
20612
|
-
|
|
20677
|
+
className: "" + styles$a["input-field"]
|
|
20678
|
+
}, React__default.createElement(OutlinedInput, {
|
|
20679
|
+
type: values.showNewPassword ? "text" : "password",
|
|
20613
20680
|
value: values === null || values === void 0 ? void 0 : values.newPassword,
|
|
20614
|
-
className: "" + styles$a["input-field"],
|
|
20615
20681
|
onChange: function onChange(e) {
|
|
20616
|
-
setFieldValue("newPassword", e.target.value);
|
|
20617
|
-
}
|
|
20618
|
-
|
|
20682
|
+
return setFieldValue("newPassword", e.target.value.trim());
|
|
20683
|
+
},
|
|
20684
|
+
endAdornment: React__default.createElement(InputAdornment, {
|
|
20685
|
+
position: "end"
|
|
20686
|
+
}, React__default.createElement(IconButton, {
|
|
20687
|
+
"aria-label": "toggle password visibility",
|
|
20688
|
+
onClick: function onClick() {
|
|
20689
|
+
return setFieldValue("showNewPassword", !values.showNewPassword);
|
|
20690
|
+
},
|
|
20691
|
+
onMouseDown: function onMouseDown(e) {
|
|
20692
|
+
return e.preventDefault();
|
|
20693
|
+
}
|
|
20694
|
+
}, values.showNewPassword ? React__default.createElement(Visibility, null) : React__default.createElement(VisibilityOff, null)))
|
|
20695
|
+
})), errors.newPassword && touched.newPassword && React__default.createElement("div", {
|
|
20619
20696
|
className: "" + styles$a["input-error"]
|
|
20620
20697
|
}, errors.newPassword), React__default.createElement(core.Typography, {
|
|
20621
20698
|
className: "" + styles$a["label"]
|
|
20622
|
-
}, "Confirm new password", React__default.createElement("sup", null, "*")), React__default.createElement(
|
|
20623
|
-
name: "confirmedNewPassword",
|
|
20699
|
+
}, "Confirm new password", React__default.createElement("sup", null, "*")), React__default.createElement(FormControl, {
|
|
20624
20700
|
variant: "outlined",
|
|
20625
|
-
|
|
20701
|
+
className: "" + styles$a["input-field"]
|
|
20702
|
+
}, React__default.createElement(OutlinedInput, {
|
|
20703
|
+
type: values.showConfirmNewPassword ? "text" : "password",
|
|
20626
20704
|
value: values === null || values === void 0 ? void 0 : values.confirmedNewPassword,
|
|
20627
|
-
className: "" + styles$a["input-field"],
|
|
20628
20705
|
onChange: function onChange(e) {
|
|
20629
|
-
setFieldValue("confirmedNewPassword", e.target.value);
|
|
20630
|
-
}
|
|
20631
|
-
|
|
20706
|
+
return setFieldValue("confirmedNewPassword", e.target.value.trim());
|
|
20707
|
+
},
|
|
20708
|
+
endAdornment: React__default.createElement(InputAdornment, {
|
|
20709
|
+
position: "end"
|
|
20710
|
+
}, React__default.createElement(IconButton, {
|
|
20711
|
+
"aria-label": "toggle password visibility",
|
|
20712
|
+
onClick: function onClick() {
|
|
20713
|
+
return setFieldValue("showConfirmNewPassword", !values.showConfirmNewPassword);
|
|
20714
|
+
},
|
|
20715
|
+
onMouseDown: function onMouseDown(e) {
|
|
20716
|
+
return e.preventDefault();
|
|
20717
|
+
}
|
|
20718
|
+
}, values.showConfirmNewPassword ? React__default.createElement(Visibility, null) : React__default.createElement(VisibilityOff, null)))
|
|
20719
|
+
})), errors.confirmedNewPassword && touched.confirmedNewPassword && React__default.createElement("div", {
|
|
20632
20720
|
className: "" + styles$a["input-error"]
|
|
20633
20721
|
}, errors.confirmedNewPassword), React__default.createElement(core.Button, {
|
|
20634
20722
|
variant: "contained",
|