diff --git a/.codeclimate.yml b/.codeclimate.yml
index 6365ca706..bc58a4029 100644
--- a/.codeclimate.yml
+++ b/.codeclimate.yml
@@ -30,3 +30,6 @@ exclude_patterns:
- "**/*.md"
- "**/*.yml"
- "app/javascript/dashboard/i18n/locale"
+ - "stories/**/*"
+ - "**/*.stories.js"
+ - "**/stories/"
diff --git a/app/javascript/dashboard/modules/contact/components/ContactAttribute.vue b/app/javascript/dashboard/modules/contact/components/ContactAttribute.vue
new file mode 100644
index 000000000..854e87495
--- /dev/null
+++ b/app/javascript/dashboard/modules/contact/components/ContactAttribute.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/modules/contact/stories/ContactAttribute.stories.js b/app/javascript/dashboard/modules/contact/stories/ContactAttribute.stories.js
new file mode 100644
index 000000000..0f75af150
--- /dev/null
+++ b/app/javascript/dashboard/modules/contact/stories/ContactAttribute.stories.js
@@ -0,0 +1,43 @@
+import ContactAttribute from '../components/ContactAttribute';
+import { action } from '@storybook/addon-actions';
+
+export default {
+ title: 'Components/Contact/ContactAttribute',
+ component: ContactAttribute,
+ argTypes: {
+ label: {
+ defaultValue: 'Email',
+ control: {
+ type: 'text',
+ },
+ },
+ value: {
+ defaultValue: 'dwight@schrute.farms',
+ control: {
+ type: 'text',
+ },
+ },
+ icon: {
+ defaultValue: 'ion-email',
+ control: {
+ type: 'text',
+ },
+ },
+ showEdit: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ },
+};
+
+const Template = (args, { argTypes }) => ({
+ props: Object.keys(argTypes),
+ components: { ContactAttribute },
+ template: '',
+});
+
+export const DefaultAttribute = Template.bind({});
+DefaultAttribute.args = {
+ onEdit: action('edit'),
+};
diff --git a/app/javascript/shared/components/EmojiOrIcon.vue b/app/javascript/shared/components/EmojiOrIcon.vue
index fdba285f0..0e9667912 100644
--- a/app/javascript/shared/components/EmojiOrIcon.vue
+++ b/app/javascript/shared/components/EmojiOrIcon.vue
@@ -14,7 +14,7 @@ export default {
computed: {
...mapGetters({ uiSettings: 'getUISettings' }),
isIconTypeEmoji() {
- const { icon_type: iconType } = this.uiSettings;
+ const { icon_type: iconType } = this.uiSettings || {};
return iconType === 'emoji';
},
showEmoji() {