Skip to content

Commit

Permalink
feat: move and rename 'scope' component (#890)
Browse files Browse the repository at this point in the history
* feat: move and rename 'scope' component in external and calculated variable form
MailineN authored Dec 20, 2024
1 parent fe22b67 commit 89466ea
Showing 4 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/constants/dictionary.js
Original file line number Diff line number Diff line change
@@ -149,7 +149,7 @@ const dictionary = {
},
Scope: {
en: 'Scope',
fr: 'Portée',
fr: 'Niveau de calcul',
},
question: {
en: 'Question',
3 changes: 1 addition & 2 deletions src/model/transformations/external-variable.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { describe, expect, it } from 'vitest';

import { remoteToStore, storeToRemote } from './external-variable';

import { DATATYPE_NAME } from '../../constants/pogues-constants';
import { remoteToStore, storeToRemote } from './external-variable';

const { TEXT, NUMERIC } = DATATYPE_NAME;

Original file line number Diff line number Diff line change
@@ -86,6 +86,12 @@ const CalculatedVariables = ({
required
setDisableValidation={setDisableValidation}
/>
<Field name="scope" component={Select} label={Dictionary.Scope}>
<GenericOption key="" value="">
{Dictionary.selectScope}
</GenericOption>
{scopes}
</Field>
<SelectorView
label={Dictionary.responseType}
selectorPath={selectorPath}
@@ -105,12 +111,6 @@ const CalculatedVariables = ({
</View>
<View key={BOOLEAN} value={BOOLEAN} label={Dictionary.BOOLEAN} />
</SelectorView>
<Field name="scope" component={Select} label={Dictionary.Scope}>
<GenericOption key="" value="">
{Dictionary.selectScope}
</GenericOption>
{scopes}
</Field>
</ListWithInputPanel>
</FormSection>
);
Original file line number Diff line number Diff line change
@@ -76,6 +76,12 @@ function ExternalVariables({
label={Dictionary.name}
required
/>
<Field name="scope" component={Select} label={Dictionary.Scope}>
<GenericOption key="" value="">
{Dictionary.selectScope}
</GenericOption>
{scopes}
</Field>
<SelectorView
label={Dictionary.responseType}
selectorPath={selectorPath}
@@ -95,12 +101,6 @@ function ExternalVariables({
</View>
<View key={BOOLEAN} value={BOOLEAN} label={Dictionary.BOOLEAN} />
</SelectorView>
<Field name="scope" component={Select} label={Dictionary.Scope}>
<GenericOption key="" value="">
{Dictionary.selectScope}
</GenericOption>
{scopes}
</Field>
</ListWithInputPanel>
</FormSection>
);

0 comments on commit 89466ea

Please sign in to comment.