Skip to content

Commit

Permalink
fix/subscription sched validation (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardZaydler authored Oct 23, 2024
1 parent a51ed3c commit 8a474de
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Components/SubscriptionEditor/SubscriptionEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import CodeRef from "../CodeRef/CodeRef";
import HelpTooltip from "../HelpTooltip/HelpTooltip";
import { ConfigState } from "../../store/selectors";
import { useAppSelector } from "../../store/hooks";
import { validateSched } from "../TriggerEditForm/Validations/validations";
import classNames from "classnames/bind";

import styles from "./SubscriptionEditor.less";
Expand Down Expand Up @@ -165,10 +166,15 @@ const SubscriptionEditor: FC<TSubscriptionEditorProps> = ({
<div className={cn("row")}>
<div className={cn("caption")}>Delivery schedule:</div>
<div className={cn("value")}>
<ScheduleEdit
schedule={subscription.sched}
onChange={(value: Schedule) => onChange({ sched: value })}
/>
<ValidationWrapperV1
validationInfo={validateSched(subscription.sched)}
renderMessage={tooltip("right top")}
>
<ScheduleEdit
schedule={subscription.sched}
onChange={(value: Schedule) => onChange({ sched: value })}
/>
</ValidationWrapperV1>
</div>
</div>
<div className={cn("row")}>
Expand Down

0 comments on commit 8a474de

Please sign in to comment.