2
0

(setVariable) Add timezone option for dates

Closes #1251
This commit is contained in:
Baptiste Arnaud
2024-02-16 10:07:29 +01:00
parent 07240e6d4b
commit 3e0d3e7724
9 changed files with 250 additions and 33 deletions

View File

@ -200,14 +200,24 @@ const SetVariableValue = ({
</Alert>
)
}
case 'Now':
case 'Yesterday':
case 'Tomorrow': {
return (
<TextInput
direction="row"
label="Timezone"
onChange={(timeZone) => onOptionsChange({ ...options, timeZone })}
defaultValue={options.timeZone}
placeholder="Europe/Paris"
/>
)
}
case 'Contact name':
case 'Phone number':
case 'Random ID':
case 'Now':
case 'Today':
case 'Tomorrow':
case 'User ID':
case 'Yesterday':
case 'Today':
case 'Empty':
return null
}

View File

@ -554,10 +554,32 @@
"type": {
"type": "string",
"enum": [
"Today",
"Now",
"Yesterday",
"Tomorrow",
"Tomorrow"
]
},
"timeZone": {
"type": "string"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isExecutedOnClient": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Today",
"Moment of the day",
"Empty",
"Environment name",
@ -4926,10 +4948,32 @@
"type": {
"type": "string",
"enum": [
"Today",
"Now",
"Yesterday",
"Tomorrow",
"Tomorrow"
]
},
"timeZone": {
"type": "string"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isExecutedOnClient": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Today",
"Moment of the day",
"Empty",
"Environment name",
@ -8349,10 +8393,32 @@
"type": {
"type": "string",
"enum": [
"Today",
"Now",
"Yesterday",
"Tomorrow",
"Tomorrow"
]
},
"timeZone": {
"type": "string"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isExecutedOnClient": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Today",
"Moment of the day",
"Empty",
"Environment name",
@ -16835,10 +16901,32 @@
"type": {
"type": "string",
"enum": [
"Today",
"Now",
"Yesterday",
"Tomorrow",
"Tomorrow"
]
},
"timeZone": {
"type": "string"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isExecutedOnClient": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Today",
"Moment of the day",
"Empty",
"Environment name",
@ -20325,10 +20413,32 @@
"type": {
"type": "string",
"enum": [
"Today",
"Now",
"Yesterday",
"Tomorrow",
"Tomorrow"
]
},
"timeZone": {
"type": "string"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isExecutedOnClient": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Today",
"Moment of the day",
"Empty",
"Environment name",
@ -23122,10 +23232,32 @@
"type": {
"type": "string",
"enum": [
"Today",
"Now",
"Yesterday",
"Tomorrow",
"Tomorrow"
]
},
"timeZone": {
"type": "string"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isExecutedOnClient": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Today",
"Moment of the day",
"Empty",
"Environment name",

View File

@ -3621,10 +3621,32 @@
"type": {
"type": "string",
"enum": [
"Today",
"Now",
"Yesterday",
"Tomorrow",
"Tomorrow"
]
},
"timeZone": {
"type": "string"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isExecutedOnClient": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Today",
"Moment of the day",
"Empty",
"Environment name",
@ -7403,10 +7425,32 @@
"type": {
"type": "string",
"enum": [
"Today",
"Now",
"Yesterday",
"Tomorrow",
"Tomorrow"
]
},
"timeZone": {
"type": "string"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isExecutedOnClient": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Today",
"Moment of the day",
"Empty",
"Environment name",