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

Update/v1.14.3 #7

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/components/form/timeout/TimeoutControl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe(TimeoutControl.name, () => {

it('handles initial values', () => {
const { wrapper, instance } = setup(true, {
timeout: { $set: 60 },
timeout: { $set: 15 },
onChanged: setMock()
});

Expand Down
3 changes: 3 additions & 0 deletions src/components/form/timeout/TimeoutControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import TembaSelect, { TembaSelectStyle } from 'temba/TembaSelect';
import { SelectOption } from '../select/SelectElement';

export const TIMEOUT_OPTIONS: SelectOption[] = [
{ value: '15', name: i18n.t('forms.timeout_15 seconds', '15 seconds') },
{ value: '30', name: i18n.t('forms.timeout_30 seconds', '30 seconds') },
{ value: '45', name: i18n.t('forms.timeout_45 seconds', '45 seconds') },
{ value: '60', name: i18n.t('forms.timeout_1 minute', '1 minute') },
{ value: '120', name: i18n.t('forms.timeout_2 minutes', '2 minutes') },
{ value: '180', name: i18n.t('forms.timeout_3 minutes', '3 minutes') },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ exports[`TimeoutControl handles initial values 1`] = `
onChange={[Function]}
options={
Array [
Object {
"name": "15 seconds",
"value": "15",
},
Object {
"name": "30 seconds",
"value": "30",
},
Object {
"name": "45 seconds",
"value": "45",
},
Object {
"name": "1 minute",
"value": "60",
Expand Down Expand Up @@ -96,8 +108,8 @@ exports[`TimeoutControl handles initial values 1`] = `
style="small"
value={
Object {
"name": "1 minute",
"value": "60",
"name": "15 seconds",
"value": "15",
}
}
/>
Expand Down Expand Up @@ -125,12 +137,12 @@ exports[`TimeoutControl renders 1`] = `

exports[`TimeoutControl updates: check 1`] = `
Array [
300,
120,
]
`;

exports[`TimeoutControl updates: update 1`] = `
Array [
300,
120,
]
`;
3 changes: 3 additions & 0 deletions src/config/i18n/pt-br/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,17 @@
"timeout_10 minutes": "10 minutos",
"timeout_12 hours": "12 horas",
"timeout_15 minutes": "15 minutos",
"timeout_15 seconds": "15 segundos",
"timeout_18 hours": "18 horas",
"timeout_2 days": "2 dias",
"timeout_2 hours": "2 horas",
"timeout_2 minutes": " 2 minutos",
"timeout_3 days": "3 dias",
"timeout_30 seconds": "30 segundos",
"timeout_3 hours": "3 horas",
"timeout_3 minutes": "3 minutos",
"timeout_4 minutes": "4 minutos",
"timeout_45 seconds": "45 segundos",
"timeout_5 minutes": "5 minutos",
"timeout_6 hours": "6 horas",
"today": "hoje",
Expand Down