fix: Fix issues with new conversation form (#9891)

`requiredIf('isAnEmailInbox')` was not evaluated properly. This PR fixes
it by moving it to a method and using the `this.[variable]` pattern.
This commit is contained in:
Pranav
2024-08-06 03:52:38 -07:00
committed by GitHub
parent 28d4432152
commit 736f16b170

View File

@@ -68,16 +68,18 @@ export default {
attachedFiles: [],
};
},
validations: {
subject: {
required: requiredIf('isAnEmailInbox'),
},
message: {
required,
},
targetInbox: {
required,
},
validations() {
return {
subject: {
required: requiredIf(this.isAnEmailInbox),
},
message: {
required,
},
targetInbox: {
required,
},
};
},
computed: {
...mapGetters({
@@ -574,6 +576,7 @@ export default {
.file-uploads {
@apply text-start;
}
.multiselect-wrap--small.has-multi-select-error {
::v-deep {
.multiselect__tags {
@@ -586,9 +589,11 @@ export default {
.mention--box {
@apply left-0 m-auto right-0 top-auto h-fit;
}
.multiselect .multiselect__content .multiselect__option span {
@apply inline-flex w-6 text-slate-600 dark:text-slate-400;
}
.multiselect .multiselect__content .multiselect__option {
@apply py-0.5 px-1;
}