chore: Refactor widget (#5621)
This commit is contained in:
parent
e310230f62
commit
a6960dc2d3
18 changed files with 31 additions and 55 deletions
|
@ -118,13 +118,10 @@ export default {
|
|||
const isUserEmailAvailable = !!this.currentUser.email;
|
||||
const isUserPhoneNumberAvailable = !!this.currentUser.phone_number;
|
||||
return this.preChatFields.filter(field => {
|
||||
if (
|
||||
return !(
|
||||
(isUserEmailAvailable && field.name === 'emailAddress') ||
|
||||
(isUserPhoneNumberAvailable && field.name === 'phoneNumber')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
);
|
||||
});
|
||||
},
|
||||
enabledPreChatFields() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue