rm init password
parent
f3322f9166
commit
4891e7b127
|
@ -37,6 +37,7 @@
|
|||
"emailPlaceholderNew": "Geben Sie Ihre neue E-Mail ein",
|
||||
"password": "Passwort",
|
||||
"passwordPlaceholder": "Geben Sie Ihr Passwort ein",
|
||||
"passwordPlaceholderThirdPerson": "Geben Sie das Passwort ein",
|
||||
"passwordPlaceholderNew": "Geben Sie Ihr neues Passwort ein",
|
||||
"noDataFound": "Keine Einträge gefunden",
|
||||
"calendarMaxFutureBookingDays": "Max. Tage im Voraus",
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
"emailPlaceholderNew": "Enter your new email",
|
||||
"password": "Password",
|
||||
"passwordPlaceholder": "Enter your password",
|
||||
"passwordPlaceholderThirdPerson": "Enter the password",
|
||||
"passwordPlaceholderNew": "Enter your new password",
|
||||
"noDataFound": "No data found",
|
||||
"calendarMaxFutureBookingDays": "Max. future booking days",
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Form, Input, InputNumber, Skeleton } from "antd";
|
|||
import { Constants, isEmailValid, myFetch } from "../../utils";
|
||||
import { createElement, useRef } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAppContext } from "../../Contexts/AppContext";
|
||||
|
||||
export function MyUsernameFormInput({
|
||||
propsFormItem,
|
||||
|
@ -45,6 +44,7 @@ export function MyPasswordFormInput({
|
|||
inputPlaceholder,
|
||||
formItemRules,
|
||||
newPassword,
|
||||
thirdPerson,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
@ -64,7 +64,9 @@ export function MyPasswordFormInput({
|
|||
}
|
||||
)}
|
||||
inputPlaceholder={
|
||||
inputPlaceholder || newPassword
|
||||
thirdPerson
|
||||
? t("common.passwordPlaceholderThirdPerson")
|
||||
: inputPlaceholder || newPassword
|
||||
? t("common.passwordPlaceholderNew")
|
||||
: t("common.passwordPlaceholder")
|
||||
}
|
||||
|
|
|
@ -212,11 +212,11 @@ function ModalAddEditEmployee({
|
|||
const { storeId } = useParams();
|
||||
const screenBreakpoint = useBreakpoint();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
/*
|
||||
const checkboxSetPasswordOnLogging = Form.useWatch(
|
||||
"checkboxSetPasswordOnLogging",
|
||||
form
|
||||
);
|
||||
); */
|
||||
|
||||
const [isRequesting, setIsRequesting] = useState(false);
|
||||
|
||||
|
@ -294,16 +294,16 @@ function ModalAddEditEmployee({
|
|||
username: values.username,
|
||||
email: values.email,
|
||||
language: i18n.language,
|
||||
passwordSetOnInitLogging:
|
||||
values.checkboxSetPasswordOnLogging,
|
||||
/*passwordSetOnInitLogging:
|
||||
values.checkboxSetPasswordOnLogging, */
|
||||
};
|
||||
|
||||
if (
|
||||
/*if (
|
||||
!values.checkboxSetPasswordOnLogging &&
|
||||
values.password
|
||||
) {
|
||||
) { */
|
||||
body.password = EncodeStringToBase64(values.password);
|
||||
}
|
||||
//}
|
||||
|
||||
if (
|
||||
values.calendarMaxFutureBookingDays !==
|
||||
|
@ -443,25 +443,9 @@ function ModalAddEditEmployee({
|
|||
>
|
||||
<MyUsernameFormInput thirdPerson />
|
||||
|
||||
<MyEmailFormInput inputNotRequired={true} hasFeedback thirdPerson />
|
||||
<MyEmailFormInput hasFeedback thirdPerson />
|
||||
|
||||
{modalOptions.mode === "add" && (
|
||||
<>
|
||||
<Form.Item
|
||||
name="checkboxSetPasswordOnLogging"
|
||||
valuePropName="checked"
|
||||
extra={t(
|
||||
"employees.modalAddEmployee.checkboxSetPasswordOnLoggingInfo"
|
||||
)}
|
||||
>
|
||||
<Checkbox>
|
||||
{t("employees.modalAddEmployee.checkboxSetPasswordOnLogging")}
|
||||
</Checkbox>
|
||||
</Form.Item>
|
||||
|
||||
{!checkboxSetPasswordOnLogging && <MyPasswordFormInput />}
|
||||
</>
|
||||
)}
|
||||
{modalOptions.mode === "add" && <MyPasswordFormInput thirdPerson />}
|
||||
|
||||
<MyCalendarMaxFutureBookingDaysFormInput
|
||||
maxLength={storeSettings.calendar_max_future_booking_days}
|
||||
|
@ -475,3 +459,21 @@ function ModalAddEditEmployee({
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
<Form.Item
|
||||
name="checkboxSetPasswordOnLogging"
|
||||
valuePropName="checked"
|
||||
extra={t(
|
||||
"employees.modalAddEmployee.checkboxSetPasswordOnLoggingInfo"
|
||||
)}
|
||||
>
|
||||
<Checkbox>
|
||||
{t("employees.modalAddEmployee.checkboxSetPasswordOnLogging")}
|
||||
</Checkbox>
|
||||
</Form.Item>
|
||||
|
||||
{!checkboxSetPasswordOnLogging && (
|
||||
<MyPasswordFormInput thirdPerson />
|
||||
)}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue