diff --git a/app/javascript/dashboard/components/CustomAttribute.vue b/app/javascript/dashboard/components/CustomAttribute.vue index e7de811d6..fefd19d47 100644 --- a/app/javascript/dashboard/components/CustomAttribute.vue +++ b/app/javascript/dashboard/components/CustomAttribute.vue @@ -14,7 +14,7 @@
@@ -142,6 +142,7 @@ import MultiselectDropdown from 'shared/components/ui/MultiselectDropdown.vue'; import HelperTextPopup from 'dashboard/components/ui/HelperTextPopup.vue'; import { isValidURL } from '../helper/URLHelper'; import customAttributeMixin from '../mixins/customAttributeMixin'; +import { useVuelidate } from '@vuelidate/core'; const DATE_FORMAT = 'yyyy-MM-dd'; @@ -167,6 +168,9 @@ export default { attributeKey: { type: String, required: true }, contactId: { type: Number, default: null }, }, + setup() { + return { v$: useVuelidate() }; + }, data() { return { isEditing: false, @@ -225,13 +229,13 @@ export default { return this.isAttributeTypeLink ? 'url' : this.attributeType; }, shouldShowErrorMessage() { - return this.$v.editedValue.$error; + return this.v$.editedValue.$error; }, errorMessage() { - if (this.$v.editedValue.url) { + if (this.v$.editedValue.url) { return this.$t('CUSTOM_ATTRIBUTES.VALIDATIONS.INVALID_URL'); } - if (!this.$v.editedValue.regexValidation) { + if (!this.v$.editedValue.regexValidation) { return this.regexCue ? this.regexCue : this.$t('CUSTOM_ATTRIBUTES.VALIDATIONS.INVALID_INPUT'); @@ -246,7 +250,7 @@ export default { }, contactId() { // Fix to solve validation not resetting when contactId changes in contact page - this.$v.$reset(); + this.v$.$reset(); }, }, @@ -287,7 +291,7 @@ export default { } }, onClickAway() { - this.$v.$reset(); + this.v$.$reset(); this.isEditing = false; }, onEdit() { @@ -307,8 +311,8 @@ export default { this.attributeType === 'date' ? parseISO(this.editedValue) : this.editedValue; - this.$v.$touch(); - if (this.$v.$invalid) { + this.v$.$touch(); + if (this.v$.$invalid) { return; } this.isEditing = false; @@ -316,7 +320,7 @@ export default { }, onDelete() { this.isEditing = false; - this.$v.$reset(); + this.v$.$reset(); this.$emit('delete', this.attributeKey); }, onCopy() { diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyEmailHead.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyEmailHead.vue index e3135fa47..ab507febe 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ReplyEmailHead.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ReplyEmailHead.vue @@ -1,16 +1,16 @@