From 9106f6278d451053effdba7bb539d1480d44afa8 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Thu, 15 Dec 2022 23:06:18 +0530 Subject: [PATCH] fix: Allow editing label and placeholder for standard attributes in pre chat form (#6067) Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> --- app/javascript/dashboard/helper/preChat.js | 8 ++------ .../inbox/PreChatForm/PreChatFields.vue | 3 +-- .../widget/components/PreChat/Form.vue | 17 ++++++----------- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/app/javascript/dashboard/helper/preChat.js b/app/javascript/dashboard/helper/preChat.js index bc5502e5b..14d062707 100644 --- a/app/javascript/dashboard/helper/preChat.js +++ b/app/javascript/dashboard/helper/preChat.js @@ -60,15 +60,11 @@ export const getFormattedPreChatFields = ({ preChatFields }) => { return { ...item, label: getLabel({ - key: standardFieldKeys[item.name] - ? standardFieldKeys[item.name].key - : item.name, + key: item.name, label: item.label ? item.label : item.name, }), placeholder: getPlaceHolder({ - key: standardFieldKeys[item.name] - ? standardFieldKeys[item.name].key - : item.name, + key: item.name, placeholder: item.placeholder ? item.placeholder : item.name, }), }; diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/PreChatFields.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/PreChatFields.vue index b1df3902a..dc12be429 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/PreChatFields.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/PreChatFields.vue @@ -43,7 +43,6 @@