From 0fe6d404b9324249d4f2fcf7311c31841b7ac26c Mon Sep 17 00:00:00 2001 From: iamsivin Date: Mon, 11 Nov 2024 21:07:12 +0530 Subject: [PATCH] feat: Contact attributes --- .../ContactCustomAttributeItem.vue | 95 +++++++++ .../ContactCustomAttributes.vue | 130 ++++++++++++ .../Contacts/Pages/ContactDetails.vue | 4 +- .../CustomAttributes/CheckboxAttribute.vue | 48 +++++ .../CustomAttributes/DateAttribute.vue | 124 ++++++++++++ .../CustomAttributes/ListAttribute.vue | 101 ++++++++++ .../CustomAttributes/OtherAttribute.vue | 186 ++++++++++++++++++ .../components-next/button/Button.vue | 4 +- .../dropdown-menu/DropdownMenu.vue | 10 +- .../dashboard/components-next/input/Input.vue | 29 ++- .../dashboard/i18n/locale/en/contact.json | 24 +++ .../pages/EditContactsPageRouteView.vue | 6 +- 12 files changed, 750 insertions(+), 11 deletions(-) create mode 100644 app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributeItem.vue create mode 100644 app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributes.vue create mode 100644 app/javascript/dashboard/components-next/CustomAttributes/CheckboxAttribute.vue create mode 100644 app/javascript/dashboard/components-next/CustomAttributes/DateAttribute.vue create mode 100644 app/javascript/dashboard/components-next/CustomAttributes/ListAttribute.vue create mode 100644 app/javascript/dashboard/components-next/CustomAttributes/OtherAttribute.vue diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributeItem.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributeItem.vue new file mode 100644 index 000000000..65277ebb3 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributeItem.vue @@ -0,0 +1,95 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributes.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributes.vue new file mode 100644 index 000000000..8891ee0bb --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributes.vue @@ -0,0 +1,130 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue b/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue index 127703927..e43fb92c9 100644 --- a/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue +++ b/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue @@ -109,8 +109,8 @@ const handleAvatarDelete = async () => {
+ + + diff --git a/app/javascript/dashboard/components-next/CustomAttributes/DateAttribute.vue b/app/javascript/dashboard/components-next/CustomAttributes/DateAttribute.vue new file mode 100644 index 000000000..364e193c5 --- /dev/null +++ b/app/javascript/dashboard/components-next/CustomAttributes/DateAttribute.vue @@ -0,0 +1,124 @@ + + + + diff --git a/app/javascript/dashboard/components-next/CustomAttributes/ListAttribute.vue b/app/javascript/dashboard/components-next/CustomAttributes/ListAttribute.vue new file mode 100644 index 000000000..a4da94a23 --- /dev/null +++ b/app/javascript/dashboard/components-next/CustomAttributes/ListAttribute.vue @@ -0,0 +1,101 @@ + + + + diff --git a/app/javascript/dashboard/components-next/CustomAttributes/OtherAttribute.vue b/app/javascript/dashboard/components-next/CustomAttributes/OtherAttribute.vue new file mode 100644 index 000000000..d5ba437ea --- /dev/null +++ b/app/javascript/dashboard/components-next/CustomAttributes/OtherAttribute.vue @@ -0,0 +1,186 @@ + + + + diff --git a/app/javascript/dashboard/components-next/button/Button.vue b/app/javascript/dashboard/components-next/button/Button.vue index 5c1a888a9..02dcfad53 100644 --- a/app/javascript/dashboard/components-next/button/Button.vue +++ b/app/javascript/dashboard/components-next/button/Button.vue @@ -6,7 +6,7 @@ import Icon from 'dashboard/components-next/icon/Icon.vue'; const props = defineProps({ label: { - type: String, + type: [String, Number], default: '', }, variant: { @@ -47,7 +47,7 @@ const STYLE_CONFIG = { blue: { solid: 'bg-n-brand text-white hover:brightness-110 outline-transparent', faded: - 'bg-n-brand/10 text-n-slate-12 hover:bg-n-brand/20 outline-transparent', + 'bg-n-brand/10 text-n-blue-text hover:bg-n-brand/20 outline-transparent', outline: 'text-n-blue-text outline-n-blue-border', link: 'text-n-blue-text hover:underline outline-transparent', }, diff --git a/app/javascript/dashboard/components-next/dropdown-menu/DropdownMenu.vue b/app/javascript/dashboard/components-next/dropdown-menu/DropdownMenu.vue index 079ff3be9..4efa9a61b 100644 --- a/app/javascript/dashboard/components-next/dropdown-menu/DropdownMenu.vue +++ b/app/javascript/dashboard/components-next/dropdown-menu/DropdownMenu.vue @@ -1,5 +1,5 @@