fix: custom-cron-ui (#15786)
Fixes #14723 ### Summary Fixes a UI while creating a custom CRON ### Changes Made - updated `WorkflowEditTriggerCronForm.tsx` to use the predefined `FormSelectFieldInput.tsx` instead of using `Select.tsx` - added `hint` prop to `FormSelectFieldInput.tsx` - updated styling for showing `Upcoming execution time` - added conditional render for `Schedule` and `Upcoming Execution Time` - `Schedule` section is not rendered in Custom Cron ### Steps to Reproduce (Before Fix) 1. Navigate to - /object/workflow/xxxx 2. Try adding a new Trigger 3. Set Trigger Interval to Cron (Custom) ### Before  ### After  --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+4
@@ -3,6 +3,7 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/fo
|
||||
import { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';
|
||||
import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';
|
||||
import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';
|
||||
import { InputHint } from '@/ui/input/components/InputHint';
|
||||
import { InputLabel } from '@/ui/input/components/InputLabel';
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||
@@ -18,6 +19,7 @@ import { type SelectOption } from 'twenty-ui/input';
|
||||
|
||||
type FormSelectFieldInputProps = {
|
||||
label?: string;
|
||||
hint?: string;
|
||||
defaultValue: string | undefined;
|
||||
onChange: (value: string | null) => void;
|
||||
VariablePicker?: VariablePickerComponent;
|
||||
@@ -27,6 +29,7 @@ type FormSelectFieldInputProps = {
|
||||
|
||||
export const FormSelectFieldInput = ({
|
||||
label,
|
||||
hint,
|
||||
defaultValue,
|
||||
onChange,
|
||||
VariablePicker,
|
||||
@@ -162,6 +165,7 @@ export const FormSelectFieldInput = ({
|
||||
/>
|
||||
)}
|
||||
</FormFieldInputRowContainer>
|
||||
{hint && <InputHint>{hint}</InputHint>}
|
||||
</FormFieldInputContainer>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user