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>
This commit is contained in:
@@ -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,
|
||||
}),
|
||||
};
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
<script>
|
||||
import draggable from 'vuedraggable';
|
||||
import { standardFieldKeys } from 'dashboard/helper/preChat';
|
||||
export default {
|
||||
components: { draggable },
|
||||
props: {
|
||||
@@ -64,7 +63,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
isFieldEditable(item) {
|
||||
return !!standardFieldKeys[item.name] || !item.enabled;
|
||||
return !item.enabled;
|
||||
},
|
||||
handlePreChatFieldOptions(event, type, item) {
|
||||
this.$emit('update', event, type, item);
|
||||
|
||||
Reference in New Issue
Block a user