@influenzanet/case-web-app-core 2.9.10-staging → 2.9.11-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 +23 -10
- package/build/index.es.js.map +1 -1
- package/build/index.js +23 -10
- package/build/index.js.map +1 -1
- package/package.json +3 -3
package/build/index.es.js
CHANGED
|
@@ -21675,7 +21675,7 @@ var ChangeEmail = function (props) {
|
|
|
21675
21675
|
} }, void 0), jsx(TextField, { className: "mb-2", id: "password", name: "password", type: "password", label: t('changeEmail.passwordInputLabel'), placeholder: t('changeEmail.passwordInputPlaceholder'), value: formData.password, autoComplete: "off", onChange: function (event) {
|
|
21676
21676
|
var value = event.target.value;
|
|
21677
21677
|
setFormData(function (prev) { return __assign(__assign({}, prev), { password: value }); });
|
|
21678
|
-
} }, void 0), jsx(AlertBox, { type: "info", content: t('changeEmail.info') }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changeEmail.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, disabled: buttonDisabled(), label: t('changeEmail.confirmBtn') }, void 0)] }), void 0)] }), void 0) }), void 0), jsx(ConfirmDialog, __assign({ open: openConfirm, title: t('changeEmail.warningDialog.title'), onConfirm: function () {
|
|
21678
|
+
} }, void 0), jsx(AlertBox, { type: "info", content: t('changeEmail.info') }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changeEmail.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, loadingLabel: t('loadingMsg'), disabled: buttonDisabled(), label: t('changeEmail.confirmBtn') }, void 0)] }), void 0)] }), void 0) }), void 0), jsx(ConfirmDialog, __assign({ open: openConfirm, title: t('changeEmail.warningDialog.title'), onConfirm: function () {
|
|
21679
21679
|
setOpenConfirm(false);
|
|
21680
21680
|
changeEmail();
|
|
21681
21681
|
}, color: "warning", onClose: function () { return setOpenConfirm(false); }, cancelText: t('changeEmail.warningDialog.cancelBtn'), confirmText: t('changeEmail.warningDialog.confirmBtn') }, { children: jsx(AlertBox, { type: "warning", content: t('changeEmail.warningDialog.content') }, void 0) }), void 0)] }), void 0));
|
|
@@ -21788,7 +21788,7 @@ var ChangeLanguage = function (props) {
|
|
|
21788
21788
|
var value = event.target.value;
|
|
21789
21789
|
setSelectedLanguage(value);
|
|
21790
21790
|
}, hasError: error !== "" }, void 0)
|
|
21791
|
-
: null, jsx(AlertBox, { type: "info", content: t('changeLanguage.info') }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, onClose: function () { return setError(''); }, useIcon: true, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changeLanguage.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, disabled: loading, label: t('changeLanguage.confirmBtn'), onClick: function () { return changeLanguage(); } }, void 0)] }), void 0)] }), void 0) }), void 0));
|
|
21791
|
+
: null, jsx(AlertBox, { type: "info", content: t('changeLanguage.info') }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, onClose: function () { return setError(''); }, useIcon: true, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changeLanguage.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, loadingLabel: t('loadingMsg'), disabled: loading, label: t('changeLanguage.confirmBtn'), onClick: function () { return changeLanguage(); } }, void 0)] }), void 0)] }), void 0) }), void 0));
|
|
21792
21792
|
};
|
|
21793
21793
|
|
|
21794
21794
|
var ChangeNotifications = function () {
|
|
@@ -21929,7 +21929,7 @@ var ChangeNotifications = function () {
|
|
|
21929
21929
|
setNewsletterEnabled(value);
|
|
21930
21930
|
} }, { children: newsletterEnabled
|
|
21931
21931
|
? t('dialogs:changeNotifications.newsletter.on')
|
|
21932
|
-
: t('dialogs:changeNotifications.newsletter.off') }), void 0), jsx("hr", { className: "my-3" }, void 0), jsx("label", __assign({ className: "mb-1 form-label" }, { children: t('dialogs:changeNotifications.channels.label') }), void 0), jsx("div", __assign({ className: "mb-2" }, { children: jsx(Checkbox, __assign({ id: "channelEmail", name: "channelEmail", checked: channelEmail
|
|
21932
|
+
: t('dialogs:changeNotifications.newsletter.off') }), void 0), jsx("hr", { className: "my-3" }, void 0), jsx("label", __assign({ className: "mb-1 form-label" }, { children: t('dialogs:changeNotifications.channels.label') }), void 0), jsx("div", __assign({ className: "mb-2" }, { children: jsx(Checkbox, __assign({ id: "channelEmail", name: "channelEmail", checked: channelEmail, disabled: !confirmedPhone && channelEmail, onChange: handleChannelEmail }, { children: t('dialogs:changeNotifications.channels.email') }), void 0) }), void 0), jsx("div", __assign({ className: "mb-2" }, { children: jsx(Checkbox, __assign({ id: "channelWhatsapp", name: "channelWhatsapp", checked: channelWhatsapp, disabled: !confirmedPhone, onChange: handleChannelWhatsapp }, { children: t('dialogs:changeNotifications.channels.whatsapp') }), void 0) }), void 0), !confirmedPhone && (jsx(AlertBox, { type: "warning", className: "mt-2", content: t('dialogs:changeNotifications.channels.whatsappDisabled') }, void 0)), confirmedPhone && (jsx("p", __assign({ className: "mt-1", style: { fontSize: '0.8rem', color: '#888', fontStyle: 'italic' } }, { children: t('dialogs:changeNotifications.channels.note') }), void 0)), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, onClose: function () { return setError(''); }, useIcon: true, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changeNotifications.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, loadingLabel: t('loadingMsg'), disabled: loading || !changed, label: t('changeNotifications.submitBtn') }, void 0)] }), void 0)] }), void 0) }), void 0) }), void 0));
|
|
21933
21933
|
};
|
|
21934
21934
|
|
|
21935
21935
|
var ChangePassword = function (props) {
|
|
@@ -22028,7 +22028,7 @@ var ChangePassword = function (props) {
|
|
|
22028
22028
|
}, onChange: function (event) {
|
|
22029
22029
|
var value = event.target.value;
|
|
22030
22030
|
setFormData(function (prev) { return __assign(__assign({}, prev), { confirmNewPassword: value }); });
|
|
22031
|
-
} }, void 0), jsx(AlertBox, { type: "info", content: t('changePassword.info') }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, onClose: function () { return setError(''); }, useIcon: true, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changePassword.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, disabled: loading || formData.oldPassword.length < 6 || !checkPasswordRules(formData.newPassword) || !passwordsMatch(), label: t('changePassword.confirmBtn') }, void 0)] }), void 0)] }), void 0) }), void 0) }), void 0));
|
|
22031
|
+
} }, void 0), jsx(AlertBox, { type: "info", content: t('changePassword.info') }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, onClose: function () { return setError(''); }, useIcon: true, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changePassword.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, loadingLabel: t('loadingMsg'), disabled: loading || formData.oldPassword.length < 6 || !checkPasswordRules(formData.newPassword) || !passwordsMatch(), label: t('changePassword.confirmBtn') }, void 0)] }), void 0)] }), void 0) }), void 0) }), void 0));
|
|
22032
22032
|
};
|
|
22033
22033
|
|
|
22034
22034
|
var DeleteAccount$1 = function (props) {
|
|
@@ -22079,7 +22079,11 @@ var DeleteAccount$1 = function (props) {
|
|
|
22079
22079
|
}
|
|
22080
22080
|
});
|
|
22081
22081
|
}); };
|
|
22082
|
-
return (jsx(Dialog, __assign({ open: open, title: t('deleteAccount.title'), color: "danger", onClose: handleClose, ariaLabelledBy: "deleteAccountDialogTitle" }, { children: jsxs("div", __assign({ className: clsx(defaultDialogPaddingXClass, 'py-3', 'bg-grey-1') }, { children: [jsx(AlertBox, { type: "danger", content: t('dialogs:deleteAccount.info') }, void 0), jsx(AlertBox, { className: "mt-2", type: "danger", hide: !error, closable: true, onClose: function () { return setError(''); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", label: t('deleteAccount.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { type: "button", color: "danger", className: "mt-2", loading: loading,
|
|
22082
|
+
return (jsx(Dialog, __assign({ open: open, title: t('deleteAccount.title'), color: "danger", onClose: handleClose, ariaLabelledBy: "deleteAccountDialogTitle" }, { children: jsxs("div", __assign({ className: clsx(defaultDialogPaddingXClass, 'py-3', 'bg-grey-1') }, { children: [jsx(AlertBox, { type: "danger", content: t('dialogs:deleteAccount.info') }, void 0), jsx(AlertBox, { className: "mt-2", type: "danger", hide: !error, closable: true, onClose: function () { return setError(''); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", label: t('deleteAccount.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { type: "button", color: "danger", className: "mt-2", loading: loading, loadingLabel: t('loadingMsg'),
|
|
22083
|
+
// DialogBtn's loading prop only swaps the label for a spinner, so the button has to
|
|
22084
|
+
// be disabled as well: a second click sends the request the first one is still
|
|
22085
|
+
// waiting on.
|
|
22086
|
+
disabled: loading, outlined: true, label: t('deleteAccount.confirmBtn'), onClick: function () { return onDeleteAccount(); } }, void 0)] }), void 0)] }), void 0) }), void 0));
|
|
22083
22087
|
};
|
|
22084
22088
|
|
|
22085
22089
|
var parseGRPCTimestamp = function (grpcValue) {
|
|
@@ -22399,7 +22403,7 @@ var EditProfile = function (props) {
|
|
|
22399
22403
|
});
|
|
22400
22404
|
} }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: isNewProfile
|
|
22401
22405
|
? t("dialogs:editProfile.new.cancelBtn")
|
|
22402
|
-
: t("dialogs:editProfile.edit.cancelBtn"), onClick: function () { return close(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "button", color: "primary", loading: loading, disabled: loading ||
|
|
22406
|
+
: t("dialogs:editProfile.edit.cancelBtn"), onClick: function () { return close(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "button", color: "primary", loading: loading, loadingLabel: t("loadingMsg"), disabled: loading ||
|
|
22403
22407
|
profile.alias.length < 1 ||
|
|
22404
22408
|
profile.consentConfirmedAt <= 1, label: isNewProfile
|
|
22405
22409
|
? t("dialogs:editProfile.new.submitBtn")
|
|
@@ -22451,6 +22455,11 @@ var ManageProfiles = function () {
|
|
|
22451
22455
|
if (!selectedProfile) {
|
|
22452
22456
|
return [2 /*return*/];
|
|
22453
22457
|
}
|
|
22458
|
+
// The confirmation dialog stays open until the request settles, so its button can be clicked
|
|
22459
|
+
// again: without this, a second click removes a second profile.
|
|
22460
|
+
if (loading) {
|
|
22461
|
+
return [2 /*return*/];
|
|
22462
|
+
}
|
|
22454
22463
|
setLoading(true);
|
|
22455
22464
|
_a.label = 1;
|
|
22456
22465
|
case 1:
|
|
@@ -22493,7 +22502,7 @@ var ManageProfiles = function () {
|
|
|
22493
22502
|
};
|
|
22494
22503
|
return (jsx(Dialog, __assign({ open: open, title: t("manageProfiles.title"), onClose: handleClose, ariaLabelledBy: "manageProfilesDialogTitle" }, { children: jsxs("div", __assign({ className: clsx(defaultDialogPaddingXClass, "pb-3 pt-1", "bg-grey-1") }, { children: [profiles.map(function (p, i) {
|
|
22495
22504
|
return renderProfileItem(p, i === profiles.length - 1);
|
|
22496
|
-
}), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t("manageProfiles.cancelBtn"), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "button", color: "primary", loading: loading, label: t("manageProfiles.newProfileBtn"), onClick: function () { return setNewProfileDialog(true); } }, void 0)] }), void 0), jsx(EditProfile, { open: openNewProfileDialog, selectedProfile: selectedProfile, onClose: function () {
|
|
22505
|
+
}), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t("manageProfiles.cancelBtn"), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "button", color: "primary", loading: loading, loadingLabel: t("loadingMsg"), label: t("manageProfiles.newProfileBtn"), onClick: function () { return setNewProfileDialog(true); } }, void 0)] }), void 0), jsx(EditProfile, { open: openNewProfileDialog, selectedProfile: selectedProfile, onClose: function () {
|
|
22497
22506
|
setSelectedProfile(__assign({}, emptyProfile));
|
|
22498
22507
|
setNewProfileDialog(false);
|
|
22499
22508
|
} }, void 0), jsx(ConfirmDialog, __assign({ open: openConfirmDialog, color: "warning", title: t("manageProfiles.warningDialog.title"), cancelText: t("manageProfiles.warningDialog.cancelBtn"), confirmText: t("manageProfiles.warningDialog.confirmBtn"), onClose: function () {
|
|
@@ -22734,7 +22743,7 @@ var ChangePhone = function () {
|
|
|
22734
22743
|
};
|
|
22735
22744
|
return (jsxs(Dialog, __assign({ open: open, title: t('changePhone.title'), onClose: handleClose, ariaLabelledBy: "changePhoneDialogTitle" }, { children: [jsx("div", __assign({ className: clsx(defaultDialogPaddingXClass, 'py-3', 'bg-grey-1') }, { children: jsxs("form", __assign({ onSubmit: onSubmit }, { children: [jsx(PhoneNumberInput, { className: "mb-2", value: formData.newPhone, label: t('dialogs:changePhone.phoneInputLabel'), placeholder: t('dialogs:changePhone.phoneInputPlaceholder'), autoFocus: true, onChange: function (fullPhoneNumber) {
|
|
22736
22745
|
setFormData(function (prev) { return __assign(__assign({}, prev), { newPhone: fullPhoneNumber }); });
|
|
22737
|
-
} }, void 0), jsx(AlertBox, { type: "info", content: t('changePhone.info') }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changePhone.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, disabled: buttonDisabled(), label: t('changePhone.confirmBtn') }, void 0)] }), void 0)] }), void 0) }), void 0), jsx(ConfirmDialog, __assign({ open: openConfirm, title: t('changePhone.warningDialog.title'), onConfirm: function () {
|
|
22746
|
+
} }, void 0), jsx(AlertBox, { type: "info", content: t('changePhone.info') }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t('changePhone.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, loadingLabel: t('loadingMsg'), disabled: buttonDisabled(), label: t('changePhone.confirmBtn') }, void 0)] }), void 0)] }), void 0) }), void 0), jsx(ConfirmDialog, __assign({ open: openConfirm, title: t('changePhone.warningDialog.title'), onConfirm: function () {
|
|
22738
22747
|
setOpenConfirm(false);
|
|
22739
22748
|
changePhone();
|
|
22740
22749
|
}, color: "warning", onClose: function () { return setOpenConfirm(false); }, cancelText: t('changePhone.warningDialog.cancelBtn'), confirmText: t('changePhone.warningDialog.confirmBtn') }, { children: jsx(AlertBox, { type: "warning", content: t('changePhone.warningDialog.content') }, void 0) }), void 0)] }), void 0));
|
|
@@ -22805,7 +22814,11 @@ var DeletePhone = function (props) {
|
|
|
22805
22814
|
}
|
|
22806
22815
|
});
|
|
22807
22816
|
}); };
|
|
22808
|
-
return (jsx(Dialog, __assign({ open: open, title: t('deletePhone.title'), color: "danger", onClose: handleClose, ariaLabelledBy: "deletePhoneDialogTitle" }, { children: jsxs("div", __assign({ className: clsx(defaultDialogPaddingXClass, 'py-3', 'bg-grey-1') }, { children: [jsx(AlertBox, { type: "danger", content: t('dialogs:deletePhone.info') }, void 0), jsx(AlertBox, { className: "mt-2", type: "danger", hide: !error, closable: true, onClose: function () { return setError(''); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", label: t('deletePhone.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { type: "button", color: "danger", className: "mt-2", loading: loading,
|
|
22817
|
+
return (jsx(Dialog, __assign({ open: open, title: t('deletePhone.title'), color: "danger", onClose: handleClose, ariaLabelledBy: "deletePhoneDialogTitle" }, { children: jsxs("div", __assign({ className: clsx(defaultDialogPaddingXClass, 'py-3', 'bg-grey-1') }, { children: [jsx(AlertBox, { type: "danger", content: t('dialogs:deletePhone.info') }, void 0), jsx(AlertBox, { className: "mt-2", type: "danger", hide: !error, closable: true, onClose: function () { return setError(''); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", label: t('deletePhone.cancelBtn'), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { type: "button", color: "danger", className: "mt-2", loading: loading, loadingLabel: t('loadingMsg'),
|
|
22818
|
+
// DialogBtn's loading prop only swaps the label for a spinner, so the button has to
|
|
22819
|
+
// be disabled as well: a second click sends the request the first one is still
|
|
22820
|
+
// waiting on.
|
|
22821
|
+
disabled: loading, outlined: true, label: t('deletePhone.confirmBtn'), onClick: function () { return onDeletePhone(); } }, void 0)] }), void 0)] }), void 0) }), void 0));
|
|
22809
22822
|
};
|
|
22810
22823
|
|
|
22811
22824
|
var AddPhone = function () {
|
|
@@ -22984,7 +22997,7 @@ var AddPhone = function () {
|
|
|
22984
22997
|
return (jsxs(Dialog, __assign({ open: open, title: t("addPhone.title"), onClose: handleClose, ariaLabelledBy: "addPhoneDialogTitle" }, { children: [jsx("div", __assign({ className: clsx(defaultDialogPaddingXClass, "py-3", "bg-grey-1") }, { children: jsxs("form", __assign({ onSubmit: onSubmit }, { children: [jsx("label", __assign({ className: "form-label mb-1" }, { children: t("dialogs:addPhone.phoneInputLabel") }), void 0), jsxs("div", __assign({ className: "d-flex mb-2" }, { children: [jsx(SelectField, { className: "me-2", style: { width: "120px", flexShrink: 0 }, value: formData.countryCode, onChange: handleCountryCodeChange, values: COUNTRY_CODES.map(function (country) { return ({
|
|
22985
22998
|
code: country.code,
|
|
22986
22999
|
label: "".concat(country.code, " ").concat(country.country),
|
|
22987
|
-
}); }) }, void 0), jsx(TextField, { type: "text", placeholder: t("dialogs:addPhone.phoneInputPlaceholder"), value: formData.phoneNumber, autoFocus: true, autoComplete: "tel", className: "flex-grow-1", onChange: handlePhoneNumberChange, style: { marginBottom: 0 } }, void 0)] }), void 0), jsxs("small", __assign({ className: "text-muted mb-2 d-block" }, { children: [t("dialogs:addPhone.completeNumber"), ": ", formData.newPhone] }), void 0), jsx(AlertBox, { type: "info", content: t("addPhone.info") }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t("addPhone.cancelBtn"), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, disabled: buttonDisabled(), label: t("addPhone.confirmBtn") }, void 0)] }), void 0)] }), void 0) }), void 0), jsx(ConfirmDialog, __assign({ open: openConfirm, title: t("addPhone.warningDialog.title"), onConfirm: function () {
|
|
23000
|
+
}); }) }, void 0), jsx(TextField, { type: "text", placeholder: t("dialogs:addPhone.phoneInputPlaceholder"), value: formData.phoneNumber, autoFocus: true, autoComplete: "tel", className: "flex-grow-1", onChange: handlePhoneNumberChange, style: { marginBottom: 0 } }, void 0)] }), void 0), jsxs("small", __assign({ className: "text-muted mb-2 d-block" }, { children: [t("dialogs:addPhone.completeNumber"), ": ", formData.newPhone] }), void 0), jsx(AlertBox, { type: "info", content: t("addPhone.info") }, void 0), jsx(AlertBox, { type: "danger", className: "mt-2", hide: !error, closable: true, useIcon: true, onClose: function () { return setError(""); }, content: error }, void 0), jsxs("div", __assign({ className: "d-flex flex-wrap" }, { children: [jsx(DialogBtn, { className: "mt-2 me-2", type: "button", color: "primary", outlined: true, label: t("addPhone.cancelBtn"), onClick: function () { return handleClose(); } }, void 0), jsx(DialogBtn, { className: "mt-2", type: "submit", color: "primary", loading: loading, loadingLabel: t("loadingMsg"), disabled: buttonDisabled(), label: t("addPhone.confirmBtn") }, void 0)] }), void 0)] }), void 0) }), void 0), jsx(ConfirmDialog, __assign({ open: openConfirm, title: t("addPhone.warningDialog.title"), onConfirm: function () {
|
|
22988
23001
|
setOpenConfirm(false);
|
|
22989
23002
|
addPhone();
|
|
22990
23003
|
}, color: "warning", onClose: function () { return setOpenConfirm(false); }, cancelText: t("addPhone.warningDialog.cancelBtn"), confirmText: t("addPhone.warningDialog.confirmBtn") }, { children: jsx(AlertBox, { type: "warning", content: t("addPhone.warningDialog.content") }, void 0) }), void 0)] }), void 0));
|