From db6f08c12b30b7d4c8fcb57bb11b62a84bce1d45 Mon Sep 17 00:00:00 2001 From: iamsivin Date: Wed, 6 Nov 2024 17:51:03 +0530 Subject: [PATCH] feat: Contact history --- .../ConversationCard/CardLabels.vue | 95 ++++ .../ConversationCard/CardMessagePreview.vue | 59 +++ .../CardMessagePreviewWithMeta.vue | 86 ++++ .../ConversationCard/CardPriorityIcon.vue | 207 ++++++++ .../ConversationCard.story.vue | 477 ++++++++++++++++++ .../ConversationCard/ConversationCard.vue | 99 ++++ .../ConversationCard/SLACardLabel.vue | 81 +++ .../pages/EditContactsPageRouteView.vue | 4 +- app/javascript/histoire.setup.ts | 2 + 9 files changed, 1108 insertions(+), 2 deletions(-) create mode 100644 app/javascript/dashboard/components-next/Conversation/ConversationCard/CardLabels.vue create mode 100644 app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue create mode 100644 app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreviewWithMeta.vue create mode 100644 app/javascript/dashboard/components-next/Conversation/ConversationCard/CardPriorityIcon.vue create mode 100644 app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.story.vue create mode 100644 app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.vue create mode 100644 app/javascript/dashboard/components-next/Conversation/ConversationCard/SLACardLabel.vue diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardLabels.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardLabels.vue new file mode 100644 index 000000000..dfd4115e8 --- /dev/null +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardLabels.vue @@ -0,0 +1,95 @@ + + + diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue new file mode 100644 index 000000000..6cd8bc59e --- /dev/null +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue @@ -0,0 +1,59 @@ + + + diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreviewWithMeta.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreviewWithMeta.vue new file mode 100644 index 000000000..84fd2ae51 --- /dev/null +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreviewWithMeta.vue @@ -0,0 +1,86 @@ + + + diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardPriorityIcon.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardPriorityIcon.vue new file mode 100644 index 000000000..d51764ef5 --- /dev/null +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardPriorityIcon.vue @@ -0,0 +1,207 @@ + + + + diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.story.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.story.vue new file mode 100644 index 000000000..93c76f5c7 --- /dev/null +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.story.vue @@ -0,0 +1,477 @@ + + + diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.vue new file mode 100644 index 000000000..34a35098b --- /dev/null +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.vue @@ -0,0 +1,99 @@ + + + diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/SLACardLabel.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/SLACardLabel.vue new file mode 100644 index 000000000..85889df76 --- /dev/null +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/SLACardLabel.vue @@ -0,0 +1,81 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/contact/pages/EditContactsPageRouteView.vue b/app/javascript/dashboard/routes/dashboard/contact/pages/EditContactsPageRouteView.vue index f65e29a15..9aed7c890 100644 --- a/app/javascript/dashboard/routes/dashboard/contact/pages/EditContactsPageRouteView.vue +++ b/app/javascript/dashboard/routes/dashboard/contact/pages/EditContactsPageRouteView.vue @@ -9,7 +9,7 @@ import Spinner from 'dashboard/components-next/spinner/Spinner.vue'; import ContactDetails from 'dashboard/components-next/Contacts/Pages/ContactDetails.vue'; import TabBar from 'dashboard/components-next/tabbar/TabBar.vue'; import ContactNotes from 'dashboard/components-next/Contacts/ContactsSidebar/ContactNotes.vue'; -// import ContactHistory from 'dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue'; +import ContactHistory from 'dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue'; const store = useStore(); const route = useRoute(); @@ -109,7 +109,7 @@ onMounted(() => { /> - + diff --git a/app/javascript/histoire.setup.ts b/app/javascript/histoire.setup.ts index 9b1166711..13a81608a 100644 --- a/app/javascript/histoire.setup.ts +++ b/app/javascript/histoire.setup.ts @@ -2,6 +2,7 @@ import './design-system/histoire.scss'; import { defineSetupVue3 } from '@histoire/plugin-vue'; import i18nMessages from 'dashboard/i18n'; import { createI18n } from 'vue-i18n'; +import { vResizeObserver } from '@vueuse/components'; import store from 'dashboard/store'; const i18n = createI18n({ @@ -13,4 +14,5 @@ const i18n = createI18n({ export const setupVue3 = defineSetupVue3(({ app }) => { app.use(store); app.use(i18n); + app.directive('resize', vResizeObserver); });