color theme
commit
4f392f5c6a
|
@ -126,15 +126,15 @@ export function MyEmailFormInput({
|
||||||
|
|
||||||
export function MyCalendarMaxFutureBookingDaysFormInput({
|
export function MyCalendarMaxFutureBookingDaysFormInput({
|
||||||
formItemName = "calendarMaxFutureBookingDays",
|
formItemName = "calendarMaxFutureBookingDays",
|
||||||
|
maxLength,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const appContext = useAppContext();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MyFormInput
|
<MyFormInput
|
||||||
formItemName={formItemName}
|
formItemName={formItemName}
|
||||||
minLength={Constants.GLOBALS.MIN_CALENDAR_FUTURE_BOOKING_DAYS}
|
minLength={Constants.GLOBALS.MIN_CALENDAR_FUTURE_BOOKING_DAYS}
|
||||||
maxLength={appContext.paymentPlanSettings.maxEmployees}
|
maxLength={maxLength}
|
||||||
label={t("common.calendarMaxFutureBookingDays")}
|
label={t("common.calendarMaxFutureBookingDays")}
|
||||||
ruleMessageValueRequired={t(
|
ruleMessageValueRequired={t(
|
||||||
"common.inputRules.calendarMaxFutureBookingDaysRequired"
|
"common.inputRules.calendarMaxFutureBookingDaysRequired"
|
||||||
|
@ -150,6 +150,7 @@ export function MyCalendarMaxFutureBookingDaysFormInput({
|
||||||
|
|
||||||
export function MyCalendarMinEarliestBookingTimeFormInput({
|
export function MyCalendarMinEarliestBookingTimeFormInput({
|
||||||
formItem = "calendarMinEarliestBookingTime",
|
formItem = "calendarMinEarliestBookingTime",
|
||||||
|
maxLength,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
@ -157,7 +158,7 @@ export function MyCalendarMinEarliestBookingTimeFormInput({
|
||||||
<MyFormInput
|
<MyFormInput
|
||||||
formItemName={formItem}
|
formItemName={formItem}
|
||||||
minLength={Constants.GLOBALS.MIN_CALENDAR_EARLIEST_BOOKING_TIME}
|
minLength={Constants.GLOBALS.MIN_CALENDAR_EARLIEST_BOOKING_TIME}
|
||||||
maxLength={Constants.GLOBALS.MAX_CALENDAR_EARLIEST_BOOKING_TIME}
|
maxLength={maxLength}
|
||||||
label={t("common.calendarMinEarliestBookingTime")}
|
label={t("common.calendarMinEarliestBookingTime")}
|
||||||
ruleMessageValueRequired={t(
|
ruleMessageValueRequired={t(
|
||||||
"common.inputRules.calendarMinEarliestBookingTimeRequired"
|
"common.inputRules.calendarMinEarliestBookingTimeRequired"
|
||||||
|
|
|
@ -106,7 +106,6 @@ export function SideMenuContent({
|
||||||
};
|
};
|
||||||
|
|
||||||
const showPaymentPlanInfoBanner =
|
const showPaymentPlanInfoBanner =
|
||||||
sideBarContext.permissions.includes("paymentPlan") &&
|
|
||||||
sideBarContext.paymentPlanStatus === "trialing" &&
|
sideBarContext.paymentPlanStatus === "trialing" &&
|
||||||
sideBarContext.paymentPlanTrialEnd !== null &&
|
sideBarContext.paymentPlanTrialEnd !== null &&
|
||||||
sideBarContext.paymentPlanCanceledAt !== null;
|
sideBarContext.paymentPlanCanceledAt !== null;
|
||||||
|
@ -129,7 +128,10 @@ export function SideMenuContent({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!showPaymentPlanInfoBanner) {
|
if (
|
||||||
|
sideBarContext.permissions.includes("paymentPlan") &&
|
||||||
|
!showPaymentPlanInfoBanner
|
||||||
|
) {
|
||||||
items.push({
|
items.push({
|
||||||
label: t("sideMenu.paymentPlan"),
|
label: t("sideMenu.paymentPlan"),
|
||||||
icon: <WalletOutlined />,
|
icon: <WalletOutlined />,
|
||||||
|
@ -240,7 +242,8 @@ export function SideMenuContent({
|
||||||
<div>
|
<div>
|
||||||
<Divider style={{ margin: 0 }} />
|
<Divider style={{ margin: 0 }} />
|
||||||
|
|
||||||
{showPaymentPlanInfoBanner && (
|
{sideBarContext.permissions.includes("paymentPlan") &&
|
||||||
|
showPaymentPlanInfoBanner && (
|
||||||
<Card
|
<Card
|
||||||
style={{ backgroundColor: AppStyle.colors.primary, margin: 8 }}
|
style={{ backgroundColor: AppStyle.colors.primary, margin: 8 }}
|
||||||
styles={{ body: { padding: 10 } }}
|
styles={{ body: { padding: 10 } }}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import {
|
||||||
myFetch,
|
myFetch,
|
||||||
EncodeStringToBase64,
|
EncodeStringToBase64,
|
||||||
showInputsInvalidNotification,
|
showInputsInvalidNotification,
|
||||||
Constants,
|
|
||||||
showUnkownErrorNotification,
|
showUnkownErrorNotification,
|
||||||
} from "../../../utils";
|
} from "../../../utils";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
@ -383,13 +382,6 @@ function ModalAddEditEmployee({
|
||||||
body.username = formUsername;
|
body.username = formUsername;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
|
||||||
"email",
|
|
||||||
formEmail,
|
|
||||||
modalOptions.selectedEmployee.email,
|
|
||||||
formEmail !== modalOptions.selectedEmployee.email
|
|
||||||
);
|
|
||||||
|
|
||||||
if (formEmail !== modalOptions.selectedEmployee.email) {
|
if (formEmail !== modalOptions.selectedEmployee.email) {
|
||||||
validateFields.push("email");
|
validateFields.push("email");
|
||||||
body.email = formEmail;
|
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>
|
</Form>
|
||||||
</MyModal>
|
</MyModal>
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in New Issue