fixed max length
parent
da86209452
commit
234511e5a4
|
@ -126,15 +126,15 @@ export function MyEmailFormInput({
|
|||
|
||||
export function MyCalendarMaxFutureBookingDaysFormInput({
|
||||
formItemName = "calendarMaxFutureBookingDays",
|
||||
maxLength,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const appContext = useAppContext();
|
||||
|
||||
return (
|
||||
<MyFormInput
|
||||
formItemName={formItemName}
|
||||
minLength={Constants.GLOBALS.MIN_CALENDAR_FUTURE_BOOKING_DAYS}
|
||||
maxLength={appContext.paymentPlanSettings.maxEmployees}
|
||||
maxLength={maxLength}
|
||||
label={t("common.calendarMaxFutureBookingDays")}
|
||||
ruleMessageValueRequired={t(
|
||||
"common.inputRules.calendarMaxFutureBookingDaysRequired"
|
||||
|
@ -150,6 +150,7 @@ export function MyCalendarMaxFutureBookingDaysFormInput({
|
|||
|
||||
export function MyCalendarMinEarliestBookingTimeFormInput({
|
||||
formItem = "calendarMinEarliestBookingTime",
|
||||
maxLength,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
@ -157,7 +158,7 @@ export function MyCalendarMinEarliestBookingTimeFormInput({
|
|||
<MyFormInput
|
||||
formItemName={formItem}
|
||||
minLength={Constants.GLOBALS.MIN_CALENDAR_EARLIEST_BOOKING_TIME}
|
||||
maxLength={Constants.GLOBALS.MAX_CALENDAR_EARLIEST_BOOKING_TIME}
|
||||
maxLength={maxLength}
|
||||
label={t("common.calendarMinEarliestBookingTime")}
|
||||
ruleMessageValueRequired={t(
|
||||
"common.inputRules.calendarMinEarliestBookingTimeRequired"
|
||||
|
|
|
@ -17,7 +17,6 @@ import {
|
|||
myFetch,
|
||||
EncodeStringToBase64,
|
||||
showInputsInvalidNotification,
|
||||
Constants,
|
||||
showUnkownErrorNotification,
|
||||
} from "../../../utils";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
@ -383,13 +382,6 @@ function ModalAddEditEmployee({
|
|||
body.username = formUsername;
|
||||
}
|
||||
|
||||
console.log(
|
||||
"email",
|
||||
formEmail,
|
||||
modalOptions.selectedEmployee.email,
|
||||
formEmail !== modalOptions.selectedEmployee.email
|
||||
);
|
||||
|
||||
if (formEmail !== modalOptions.selectedEmployee.email) {
|
||||
validateFields.push("email");
|
||||
body.email = formEmail;
|
||||
|
@ -471,9 +463,13 @@ function ModalAddEditEmployee({
|
|||
</>
|
||||
)}
|
||||
|
||||
<MyCalendarMaxFutureBookingDaysFormInput />
|
||||
<MyCalendarMaxFutureBookingDaysFormInput
|
||||
maxLength={storeSettings.calendar_max_future_booking_days}
|
||||
/>
|
||||
|
||||
<MyCalendarMinEarliestBookingTimeFormInput />
|
||||
<MyCalendarMinEarliestBookingTimeFormInput
|
||||
maxLength={storeSettings.calendar_min_earliest_booking_time}
|
||||
/>
|
||||
</Form>
|
||||
</MyModal>
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue