Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/subscription sched validation #556

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading