diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue
index 5e536fbe0..3763d198a 100644
--- a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue
+++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue
@@ -34,22 +34,19 @@ const contactConversations = computed(() =>
>
-
-
+
-
-
+ :conversation="conversation"
+ :contact="contactsById(conversation.meta.sender.id)"
+ :state-inbox="stateInbox(conversation.inboxId)"
+ :account-labels="accountLabelsValue"
+ class="rounded-none hover:rounded-xl hover:bg-n-alpha-1 dark:hover:bg-n-alpha-3"
+ />
{{ t('CONTACTS_LAYOUT.SIDEBAR.HISTORY.EMPTY_STATE') }}
diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactMerge.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactMerge.vue
index 65cbfafe2..2a0e79931 100644
--- a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactMerge.vue
+++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactMerge.vue
@@ -20,7 +20,7 @@ const props = defineProps({
},
});
-const emit = defineEmits(['goToContactsList']);
+const emit = defineEmits(['goToContactsList', 'resetTab']);
const { t } = useI18n();
const store = useStore();
@@ -74,6 +74,9 @@ const onContactSearch = debounce(
);
const resetState = () => {
+ if (state.primaryContactId === null) {
+ emit('resetTab');
+ }
state.primaryContactId = null;
searchResults.value = [];
isSearching.value = false;
diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ContactNoteItem.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ContactNoteItem.vue
index 81f7a147f..504be1547 100644
--- a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ContactNoteItem.vue
+++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ContactNoteItem.vue
@@ -28,7 +28,7 @@ const handleDelete = () => {
diff --git a/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue b/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue
index 3f92df408..aec21a976 100644
--- a/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue
+++ b/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue
@@ -70,6 +70,10 @@ const updateContact = async () => {
try {
const { customAttributes, ...basicContactData } = contactData.value;
await store.dispatch('contacts/update', basicContactData);
+ await store.dispatch(
+ 'contacts/fetchContactableInbox',
+ props.selectedContact.id
+ );
useAlert(t('CONTACTS_LAYOUT.CARD.EDIT_DETAILS_FORM.SUCCESS_MESSAGE'));
} catch (error) {
useAlert(t('CONTACTS_LAYOUT.CARD.EDIT_DETAILS_FORM.ERROR_MESSAGE'));
@@ -130,15 +134,28 @@ const handleAvatarDelete = async () => {
{{ selectedContact?.name }}
-
- {{ $t('CONTACTS_LAYOUT.DETAILS.CREATED_AT', { date: createdAt }) }}
- •
- {{
- $t('CONTACTS_LAYOUT.DETAILS.LAST_ACTIVITY', {
- date: lastActivityAt,
- })
- }}
-
+
+
+
+ {{ selectedContact?.identifier }}
+
+
+
+ {{ $t('CONTACTS_LAYOUT.DETAILS.CREATED_AT', { date: createdAt }) }}
+ •
+ {{
+ $t('CONTACTS_LAYOUT.DETAILS.LAST_ACTIVITY', {
+ date: lastActivityAt,
+ })
+ }}
+
+
diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.vue
index 38041fa17..bb643ee22 100644
--- a/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.vue
+++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/ConversationCard.vue
@@ -82,7 +82,7 @@ const onCardClick = e => {
{
custom-label-class="min-w-[120px]"
/>
-
+
diff --git a/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownItem.vue b/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownItem.vue
index 821b4218b..9db3a09d4 100644
--- a/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownItem.vue
+++ b/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownItem.vue
@@ -6,7 +6,8 @@ import { useDropdownContext } from './provider.js';
const props = defineProps({
label: { type: String, default: '' },
icon: { type: [String, Object, Function], default: '' },
- link: { type: String, default: '' },
+ link: { type: [String, Object], default: '' },
+ nativeLink: { type: Boolean, default: false },
click: { type: Function, default: null },
preserveOpen: { type: Boolean, default: false },
});
@@ -18,7 +19,13 @@ defineOptions({
const { closeMenu } = useDropdownContext();
const componentIs = computed(() => {
- if (props.link) return 'router-link';
+ if (props.link) {
+ if (props.nativeLink && typeof props.link === 'string') {
+ return 'a';
+ }
+
+ return 'router-link';
+ }
if (props.click) return 'button';
return 'div';
@@ -41,7 +48,8 @@ const triggerClick = () => {
:class="{
'hover:bg-n-alpha-2 rounded-lg w-full gap-3': !$slots.default,
}"
- :href="props.link || null"
+ :href="componentIs === 'a' ? props.link : null"
+ :to="componentIs === 'router-link' ? props.link : null"
@click="triggerClick"
>
diff --git a/app/javascript/dashboard/components-next/filter/ActiveFilterPreview.vue b/app/javascript/dashboard/components-next/filter/ActiveFilterPreview.vue
index 227037772..959d95ccc 100644
--- a/app/javascript/dashboard/components-next/filter/ActiveFilterPreview.vue
+++ b/app/javascript/dashboard/components-next/filter/ActiveFilterPreview.vue
@@ -4,22 +4,11 @@ import { replaceUnderscoreWithSpace } from './helper/filterHelper.js';
import Button from 'dashboard/components-next/button/Button.vue';
defineProps({
- appliedFilters: {
- type: Array,
- default: () => [],
- },
- maxVisibleFilters: {
- type: Number,
- default: 2,
- },
- clearButtonLabel: {
- type: String,
- default: '',
- },
- moreFiltersLabel: {
- type: String,
- default: '',
- },
+ appliedFilters: { type: Array, default: () => [] },
+ maxVisibleFilters: { type: Number, default: 2 },
+ clearButtonLabel: { type: String, default: '' },
+ moreFiltersLabel: { type: String, default: '' },
+ showClearButton: { type: Boolean, default: true },
});
const emit = defineEmits(['clearFilters', 'openFilter']);
@@ -46,6 +35,9 @@ const formatOperatorLabel = operator => {
const formatFilterValue = value => {
if (!value) return '';
+ if (Array.isArray(value)) {
+ return value.join(', ');
+ }
if (typeof value === 'object' && value.name) {
return value.name;
}
@@ -55,10 +47,7 @@ const formatFilterValue = value => {
-
+
{
>
{{ moreFiltersLabel }}
-
+
diff --git a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue
index f9b702c33..d5e968f4a 100644
--- a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue
+++ b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue
@@ -7,17 +7,17 @@ import { useMapGetter } from 'dashboard/composables/store';
import { useStore } from 'vuex';
import { useI18n } from 'vue-i18n';
import { useStorage } from '@vueuse/core';
-
import { useSidebarKeyboardShortcuts } from './useSidebarKeyboardShortcuts';
+
+import Button from 'dashboard/components-next/button/Button.vue';
import SidebarGroup from './SidebarGroup.vue';
import SidebarProfileMenu from './SidebarProfileMenu.vue';
import ChannelLeaf from './ChannelLeaf.vue';
-import SidebarNotificationBell from './SidebarNotificationBell.vue';
import SidebarAccountSwitcher from './SidebarAccountSwitcher.vue';
import Logo from 'next/icon/Logo.vue';
+import ComposeConversation from 'dashboard/components-next/NewConversation/ComposeConversation.vue';
const emit = defineEmits([
- 'openNotificationPanel',
'closeKeyShortcutModal',
'openKeyShortcutModal',
'showCreateAccountModal',
@@ -27,7 +27,6 @@ const { accountScopedRoute } = useAccount();
const store = useStore();
const searchShortcut = useKbd([`$mod`, 'k']);
const { t } = useI18n();
-const enableNewConversation = false;
const toggleShortcutModalFn = show => {
if (show) {
@@ -481,7 +480,7 @@ const menuItems = computed(() => {
@@ -493,14 +492,17 @@ const menuItems = computed(() => {
{{ searchShortcut }}
-
+
+
+
+
+
diff --git a/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue b/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue
index 051375b68..f22e003f1 100644
--- a/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue
+++ b/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue
@@ -1,5 +1,5 @@
diff --git a/app/javascript/dashboard/components-next/sidebar/SidebarProfileMenu.vue b/app/javascript/dashboard/components-next/sidebar/SidebarProfileMenu.vue
index 347e2e25d..7498ecd91 100644
--- a/app/javascript/dashboard/components-next/sidebar/SidebarProfileMenu.vue
+++ b/app/javascript/dashboard/components-next/sidebar/SidebarProfileMenu.vue
@@ -1,7 +1,6 @@
-
+
-
-
- {{ tag }}
-
-
-
-
{{
+ tag
+ }}
+
-
+
+
+
+
+
diff --git a/app/javascript/dashboard/components-next/textarea/TextArea.vue b/app/javascript/dashboard/components-next/textarea/TextArea.vue
index 5e5860fad..16e0fe052 100644
--- a/app/javascript/dashboard/components-next/textarea/TextArea.vue
+++ b/app/javascript/dashboard/components-next/textarea/TextArea.vue
@@ -179,7 +179,7 @@ onMounted(() => {
}"
:disabled="disabled"
rows="1"
- class="flex w-full reset-base text-sm p-0 !rounded-none !bg-transparent dark:!bg-transparent !border-0 !mb-0 placeholder:text-n-slate-11 dark:placeholder:text-n-slate-11 text-n-slate-12 dark:text-n-slate-12 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-slate-25 dark:disabled:bg-slate-900"
+ class="flex w-full reset-base text-sm p-0 !rounded-none !bg-transparent dark:!bg-transparent !border-0 !mb-0 placeholder:text-n-slate-10 dark:placeholder:text-n-slate-10 text-n-slate-12 dark:text-n-slate-12 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-slate-25 dark:disabled:bg-slate-900"
@input="handleInput"
@focus="handleFocus"
@blur="handleBlur"
diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue
index dc24deefe..796c37451 100644
--- a/app/javascript/dashboard/components/ChatList.vue
+++ b/app/javascript/dashboard/components/ChatList.vue
@@ -782,10 +782,10 @@ watch(conversationFilters, (newVal, oldVal) => {
@@ -916,13 +916,3 @@ watch(conversationFilters, (newVal, oldVal) => {
-
-
diff --git a/app/javascript/dashboard/components/copilot/CopilotContainer.vue b/app/javascript/dashboard/components/copilot/CopilotContainer.vue
new file mode 100644
index 000000000..940408ef8
--- /dev/null
+++ b/app/javascript/dashboard/components/copilot/CopilotContainer.vue
@@ -0,0 +1,58 @@
+
+
+
+
+
diff --git a/app/javascript/dashboard/components/layout/config/sidebarItems/contacts.js b/app/javascript/dashboard/components/layout/config/sidebarItems/contacts.js
index fe148163e..e4150d47d 100644
--- a/app/javascript/dashboard/components/layout/config/sidebarItems/contacts.js
+++ b/app/javascript/dashboard/components/layout/config/sidebarItems/contacts.js
@@ -3,18 +3,20 @@ import { frontendURL } from '../../../../helper/URLHelper';
const contacts = accountId => ({
parentNav: 'contacts',
routes: [
- 'contacts_dashboard',
+ 'contacts_dashboard_index',
+ 'contacts_dashboard_segments_index',
+ 'contacts_dashboard_labels_index',
'contacts_edit',
- 'contacts_segments_dashboard',
- 'contacts_labels_dashboard',
+ 'contacts_edit_segment',
+ 'contacts_edit_label',
],
menuItems: [
{
icon: 'contact-card-group',
label: 'ALL_CONTACTS',
hasSubMenu: false,
- toState: frontendURL(`accounts/${accountId}/contacts`),
- toStateName: 'contacts_dashboard',
+ toState: frontendURL(`accounts/${accountId}/contacts?page=1`),
+ toStateName: 'contacts_dashboard_index',
},
],
});
diff --git a/app/javascript/dashboard/components/layout/config/sidebarItems/primaryMenu.js b/app/javascript/dashboard/components/layout/config/sidebarItems/primaryMenu.js
index 5a50bd440..59de35564 100644
--- a/app/javascript/dashboard/components/layout/config/sidebarItems/primaryMenu.js
+++ b/app/javascript/dashboard/components/layout/config/sidebarItems/primaryMenu.js
@@ -31,7 +31,7 @@ const primaryMenuItems = accountId => [
label: 'CONTACTS',
featureFlag: FEATURE_FLAGS.CRM,
toState: frontendURL(`accounts/${accountId}/contacts`),
- toStateName: 'contacts_dashboard',
+ toStateName: 'contacts_dashboard_index',
},
{
icon: 'arrow-trending-lines',
diff --git a/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue b/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue
index efe89d4c6..c36b6f611 100644
--- a/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue
+++ b/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue
@@ -134,7 +134,7 @@ export default {
icon: 'number-symbol',
label: 'TAGGED_WITH',
hasSubMenu: true,
- key: 'label',
+ key: 'labels',
newLink: this.showNewLink(FEATURE_FLAGS.TEAM_MANAGEMENT),
newLinkTag: 'NEW_LABEL',
toState: frontendURL(`accounts/${this.accountId}/settings/labels`),
@@ -147,7 +147,7 @@ export default {
color: label.color,
truncateLabel: true,
toState: frontendURL(
- `accounts/${this.accountId}/labels/${label.title}/contacts`
+ `accounts/${this.accountId}/contacts/labels/${label.title}`
),
})),
};
@@ -194,7 +194,7 @@ export default {
icon: 'folder',
label: 'CUSTOM_VIEWS_SEGMENTS',
hasSubMenu: true,
- key: 'custom_view',
+ key: 'segments',
children: this.customViews
.filter(view => view.filter_type === 'contact')
.map(view => ({
@@ -202,7 +202,7 @@ export default {
label: view.name,
truncateLabel: true,
toState: frontendURL(
- `accounts/${this.accountId}/contacts/custom_view/${view.id}`
+ `accounts/${this.accountId}/contacts/segments/${view.id}`
),
})),
};
@@ -247,7 +247,7 @@ export default {
-
+
-import { useAlert } from 'dashboard/composables';
-import FilterInputBox from '../FilterInput/Index.vue';
-import languages from './advancedFilterItems/languages';
-import countries from 'shared/constants/countries.js';
-import { mapGetters } from 'vuex';
-import { filterAttributeGroups } from './advancedFilterItems';
-import { useFilter } from 'shared/composables/useFilter';
-import * as OPERATORS from 'dashboard/components/widgets/FilterInput/FilterOperatorTypes.js';
-import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
-import { validateConversationOrContactFilters } from 'dashboard/helper/validations.js';
-import { useTrack } from 'dashboard/composables';
-
-export default {
- components: {
- FilterInputBox,
- },
- props: {
- onClose: {
- type: Function,
- default: () => {},
- },
- initialFilterTypes: {
- type: Array,
- default: () => [],
- },
- initialAppliedFilters: {
- type: Array,
- default: () => [],
- },
- activeFolderName: {
- type: String,
- default: '',
- },
- isFolderView: {
- type: Boolean,
- default: false,
- },
- },
- emits: ['applyFilter', 'updateFolder'],
- setup() {
- const { setFilterAttributes } = useFilter({
- filteri18nKey: 'FILTER',
- attributeModel: 'conversation_attribute',
- });
- return {
- setFilterAttributes,
- };
- },
- data() {
- return {
- show: true,
- appliedFilters: this.initialAppliedFilters,
- activeFolderNewName: this.activeFolderName,
- filterTypes: this.initialFilterTypes,
- filterAttributeGroups,
- filterGroups: [],
- allCustomAttributes: [],
- attributeModel: 'conversation_attribute',
- filtersFori18n: 'FILTER',
- validationErrors: {},
- };
- },
- computed: {
- ...mapGetters({
- getAppliedConversationFilters: 'getAppliedConversationFilters',
- }),
- filterModalHeaderTitle() {
- return !this.isFolderView
- ? this.$t('FILTER.TITLE')
- : this.$t('FILTER.EDIT_CUSTOM_FILTER');
- },
- filterModalSubTitle() {
- return !this.isFolderView
- ? this.$t('FILTER.SUBTITLE')
- : this.$t('FILTER.CUSTOM_VIEWS_SUBTITLE');
- },
- },
- mounted() {
- const { filterGroups, filterTypes } = this.setFilterAttributes();
-
- this.filterTypes = [...this.filterTypes, ...filterTypes];
- this.filterGroups = filterGroups;
-
- this.$store.dispatch('campaigns/get');
- if (this.getAppliedConversationFilters.length) {
- this.appliedFilters = [];
- this.appliedFilters = [...this.getAppliedConversationFilters];
- } else if (!this.isFolderView) {
- this.appliedFilters.push({
- attribute_key: 'status',
- filter_operator: 'equal_to',
- values: '',
- query_operator: 'and',
- attribute_model: 'standard',
- });
- }
- },
- methods: {
- getOperatorTypes(key) {
- switch (key) {
- case 'list':
- return OPERATORS.OPERATOR_TYPES_1;
- case 'text':
- return OPERATORS.OPERATOR_TYPES_3;
- case 'number':
- return OPERATORS.OPERATOR_TYPES_1;
- case 'link':
- return OPERATORS.OPERATOR_TYPES_1;
- case 'date':
- return OPERATORS.OPERATOR_TYPES_4;
- case 'checkbox':
- return OPERATORS.OPERATOR_TYPES_1;
- default:
- return OPERATORS.OPERATOR_TYPES_1;
- }
- },
- customAttributeInputType(key) {
- switch (key) {
- case 'date':
- return 'date';
- case 'text':
- return 'plain_text';
- case 'list':
- return 'search_select';
- case 'checkbox':
- return 'search_select';
- default:
- return 'plain_text';
- }
- },
- getAttributeModel(key) {
- const type = this.filterTypes.find(filter => filter.attributeKey === key);
- return type.attributeModel;
- },
- getInputType(key, operator) {
- if (key === 'created_at' || key === 'last_activity_at')
- if (operator === 'days_before') return 'plain_text';
- const type = this.filterTypes.find(filter => filter.attributeKey === key);
- return type?.inputType;
- },
- getOperators(key) {
- const type = this.filterTypes.find(filter => filter.attributeKey === key);
- return type?.filterOperators;
- },
- statusFilterItems() {
- return {
- open: {
- TEXT: this.$t('CHAT_LIST.CHAT_STATUS_FILTER_ITEMS.open.TEXT'),
- },
- resolved: {
- TEXT: this.$t('CHAT_LIST.CHAT_STATUS_FILTER_ITEMS.resolved.TEXT'),
- },
- pending: {
- TEXT: this.$t('CHAT_LIST.CHAT_STATUS_FILTER_ITEMS.pending.TEXT'),
- },
- snoozed: {
- TEXT: this.$t('CHAT_LIST.CHAT_STATUS_FILTER_ITEMS.snoozed.TEXT'),
- },
- all: {
- TEXT: this.$t('CHAT_LIST.CHAT_STATUS_FILTER_ITEMS.all.TEXT'),
- },
- };
- },
- getDropdownValues(type) {
- const statusFilters = this.statusFilterItems();
- const allCustomAttributes = this.$store.getters[
- 'attributes/getAttributesByModel'
- ](this.attributeModel);
-
- const isCustomAttributeCheckbox = allCustomAttributes.find(attr => {
- return (
- attr.attribute_key === type &&
- attr.attribute_display_type === 'checkbox'
- );
- });
-
- if (isCustomAttributeCheckbox) {
- return [
- {
- id: true,
- name: this.$t('FILTER.ATTRIBUTE_LABELS.TRUE'),
- },
- {
- id: false,
- name: this.$t('FILTER.ATTRIBUTE_LABELS.FALSE'),
- },
- ];
- }
-
- const isCustomAttributeList = allCustomAttributes.find(attr => {
- return (
- attr.attribute_key === type && attr.attribute_display_type === 'list'
- );
- });
-
- if (isCustomAttributeList) {
- return allCustomAttributes
- .find(attr => attr.attribute_key === type)
- .attribute_values.map(item => {
- return {
- id: item,
- name: item,
- };
- });
- }
-
- switch (type) {
- case 'status':
- return [
- ...Object.keys(statusFilters).map(status => {
- return {
- id: status,
- name: statusFilters[status].TEXT,
- };
- }),
- ];
- case 'assignee_id':
- return this.$store.getters['agents/getAgents'];
- case 'contact':
- return this.$store.getters['contacts/getContacts'];
- case 'inbox_id':
- return this.$store.getters['inboxes/getInboxes'];
- case 'team_id':
- return this.$store.getters['teams/getTeams'];
- case 'campaign_id':
- return this.$store.getters['campaigns/getAllCampaigns'].map(i => {
- return {
- id: i.id,
- name: i.title,
- };
- });
- case 'labels':
- return this.$store.getters['labels/getLabels'].map(i => {
- return {
- id: i.title,
- name: i.title,
- };
- });
- case 'browser_language':
- return languages;
- case 'country_code':
- return countries;
- default:
- return undefined;
- }
- },
- appendNewFilter() {
- if (this.isFolderView) {
- this.setQueryOperatorOnLastQuery();
- } else {
- this.appliedFilters.push({
- attribute_key: 'status',
- filter_operator: 'equal_to',
- values: '',
- query_operator: 'and',
- });
- }
- },
- setQueryOperatorOnLastQuery() {
- const lastItemIndex = this.appliedFilters.length - 1;
- this.appliedFilters[lastItemIndex] = {
- ...this.appliedFilters[lastItemIndex],
- query_operator: 'and',
- };
- this.$nextTick(() => {
- this.appliedFilters.push({
- attribute_key: 'status',
- filter_operator: 'equal_to',
- values: '',
- query_operator: 'and',
- });
- });
- },
- removeFilter(index) {
- if (this.appliedFilters.length <= 1) {
- useAlert(this.$t('FILTER.FILTER_DELETE_ERROR'));
- } else {
- this.appliedFilters.splice(index, 1);
- }
- },
- submitFilterQuery() {
- this.validationErrors = validateConversationOrContactFilters(
- this.appliedFilters
- );
- if (Object.keys(this.validationErrors).length === 0) {
- this.$store.dispatch(
- 'setConversationFilters',
- JSON.parse(JSON.stringify(this.appliedFilters))
- );
- this.$emit('applyFilter', this.appliedFilters);
- useTrack(CONVERSATION_EVENTS.APPLY_FILTER, {
- applied_filters: this.appliedFilters.map(filter => ({
- key: filter.attribute_key,
- operator: filter.filter_operator,
- query_operator: filter.query_operator,
- })),
- });
- }
- },
- updateSavedCustomViews() {
- this.$emit('updateFolder', this.appliedFilters, this.activeFolderNewName);
- },
- resetFilter(index, currentFilter) {
- this.appliedFilters[index].filter_operator = this.filterTypes.find(
- filter => filter.attributeKey === currentFilter.attribute_key
- ).filterOperators[0].value;
- this.appliedFilters[index].values = '';
- },
- showUserInput(operatorType) {
- if (operatorType === 'is_present' || operatorType === 'is_not_present')
- return false;
- return true;
- },
- },
-};
-
-
-
-
-
-
- {{ filterModalSubTitle }}
-
-
-
-
-
- {{ $t('FILTER.FOLDER_LABEL') }}
-
-
- {{ $t('FILTER.EMPTY_VALUE_ERROR') }}
-
-
-
- {{ $t('FILTER.FOLDER_QUERY_LABEL') }}
-
-
-
-
-
-
- {{ $t('FILTER.ADD_NEW_FILTER') }}
-
-
-
-
-
-
- {{ $t('FILTER.CANCEL_BUTTON_LABEL') }}
-
-
- {{ $t('FILTER.UPDATE_BUTTON_LABEL') }}
-
-
- {{ $t('FILTER.SUBMIT_BUTTON_LABEL') }}
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue
index 83f234f9f..46cdaf221 100644
--- a/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue
@@ -1,14 +1,14 @@
+
+
+
+
diff --git a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
index ba4d9393f..acfc9b69b 100644
--- a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
@@ -468,9 +468,7 @@ export default {
size="tiny"
color-scheme="secondary"
class="box-border fixed z-10 bg-white border border-r-0 border-solid rounded-bl-calc rtl:rotate-180 rounded-tl-calc dark:bg-slate-700 border-slate-50 dark:border-slate-600"
- :class="
- isInboxView ? 'top-52 md:top-40' : 'top-[9.5rem] md:top-[6.25rem]'
- "
+ :class="isInboxView ? 'top-52 md:top-40' : 'top-32'"
:icon="isRightOrLeftIcon"
@click="onToggleContactPanel"
/>
@@ -558,6 +556,7 @@ export default {
diff --git a/app/javascript/dashboard/modules/contact/components/ContactFields.vue b/app/javascript/dashboard/modules/contact/components/ContactFields.vue
deleted file mode 100644
index 71f92c969..000000000
--- a/app/javascript/dashboard/modules/contact/components/ContactFields.vue
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/modules/contact/components/ContactPanel.vue b/app/javascript/dashboard/modules/contact/components/ContactPanel.vue
deleted file mode 100644
index 568a8bf69..000000000
--- a/app/javascript/dashboard/modules/contact/components/ContactPanel.vue
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/modules/notes/NotesOnContactPage.vue b/app/javascript/dashboard/modules/notes/NotesOnContactPage.vue
deleted file mode 100644
index caaa9285d..000000000
--- a/app/javascript/dashboard/modules/notes/NotesOnContactPage.vue
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
diff --git a/app/javascript/dashboard/modules/notes/components/AddNote.vue b/app/javascript/dashboard/modules/notes/components/AddNote.vue
deleted file mode 100644
index 55c825695..000000000
--- a/app/javascript/dashboard/modules/notes/components/AddNote.vue
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
- {{ $t('NOTES.ADD.BUTTON') }} {{ '(⌘⏎)' }}
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/modules/notes/components/ContactNote.vue b/app/javascript/dashboard/modules/notes/components/ContactNote.vue
deleted file mode 100644
index 206154136..000000000
--- a/app/javascript/dashboard/modules/notes/components/ContactNote.vue
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{ noteAuthorName }}
-
-
- {{ $t('NOTES.LIST.LABEL') }}
-
-
- {{ readableTime }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/modules/notes/components/NoteList.vue b/app/javascript/dashboard/modules/notes/components/NoteList.vue
deleted file mode 100644
index ffbc1da83..000000000
--- a/app/javascript/dashboard/modules/notes/components/NoteList.vue
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{ $t('NOTES.FETCHING_NOTES') }}
-
-
- {{ $t('NOTES.NOT_AVAILABLE') }}
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/Dashboard.vue b/app/javascript/dashboard/routes/dashboard/Dashboard.vue
index 3b3199afe..97f24741f 100644
--- a/app/javascript/dashboard/routes/dashboard/Dashboard.vue
+++ b/app/javascript/dashboard/routes/dashboard/Dashboard.vue
@@ -178,7 +178,6 @@ export default {
-export default {
- props: {
- options: {
- type: Array,
- default: () => [],
- },
- },
- emits: ['add'],
- data() {
- return {
- content: '',
- date: '',
- label: '',
- };
- },
- computed: {
- buttonDisabled() {
- return this.content && this.date === '';
- },
- },
- methods: {
- resetValue() {
- this.content = '';
- this.date = '';
- },
-
- optionSelected(event) {
- this.label = event.target.value;
- },
-
- onAdd() {
- const task = {
- content: this.content,
- date: this.date,
- label: this.label,
- };
- this.$emit('add', task);
- this.resetValue();
- },
- },
-};
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactInfoPanel.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactInfoPanel.vue
deleted file mode 100644
index 5455a1a26..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactInfoPanel.vue
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
toggleSidebarUIState('is_ct_custom_attr_open', value)
- "
- >
-
-
-
-
-
toggleSidebarUIState('is_ct_labels_open', value)
- "
- >
-
-
-
-
-
toggleSidebarUIState('is_ct_prev_conv_open', value)
- "
- >
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactLabels.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactLabels.vue
deleted file mode 100644
index 921c86a85..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactLabels.vue
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsAdvancedFilters.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsAdvancedFilters.vue
deleted file mode 100644
index 29b1faee6..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsAdvancedFilters.vue
+++ /dev/null
@@ -1,368 +0,0 @@
-
-
-
-
-
-
- {{ filterModalSubTitle }}
-
-
-
-
-
- {{ $t('CONTACTS_FILTER.SEGMENT_LABEL') }}
-
-
- {{ $t('CONTACTS_FILTER.EMPTY_VALUE_ERROR') }}
-
-
-
- {{ $t('CONTACTS_FILTER.SEGMENT_QUERY_LABEL') }}
-
-
-
-
-
-
- {{ $t('CONTACTS_FILTER.ADD_NEW_FILTER') }}
-
-
- {{ $t('CONTACTS_FILTER.CLEAR_ALL_FILTERS') }}
-
-
-
-
-
-
- {{ $t('CONTACTS_FILTER.CANCEL_BUTTON_LABEL') }}
-
-
- {{ $t('CONTACTS_FILTER.UPDATE_BUTTON_LABEL') }}
-
-
- {{ $t('CONTACTS_FILTER.SUBMIT_BUTTON_LABEL') }}
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable.vue
deleted file mode 100644
index 067682939..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable.vue
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ $t('CONTACTS_PAGE.LIST.LOADING_MESSAGE') }}
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/CountryCell.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/CountryCell.vue
deleted file mode 100644
index 4d3d591f6..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/CountryCell.vue
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/EmailCell.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/EmailCell.vue
deleted file mode 100644
index e2a023351..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/EmailCell.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- {{ email }}
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/NameCell.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/NameCell.vue
deleted file mode 100644
index 68c0e6f01..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/NameCell.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
- openContactInfoPanel(row.original.id)"
- >
-
-
-
-
-
- {{ row.original.name }}
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/ProfilesCell.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/ProfilesCell.vue
deleted file mode 100644
index 5252a2066..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/ProfilesCell.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/TelCell.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/TelCell.vue
deleted file mode 100644
index 17beb1ec5..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/TelCell.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsView.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsView.vue
deleted file mode 100644
index 8fb292414..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactsView.vue
+++ /dev/null
@@ -1,475 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/Header.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/Header.vue
deleted file mode 100644
index f942536cd..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/Header.vue
+++ /dev/null
@@ -1,230 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ headerTitle }}
-
-
-
-
-
-
-
-
- {{ $t('CONTACTS_PAGE.SEARCH_BUTTON') }}
-
-
-
-
-
-
- {{ $t('CONTACTS_PAGE.FILTER_CONTACTS_EDIT') }}
-
-
- {{ $t('CONTACTS_PAGE.FILTER_CONTACTS_DELETE') }}
-
-
-
-
-
- {{ $t('CONTACTS_PAGE.FILTER_CONTACTS') }}
-
-
-
-
- {{ $t('CONTACTS_PAGE.FILTER_CONTACTS_SAVE') }}
-
-
- {{ $t('CREATE_CONTACT.BUTTON_LABEL') }}
-
-
-
- {{ $t('IMPORT_CONTACTS.BUTTON_LABEL') }}
-
-
-
- {{ $t('EXPORT_CONTACTS.BUTTON_LABEL') }}
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ImportContacts.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ImportContacts.vue
deleted file mode 100644
index a6954b501..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ImportContacts.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
- {{ $t('IMPORT_CONTACTS.DESC') }}
- {{
- $t('IMPORT_CONTACTS.DOWNLOAD_LABEL')
- }}
-
-
-
-
-
- {{ $t('IMPORT_CONTACTS.FORM.LABEL') }}
-
-
-
-
-
-
- {{ $t('IMPORT_CONTACTS.FORM.SUBMIT') }}
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ReminderItem.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ReminderItem.vue
deleted file mode 100644
index 412024de9..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/ReminderItem.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/SectionHeader.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/SectionHeader.vue
deleted file mode 100644
index a9c4e1982..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/SectionHeader.vue
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
-
-
- {{ $t('EVENTS.BUTTON.PILL_BUTTON_NOTES') }}
-
-
- {{ $t('EVENTS.BUTTON.PILL_BUTTON_EVENTS') }}
-
-
- {{ $t('EVENTS.BUTTON.PILL_BUTTON_CONVO') }}
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/TimelineCard.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/TimelineCard.vue
deleted file mode 100644
index 48547f690..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/TimelineCard.vue
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/specs/AddReminder.spec.js b/app/javascript/dashboard/routes/dashboard/contacts/components/specs/AddReminder.spec.js
deleted file mode 100644
index 549910263..000000000
--- a/app/javascript/dashboard/routes/dashboard/contacts/components/specs/AddReminder.spec.js
+++ /dev/null
@@ -1,46 +0,0 @@
-import { shallowMount } from '@vue/test-utils';
-import AddReminder from '../AddReminder.vue';
-
-let wrapper;
-
-describe('AddReminder', () => {
- beforeEach(() => {
- wrapper = shallowMount(AddReminder, {
- mocks: {
- $t: x => x,
- $store: { getters: {}, state: {} },
- },
- stubs: { WootButton: { template: '' } },
- });
- });
-
- it('tests resetValue', () => {
- const resetValue = vi.spyOn(wrapper.vm, 'resetValue');
- wrapper.vm.content = 'test';
- wrapper.vm.date = '08/11/2022';
- wrapper.vm.resetValue();
- expect(wrapper.vm.content).toEqual('');
- expect(wrapper.vm.date).toEqual('');
- expect(resetValue).toHaveBeenCalled();
- });
-
- it('tests optionSelected', () => {
- const optionSelected = vi.spyOn(wrapper.vm, 'optionSelected');
- wrapper.vm.label = '';
- wrapper.vm.optionSelected({ target: { value: 'test' } });
- expect(wrapper.vm.label).toEqual('test');
- expect(optionSelected).toHaveBeenCalled();
- });
-
- it('tests onAdd', () => {
- const onAdd = vi.spyOn(wrapper.vm, 'onAdd');
- wrapper.vm.label = 'label';
- wrapper.vm.content = 'content';
- wrapper.vm.date = '08/11/2022';
- wrapper.vm.onAdd();
- expect(onAdd).toHaveBeenCalled();
- expect(wrapper.emitted().add[0]).toEqual([
- { content: 'content', date: '08/11/2022', label: 'label' },
- ]);
- });
-});
diff --git a/app/javascript/dashboard/routes/dashboard/contacts/pages/ContactManageView.vue b/app/javascript/dashboard/routes/dashboard/contacts/pages/ContactManageView.vue
index 9002a05de..9f99157e6 100644
--- a/app/javascript/dashboard/routes/dashboard/contacts/pages/ContactManageView.vue
+++ b/app/javascript/dashboard/routes/dashboard/contacts/pages/ContactManageView.vue
@@ -62,7 +62,11 @@ const goToContactsList = () => {
const fetchActiveContact = async () => {
if (route.params.contactId) {
- store.dispatch('contacts/show', { id: route.params.contactId });
+ await store.dispatch('contacts/show', { id: route.params.contactId });
+ await store.dispatch(
+ 'contacts/fetchContactableInbox',
+ route.params.contactId
+ );
}
};
@@ -97,7 +101,7 @@ onMounted(() => {
class="flex flex-col justify-between flex-1 h-full m-0 overflow-auto bg-n-background"
>
{
ref="contactMergeRef"
:selected-contact="selectedContact"
@go-to-contacts-list="goToContactsList"
+ @reset-tab="handleTabChange(CONTACT_TABS_OPTIONS[0])"
/>