From d35e8cfd987154aea3214b620a7e11fb01cce609 Mon Sep 17 00:00:00 2001 From: Nithin David Thomas Date: Thu, 13 May 2021 15:40:36 +0530 Subject: [PATCH] feat: Creates component show all contact info (#2252) * feat: Adds component to show contact fields * feat: Creates component show all contact info --- .../contact/components/ContactIntro.vue | 8 ++- .../contact/components/ContactPanel.vue | 62 +++++++++++++++++++ .../contact}/components/ManageLayout.vue | 24 +++++-- .../contacts/pages/ContactManageView.vue | 4 +- 4 files changed, 90 insertions(+), 8 deletions(-) create mode 100644 app/javascript/dashboard/modules/contact/components/ContactPanel.vue rename app/javascript/dashboard/{routes/dashboard/contacts => modules/contact}/components/ManageLayout.vue (63%) diff --git a/app/javascript/dashboard/modules/contact/components/ContactIntro.vue b/app/javascript/dashboard/modules/contact/components/ContactIntro.vue index c5c304ccc..42bc7849d 100644 --- a/app/javascript/dashboard/modules/contact/components/ContactIntro.vue +++ b/app/javascript/dashboard/modules/contact/components/ContactIntro.vue @@ -13,8 +13,8 @@

{{ contact.title }} - - {{ contact.company.name }} + + {{ company.name }}

{{ additionalAttributes.description }} @@ -69,6 +69,10 @@ export default { return { twitter: twitterScreenName, ...(socialProfiles || {}) }; }, + company() { + const { company = {} } = this.contact; + return company; + }, }, methods: { onEditClick() { diff --git a/app/javascript/dashboard/modules/contact/components/ContactPanel.vue b/app/javascript/dashboard/modules/contact/components/ContactPanel.vue new file mode 100644 index 000000000..3deeee7ff --- /dev/null +++ b/app/javascript/dashboard/modules/contact/components/ContactPanel.vue @@ -0,0 +1,62 @@ + + + + diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ManageLayout.vue b/app/javascript/dashboard/modules/contact/components/ManageLayout.vue similarity index 63% rename from app/javascript/dashboard/routes/dashboard/contacts/components/ManageLayout.vue rename to app/javascript/dashboard/modules/contact/components/ManageLayout.vue index 2ba7c67ea..87884e14e 100644 --- a/app/javascript/dashboard/routes/dashboard/contacts/components/ManageLayout.vue +++ b/app/javascript/dashboard/modules/contact/components/ManageLayout.vue @@ -1,6 +1,8 @@