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 

![Screenshot 2025-11-13 at 4 00
29 PM](https://github.com/user-attachments/assets/f85ab0fa-cb71-4257-9659-10e1404f17ed)


### After

![Screenshot 2025-11-13 at 4 00
55 PM](https://github.com/user-attachments/assets/db1d54ef-e5d5-42e2-9de5-c1f91f46088e)

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Aryan Bhati
2025-11-17 22:33:41 +05:30
committed by GitHub
parent 2a44bde848
commit 8d7ee47ec5
6 changed files with 115 additions and 77 deletions
@@ -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>
);
};