Skip to content

Commit

Permalink
make rule type options labels reflect entityType
Browse files Browse the repository at this point in the history
  • Loading branch information
buckhalt committed Dec 4, 2024
1 parent 9c9d5dc commit 4c28785
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Query/Rules/EditEntityRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const EditEntityRule = ({
>
<DetachedField
component={RadioGroup}
options={entityRuleTypeOptions}
options={entityRuleTypeOptions(entityType)}
value={entityRuleType}
onChange={handleChangeEntityRuleType}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Query/Rules/withEntityRuleType.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const entityRuleTypes = {
TYPE_RULE,
};

const entityRuleTypeOptions = [
{ label: 'Attribute - rule based on the value of this alter type\'s attributes.', value: VARIABLE_RULE },
{ label: 'Presence - based on the presence or absence of this alter type in the interview network.', value: TYPE_RULE },
const entityRuleTypeOptions = (entityType) => [
{ label: `Attribute - rule based on the value of this ${entityType} type's attributes.`, value: VARIABLE_RULE },
{ label: `Presence - based on the presence or absence of this ${entityType} type in the interview network.`, value: TYPE_RULE },
];

const withEntityRuleType = compose(
Expand Down

0 comments on commit 4c28785

Please sign in to comment.