• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alkem-io / client-web / #7240

09 Apr 2024 02:41PM UTC coverage: 5.834%. First build
#7240

Pull #5793

travis-ci

Pull Request #5793: Spaces api: space settings replacing preferences space + challenge; account - space relationship

183 of 8908 branches covered (2.05%)

Branch coverage included in aggregate %.

25 of 164 new or added lines in 29 files covered. (15.24%)

1295 of 16426 relevant lines covered (7.88%)

0.19 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/domain/shared/icons/profileIcons.ts
1
import { ComponentType } from 'react';
2
import { ProfileType } from '@/core/apollo/generated/graphql-schema';
3
import { SvgIconProps } from '@mui/material';
4
import { CalendarIcon } from '@/domain/timeline/calendar/icons/CalendarIcon';
5
import { InnovationFlowIcon } from '@/domain/collaboration/InnovationFlow/InnovationFlowIcon/InnovationFlowIcon';
6
import {
7
  Campaign,
8
  ChatBubbleOutline,
9
  CorporateFareOutlined,
10
  Face5,
11
  Face6,
12
  HubOutlined,
13
  ImageNotSupportedOutlined,
14
  InventoryOutlined,
15
  PeopleAltOutlined,
16
  PersonOutline,
17
  SvgIconComponent,
18
} from '@mui/icons-material';
19
import {
20
  calloutFramingIcons,
21
  contributionIcons,
22
  GenericCalloutIcon,
×
23
} from '@/domain/collaboration/callout/icons/calloutIcons';
×
24
import { SpaceL0Icon } from '@/domain/space/icons/SpaceL0Icon';
25
import { warn } from '@/core/logging/sentry/log';
×
26

27
export const getProfileIcon = (profileType: ProfileType): ComponentType<SvgIconProps> => {
×
28
  switch (profileType) {
29
    case ProfileType.CalendarEvent:
×
30
      return CalendarIcon;
31
    case ProfileType.CalloutFraming:
×
32
      return GenericCalloutIcon;
33
    case ProfileType.Template:
×
34
      return Campaign;
35
    case ProfileType.Discussion:
×
36
      return ChatBubbleOutline;
37
    case ProfileType.InnovationFlow:
×
38
      return InnovationFlowIcon as SvgIconComponent;
39
    case ProfileType.InnovationHub:
×
40
      return HubOutlined;
41
    case ProfileType.InnovationPack:
×
42
      return InventoryOutlined;
43
    case ProfileType.Organization:
×
44
      return CorporateFareOutlined;
45
    case ProfileType.Post:
×
46
      return GenericCalloutIcon;
47
    case ProfileType.SpaceAbout:
×
48
      return SpaceL0Icon;
49
    case ProfileType.User:
×
50
      return PersonOutline;
51
    case ProfileType.UserGroup:
×
52
      return PeopleAltOutlined;
53
    case ProfileType.Whiteboard:
×
54
      return calloutFramingIcons.WHITEBOARD;
55
    case ProfileType.ContributionLink:
×
56
      return contributionIcons.LINK;
57
    case ProfileType.CommunityGuidelines:
×
58
      return GenericCalloutIcon; // TODO: Choose a more appropriate icon
59
    case ProfileType.VirtualPersona:
×
60
      return Face5; // TODO: Choose a more appropriate icon
61
    case ProfileType.VirtualContributor:
×
62
      return Face6; // TODO: Choose a more appropriate icon
NEW
63
    default: {
×
64
      warn(`Icon not specified for ProfileType ${profileType}`);
65
      return ImageNotSupportedOutlined;
66
    }
67
  }
68
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc