From 9ea992fe4591cbb115ed325bda05690758cfdb1b Mon Sep 17 00:00:00 2001 From: iamsivin Date: Fri, 15 Nov 2024 02:06:20 +0530 Subject: [PATCH] feat(v4): Compose new conversation --- .../Contacts/ContactsCard/ContactsCard.vue | 2 - .../ContactsForm/ComposeConversation.vue | 87 ++++ .../ContactsForm/CreateNewContactDialog.vue | 2 +- .../Contacts/ContactsLayout.vue | 7 +- .../ArticleEditorProperties.vue | 2 +- .../ComposeNewConversation.vue | 420 ++++++++++++++++++ .../components/ActionButtons.vue | 154 +++++++ .../components/ContactSelector.vue | 107 +++++ .../components/EmailOptions.vue | 149 +++++++ .../components/InboxSelector.vue | 100 +++++ .../components/MessageEditor.vue | 42 ++ .../components/WhatsAppOptions.vue | 113 +++++ .../components/WhatsappTemplateParser.vue | 128 ++++++ .../dropdown-menu/DropdownMenu.vue | 11 +- .../inline-input/InlineInput.vue | 41 +- .../components-next/taginput/TagInput.vue | 217 +++++++-- .../components-next/textarea/TextArea.vue | 2 +- .../dashboard/i18n/locale/en/components.json | 3 +- .../dashboard/i18n/locale/en/contact.json | 1 + .../pages/EditContactsPageRouteView.vue | 8 +- .../conversation/contact/ConversationForm.vue | 6 +- .../store/modules/contacts/actions.js | 4 +- 22 files changed, 1544 insertions(+), 62 deletions(-) create mode 100644 app/javascript/dashboard/components-next/Contacts/ContactsForm/ComposeConversation.vue create mode 100644 app/javascript/dashboard/components-next/NewConversation/ComposeNewConversation.vue create mode 100644 app/javascript/dashboard/components-next/NewConversation/components/ActionButtons.vue create mode 100644 app/javascript/dashboard/components-next/NewConversation/components/ContactSelector.vue create mode 100644 app/javascript/dashboard/components-next/NewConversation/components/EmailOptions.vue create mode 100644 app/javascript/dashboard/components-next/NewConversation/components/InboxSelector.vue create mode 100644 app/javascript/dashboard/components-next/NewConversation/components/MessageEditor.vue create mode 100644 app/javascript/dashboard/components-next/NewConversation/components/WhatsAppOptions.vue create mode 100644 app/javascript/dashboard/components-next/NewConversation/components/WhatsappTemplateParser.vue diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.vue b/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.vue index 485566c38..92d26e90d 100644 --- a/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.vue +++ b/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.vue @@ -44,8 +44,6 @@ const ROUTE_MAPPINGS = { }; const onClickViewDetails = async () => { - await store.dispatch('contacts/show', { id: props.id }); - const dynamicRouteName = ROUTE_MAPPINGS[route.name] || 'contacts_dashboard_edit_index'; diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/ComposeConversation.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ComposeConversation.vue new file mode 100644 index 000000000..aa1ad5165 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ComposeConversation.vue @@ -0,0 +1,87 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateNewContactDialog.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateNewContactDialog.vue index 6bdec6b8d..add91350d 100644 --- a/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateNewContactDialog.vue +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateNewContactDialog.vue @@ -43,7 +43,7 @@ defineExpose({ dialogRef });