-
-
-
-
+
+
+
-
-
diff --git a/app/javascript/dashboard/components/widgets/AutomationFileInput.vue b/app/javascript/dashboard/components/widgets/AutomationFileInput.vue
index 1eff406bf..a184c369a 100644
--- a/app/javascript/dashboard/components/widgets/AutomationFileInput.vue
+++ b/app/javascript/dashboard/components/widgets/AutomationFileInput.vue
@@ -79,7 +79,7 @@ input[type='file'] {
@apply hidden;
}
.input-wrapper {
- @apply flex h-9 bg-n-background py-1 px-2 items-center text-xs cursor-pointer rounded-sm border border-dashed border-n-strong;
+ @apply flex h-8 bg-n-background py-1 px-2 items-center text-xs cursor-pointer rounded-lg border border-dashed border-n-strong;
}
.success-icon {
@apply text-n-teal-9 mr-2;
diff --git a/app/javascript/dashboard/components/widgets/FilterInput/Index.vue b/app/javascript/dashboard/components/widgets/FilterInput/Index.vue
deleted file mode 100644
index f38bc814b..000000000
--- a/app/javascript/dashboard/components/widgets/FilterInput/Index.vue
+++ /dev/null
@@ -1,305 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('FORMS.MULTISELECT.NO_OPTIONS') }}
-
-
-
-
-
-
- {{ $t('FORMS.MULTISELECT.NO_OPTIONS') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ errorMessage }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/composables/useAutomation.js b/app/javascript/dashboard/composables/useAutomation.js
index 09828513f..f70a5bf3b 100644
--- a/app/javascript/dashboard/composables/useAutomation.js
+++ b/app/javascript/dashboard/composables/useAutomation.js
@@ -1,4 +1,4 @@
-import { ref, computed } from 'vue';
+import { ref, reactive, computed } from 'vue';
import { useStoreGetters } from 'dashboard/composables/store';
import { useAlert } from 'dashboard/composables';
import { useI18n } from 'vue-i18n';
@@ -40,7 +40,7 @@ export function useAutomation(startValue = null) {
} = useAutomationValues();
const automation = ref(startValue);
- const automationTypes = structuredClone(AUTOMATIONS);
+ const automationTypes = reactive(structuredClone(AUTOMATIONS));
const eventName = computed(() => automation.value?.event_name);
/**
@@ -160,14 +160,24 @@ export function useAutomation(startValue = null) {
t('AUTOMATION.CONDITION.CONTACT_CUSTOM_ATTR_LABEL')
);
+ const CUSTOM_ATTR_HEADER_KEYS = new Set([
+ 'conversation_custom_attribute',
+ 'contact_custom_attribute',
+ ]);
+
[
'message_created',
'conversation_created',
'conversation_updated',
'conversation_opened',
].forEach(eventToUpdate => {
+ const standardConditions = automationTypes[
+ eventToUpdate
+ ].conditions.filter(
+ c => !c.customAttributeType && !CUSTOM_ATTR_HEADER_KEYS.has(c.key)
+ );
automationTypes[eventToUpdate].conditions = [
- ...automationTypes[eventToUpdate].conditions,
+ ...standardConditions,
...manifestedCustomAttributes,
];
});
diff --git a/app/javascript/dashboard/helper/automationHelper.js b/app/javascript/dashboard/helper/automationHelper.js
index 3e5f46f90..fa6120c16 100644
--- a/app/javascript/dashboard/helper/automationHelper.js
+++ b/app/javascript/dashboard/helper/automationHelper.js
@@ -169,19 +169,19 @@ export const getFileName = (action, files = []) => {
export const getDefaultConditions = eventName => {
if (eventName === 'message_created') {
- return DEFAULT_MESSAGE_CREATED_CONDITION;
+ return structuredClone(DEFAULT_MESSAGE_CREATED_CONDITION);
}
if (
eventName === 'conversation_opened' ||
eventName === 'conversation_resolved'
) {
- return DEFAULT_CONVERSATION_CONDITION;
+ return structuredClone(DEFAULT_CONVERSATION_CONDITION);
}
- return DEFAULT_OTHER_CONDITION;
+ return structuredClone(DEFAULT_OTHER_CONDITION);
};
export const getDefaultActions = () => {
- return DEFAULT_ACTIONS;
+ return structuredClone(DEFAULT_ACTIONS);
};
export const filterCustomAttributes = customAttributes => {
diff --git a/app/javascript/dashboard/modules/contact/ContactMergeModal.vue b/app/javascript/dashboard/modules/contact/ContactMergeModal.vue
index 6e5105883..8db16d9e5 100644
--- a/app/javascript/dashboard/modules/contact/ContactMergeModal.vue
+++ b/app/javascript/dashboard/modules/contact/ContactMergeModal.vue
@@ -1,91 +1,101 @@
-
-
-
-
+
+
diff --git a/app/javascript/dashboard/modules/contact/components/ContactDropdownItem.vue b/app/javascript/dashboard/modules/contact/components/ContactDropdownItem.vue
deleted file mode 100644
index 29f38f11f..000000000
--- a/app/javascript/dashboard/modules/contact/components/ContactDropdownItem.vue
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
- {{ name }}
-
- {{ $t('MERGE_CONTACTS.DROPDOWN_ITEM.ID', { identifier }) }}
-
-
-
-
-
- {{ email }}
-
-
-
- {{ phoneNumber }}
-
- {{ '---' }}
-
-
-
-
-
-
diff --git a/app/javascript/dashboard/modules/contact/components/MergeContact.vue b/app/javascript/dashboard/modules/contact/components/MergeContact.vue
index 85fda4464..29dc6b62d 100644
--- a/app/javascript/dashboard/modules/contact/components/MergeContact.vue
+++ b/app/javascript/dashboard/modules/contact/components/MergeContact.vue
@@ -1,174 +1,105 @@
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/conversation/contact/ContactForm.vue b/app/javascript/dashboard/routes/dashboard/conversation/contact/ContactForm.vue
index 6298a3f2d..77d4b9773 100644
--- a/app/javascript/dashboard/routes/dashboard/conversation/contact/ContactForm.vue
+++ b/app/javascript/dashboard/routes/dashboard/conversation/contact/ContactForm.vue
@@ -11,11 +11,13 @@ import { isPhoneNumberValid } from 'shared/helpers/Validators';
import parsePhoneNumber from 'libphonenumber-js';
import NextButton from 'dashboard/components-next/button/Button.vue';
import Avatar from 'next/avatar/Avatar.vue';
+import ComboBox from 'dashboard/components-next/combobox/ComboBox.vue';
export default {
components: {
NextButton,
Avatar,
+ ComboBox,
},
props: {
contact: {
@@ -133,6 +135,12 @@ export default {
if (!name && !id) return '';
return `${name} (${id})`;
},
+ onCountryChange(value) {
+ const selected = this.countries.find(c => c.id === value);
+ this.country = selected
+ ? { id: selected.id, name: selected.name }
+ : { id: '', name: '' };
+ },
setDialCode() {
if (
this.phoneNumber !== '' &&
@@ -363,26 +371,23 @@ export default {
:label="$t('CONTACT_FORM.FORM.COMPANY_NAME.LABEL')"
:placeholder="$t('CONTACT_FORM.FORM.COMPANY_NAME.PLACEHOLDER')"
/>
-
-
-
-
-
+
+
+
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/conversation/contact/ContactInfo.vue b/app/javascript/dashboard/routes/dashboard/conversation/contact/ContactInfo.vue
index d1c43b3f2..7392bea78 100644
--- a/app/javascript/dashboard/routes/dashboard/conversation/contact/ContactInfo.vue
+++ b/app/javascript/dashboard/routes/dashboard/conversation/contact/ContactInfo.vue
@@ -51,7 +51,6 @@ export default {
data() {
return {
showEditModal: false,
- showMergeModal: false,
showDeleteModal: false,
};
},
@@ -167,11 +166,8 @@ export default {
);
}
},
- closeMergeModal() {
- this.showMergeModal = false;
- },
openMergeModal() {
- this.showMergeModal = true;
+ this.$refs.mergeModal?.open();
},
},
};
@@ -324,12 +320,7 @@ export default {
:contact="contact"
@cancel="toggleEditModal"
/>
-
+
item.name);
+ return this.values;
},
isButtonDisabled() {
return (
this.v$.displayName.$invalid ||
this.v$.description.$invalid ||
this.uiFlags.isCreating ||
- this.isTagInputInvalid
+ this.isTagInputEmpty
);
},
keyErrorMessage() {
@@ -119,17 +120,14 @@ export default {
},
},
+ watch: {
+ attributeType() {
+ this.tagInputTouched = false;
+ this.values = [];
+ },
+ },
+
methods: {
- addTagValue(tagValue) {
- const tag = {
- name: tagValue,
- };
- this.values.push(tag);
- this.$refs.tagInput.$el.focus();
- },
- onTouch() {
- this.isTouched = true;
- },
onDisplayNameChange() {
this.attributeKey = convertToAttributeSlug(this.displayName);
},
@@ -237,27 +235,25 @@ export default {
{{ $t('ATTRIBUTES_MGMT.ADD.FORM.TYPE.ERROR') }}
-
-