fix: Add available_name as method in captain_assistant (#11502)
Fixes https://linear.app/chatwoot/issue/CW-4366/actionviewtemplateerror-undefined-method-available-name-for-an
This commit is contained in:
@@ -100,7 +100,10 @@ const handleBasicInfoUpdate = async () => {
|
|||||||
const payload = {
|
const payload = {
|
||||||
name: state.name,
|
name: state.name,
|
||||||
description: state.description,
|
description: state.description,
|
||||||
product_name: state.productName,
|
config: {
|
||||||
|
...props.assistant.config,
|
||||||
|
product_name: state.productName,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
emit('submit', payload);
|
emit('submit', payload);
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ class Captain::Assistant < ApplicationRecord
|
|||||||
|
|
||||||
scope :for_account, ->(account_id) { where(account_id: account_id) }
|
scope :for_account, ->(account_id) { where(account_id: account_id) }
|
||||||
|
|
||||||
|
def available_name
|
||||||
|
name
|
||||||
|
end
|
||||||
|
|
||||||
def push_event_data
|
def push_event_data
|
||||||
{
|
{
|
||||||
id: id,
|
id: id,
|
||||||
|
|||||||
Reference in New Issue
Block a user