@influenzanet/case-web-app-core 2.8.6-staging → 2.8.8-staging
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/build/index.es.js +24 -2
- package/build/index.es.js.map +1 -1
- package/build/index.js +24 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -21025,6 +21025,8 @@ var SignupForm = function (props) {
|
|
|
21025
21025
|
var confirmPasswordInputLabel = t('signup.confirmPasswordInputLabel');
|
|
21026
21026
|
var confirmPasswordPlaceholder = t('signup.confirmPasswordInputLabel');
|
|
21027
21027
|
var phoneInputLabel = t('signup.phoneInputLabel');
|
|
21028
|
+
var phoneOptional = t('signup.phoneOptional');
|
|
21029
|
+
var phoneOptionalWithExplanation = t('signup.phoneOptionalWithExplanation');
|
|
21028
21030
|
var phoneInputPlaceholder = t('signup.phoneInputPlaceholder');
|
|
21029
21031
|
var dialogSize = consentDialogSize();
|
|
21030
21032
|
return (jsxs(React__default$1.Fragment, { children: [infoText && infoText.length > 0 ?
|
|
@@ -21045,7 +21047,7 @@ var SignupForm = function (props) {
|
|
|
21045
21047
|
}, onChange: function (event) {
|
|
21046
21048
|
var value = event.target.value;
|
|
21047
21049
|
setSignupData(function (prev) { return __assign(__assign({}, prev), { confirmPassword: value }); });
|
|
21048
|
-
} }, void 0), jsx(PhoneNumberInput, { className: marginBottomClass, value: signupData.phone, label: phoneInputLabel +
|
|
21050
|
+
} }, void 0), jsx(PhoneNumberInput, { className: marginBottomClass, value: signupData.phone, label: phoneInputLabel + (phoneOptional), placeholder: phoneInputPlaceholder + (phoneOptionalWithExplanation), autoFocus: false, onChange: function (fullPhoneNumber) {
|
|
21049
21051
|
setSignupData(function (prev) { return __assign(__assign({}, prev), { phone: fullPhoneNumber }); });
|
|
21050
21052
|
}, onBlur: function () {
|
|
21051
21053
|
setShowPhoneError(true);
|
|
@@ -22623,6 +22625,13 @@ var VerifyWhatsApp = function () {
|
|
|
22623
22625
|
var _d = useState(''), error = _d[0], setError = _d[1];
|
|
22624
22626
|
var _e = useState(''), verificationCode = _e[0], setVerificationCode = _e[1];
|
|
22625
22627
|
var phoneNumber = (dialogContent === null || dialogContent === void 0 ? void 0 : dialogContent.phoneNumber) || '';
|
|
22628
|
+
// Reset verification code when dialog opens
|
|
22629
|
+
useEffect(function () {
|
|
22630
|
+
if (open) {
|
|
22631
|
+
setVerificationCode('');
|
|
22632
|
+
setError('');
|
|
22633
|
+
}
|
|
22634
|
+
}, [open]);
|
|
22626
22635
|
var close = function () {
|
|
22627
22636
|
dispatch(dialogActions.closeDialog());
|
|
22628
22637
|
setVerificationCode('');
|
|
@@ -24051,12 +24060,25 @@ var AccountSettings = function (props) {
|
|
|
24051
24060
|
var isAuth = useIsAuthenticated();
|
|
24052
24061
|
var dispatch = useDispatch();
|
|
24053
24062
|
var currentUser = useSelector(function (state) { return state.user.currentUser; });
|
|
24063
|
+
var dialogState = useSelector(function (state) { return state.dialog; });
|
|
24054
24064
|
var _a = useState(false), isResending = _a[0], setIsResending = _a[1];
|
|
24055
24065
|
var _b = useState(null), resendMessage = _b[0], setResendMessage = _b[1];
|
|
24066
|
+
var phoneInfo = currentUser === null || currentUser === void 0 ? void 0 : currentUser.contactInfos.find(function (info) { return info.type === 'phone'; });
|
|
24067
|
+
// Clear success message when phone is verified
|
|
24068
|
+
useEffect(function () {
|
|
24069
|
+
if (phoneInfo && phoneInfo.confirmedAt && phoneInfo.confirmedAt > 0) {
|
|
24070
|
+
setResendMessage(null);
|
|
24071
|
+
}
|
|
24072
|
+
}, [phoneInfo]);
|
|
24073
|
+
// Clear success message when dialog closes
|
|
24074
|
+
useEffect(function () {
|
|
24075
|
+
if (dialogState.config === undefined && (resendMessage === null || resendMessage === void 0 ? void 0 : resendMessage.type) === 'success') {
|
|
24076
|
+
setResendMessage(null);
|
|
24077
|
+
}
|
|
24078
|
+
}, [dialogState.config, resendMessage === null || resendMessage === void 0 ? void 0 : resendMessage.type]);
|
|
24056
24079
|
if (!isAuth) {
|
|
24057
24080
|
return jsx("div", __assign({ className: "bg-warning-light p-3" }, { children: 'authentication needed' }), void 0);
|
|
24058
24081
|
}
|
|
24059
|
-
var phoneInfo = currentUser.contactInfos.find(function (info) { return info.type === 'phone'; });
|
|
24060
24082
|
console.log('phoneInfo:', phoneInfo);
|
|
24061
24083
|
console.log('confirmedAt:', phoneInfo === null || phoneInfo === void 0 ? void 0 : phoneInfo.confirmedAt);
|
|
24062
24084
|
var handleResendCode = function () { return __awaiter(void 0, void 0, void 0, function () {
|