-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1825 from aziontech/UXE-4771-implement-a-feature-…
…to-display-the-5-most-used-fields [UXE-4771] feat: implement a feature to display the 5 most used fields
- Loading branch information
Showing
6 changed files
with
256 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import GetRelevantField from './relevant-fields' | ||
|
||
export { GetRelevantField } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { FILTERS_RULES } from '@/helpers' | ||
|
||
/** | ||
* Check if the given field is relevant in the specified dataset. | ||
* | ||
* @param {string} fieldName - The name of the field to check. | ||
* @param {string} dataset - The dataset to check against. | ||
* @return {number} The index of the relevant field, or -1 if not relevant. | ||
*/ | ||
export default function GetRelevantField(fieldName, dataset) { | ||
const fieldsRelevant = FILTERS_RULES.MOST_RELEVANT_FIELDS[dataset] || [] | ||
return fieldsRelevant.indexOf(fieldName) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters