Add UTC timezone label to CRON trigger form (#14674)
- Added 'Cron will be triggered at UTC time' notice below trigger interval dropdown - Positioned correctly between dropdown and expression field to match design - Only shows when Custom CRON option is selected --------- Co-authored-by: Félix Malfait <felix@twenty.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { isListValue } from '../isListValue';
|
||||
|
||||
describe('isListValue', () => {
|
||||
it('should detect list values', () => {
|
||||
expect(isListValue('1,2,3')).toBe(true);
|
||||
expect(isListValue('0,15,30,45')).toBe(true);
|
||||
expect(isListValue('1,5')).toBe(true);
|
||||
});
|
||||
|
||||
it('should reject non-list values', () => {
|
||||
expect(isListValue('*')).toBe(false);
|
||||
expect(isListValue('*/5')).toBe(false);
|
||||
expect(isListValue('1-5')).toBe(false);
|
||||
expect(isListValue('15')).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import { isNumericRange } from '../isNumericRange';
|
||||
|
||||
describe('isNumericRange', () => {
|
||||
it('should detect numeric ranges', () => {
|
||||
expect(isNumericRange('1-5')).toBe(true);
|
||||
expect(isNumericRange('10-20')).toBe(true);
|
||||
expect(isNumericRange('0-59')).toBe(true);
|
||||
});
|
||||
|
||||
it('should detect single numbers', () => {
|
||||
expect(isNumericRange('15')).toBe(true);
|
||||
expect(isNumericRange('0')).toBe(true);
|
||||
});
|
||||
|
||||
it('should reject non-numeric ranges', () => {
|
||||
expect(isNumericRange('*')).toBe(false);
|
||||
expect(isNumericRange('*/5')).toBe(false);
|
||||
expect(isNumericRange('1,2,3')).toBe(false);
|
||||
expect(isNumericRange('invalid')).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { isStepValue } from '../isStepValue';
|
||||
|
||||
describe('isStepValue', () => {
|
||||
it('should detect step values', () => {
|
||||
expect(isStepValue('*/5')).toBe(true);
|
||||
expect(isStepValue('1-10/2')).toBe(true);
|
||||
expect(isStepValue('0-59/15')).toBe(true);
|
||||
});
|
||||
|
||||
it('should reject non-step values', () => {
|
||||
expect(isStepValue('*')).toBe(false);
|
||||
expect(isStepValue('1-5')).toBe(false);
|
||||
expect(isStepValue('1,2,3')).toBe(false);
|
||||
expect(isStepValue('15')).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
export const isListValue = (value: string): boolean => {
|
||||
return isDefined(value) && value.includes(',');
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
export const isNumericRange = (value: string): boolean => {
|
||||
return isDefined(value) && /^\d+(-\d+)?$/.test(value);
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
export const isStepValue = (value: string): boolean => {
|
||||
return isDefined(value) && value.includes('/');
|
||||
};
|
||||
Reference in New Issue
Block a user