Skip to content
Snippets Groups Projects

Feature/search drugs details

Merged Mateusz Bolewski requested to merge feature/search-drugs-details into development
2 unresolved threads

Created new component for Drugs details (it will be also used for Chemicals details) and displayed pins for drugs.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
5 5 export const drugsSelector = createSelector(rootSelector, state => state.drugs);
6 6
7 7 export const loadingDrugsStatusSelector = createSelector(drugsSelector, state => state.loading);
8 export const numberOfDrugsSelector = createSelector(drugsSelector, state =>
9 state.data ? state.data.length : SIZE_OF_EMPTY_ARRAY,
10 );
8 export const numberOfDrugsSelector = createSelector(drugsSelector, state => {
9 if (!state.data) {
10 return SIZE_OF_EMPTY_ARRAY;
11 }
12
13 let numberOfDrugs = 0;
  • 10 return name;
    11 };
    12
    13 export const getEntityDescriptions = (pinsList: PinItem[]): string => {
    14 let description = '';
    15
    16 pinsList.forEach(element => {
    17 if ('description' in element.data) {
    18 description += element.data.description;
    19 }
    20 });
    21
    22 return description;
    23 };
    24
    25 export const getEntitySynonyms = (pinsList: PinItem[]): string => {
  • RFC: readability of functions and lack of ES6 syntax usage is rfc from my side overall LGTM

  • Tadeusz Miesiąc approved this merge request

    approved this merge request

  • added 1 commit

    • 6a6d495e - feat(search): code review fixes

    Compare with previous version

  • Mateusz Bolewski mentioned in commit e8e61c10

    mentioned in commit e8e61c10

  • Please register or sign in to reply
    Loading