mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
chore: API fixes (#3014)
- Minor API fixes - Configuration screen for LINE inbox
This commit is contained in:
@@ -195,6 +195,10 @@
|
||||
"SUBMIT_BUTTON": "Create LINE Channel",
|
||||
"API": {
|
||||
"ERROR_MESSAGE": "We were not able to save the LINE channel"
|
||||
},
|
||||
"API_CALLBACK": {
|
||||
"TITLE": "Callback URL",
|
||||
"SUBTITLE": "You have to configure the webhook URL in LINE application with the URL mentioned here."
|
||||
}
|
||||
},
|
||||
"TELEGRAM_CHANNEL": {
|
||||
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
const selectedAgents = this.selectedAgents.map(x => x.id);
|
||||
|
||||
try {
|
||||
await InboxMembersAPI.create({ inboxId, agentList: selectedAgents });
|
||||
await InboxMembersAPI.update({ inboxId, agentList: selectedAgents });
|
||||
router.replace({
|
||||
name: 'settings_inbox_finish',
|
||||
params: {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<woot-code
|
||||
v-if="isATwilioInbox"
|
||||
lang="html"
|
||||
:script="currentInbox.webhook_url"
|
||||
:script="currentInbox.callback_webhook_url"
|
||||
>
|
||||
</woot-code>
|
||||
</div>
|
||||
@@ -25,7 +25,7 @@
|
||||
<woot-code
|
||||
v-if="isALineInbox"
|
||||
lang="html"
|
||||
:script="currentInbox.webhook_url"
|
||||
:script="currentInbox.callback_webhook_url"
|
||||
>
|
||||
</woot-code>
|
||||
</div>
|
||||
@@ -93,6 +93,12 @@ export default {
|
||||
)}`;
|
||||
}
|
||||
|
||||
if (this.isALineInbox) {
|
||||
return `${this.$t('INBOX_MGMT.FINISH.MESSAGE')}. ${this.$t(
|
||||
'INBOX_MGMT.ADD.LINE_CHANNEL.API_CALLBACK.SUBTITLE'
|
||||
)}`;
|
||||
}
|
||||
|
||||
if (this.isAEmailInbox) {
|
||||
return this.$t('INBOX_MGMT.ADD.EMAIL_CHANNEL.FINISH_MESSAGE');
|
||||
}
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
<span v-if="item.channel_type === 'Channel::Telegram'">
|
||||
Telegram
|
||||
</span>
|
||||
<span v-if="item.channel_type === 'Channel::Line'">
|
||||
Line
|
||||
</span>
|
||||
<span v-if="item.channel_type === 'Channel::Api'">
|
||||
{{ globalConfig.apiChannelName || 'API' }}
|
||||
</span>
|
||||
|
||||
@@ -259,7 +259,21 @@
|
||||
:title="$t('INBOX_MGMT.ADD.TWILIO.API_CALLBACK.TITLE')"
|
||||
:sub-title="$t('INBOX_MGMT.ADD.TWILIO.API_CALLBACK.SUBTITLE')"
|
||||
>
|
||||
<woot-code :script="twilioCallbackURL" lang="html"></woot-code>
|
||||
<woot-code
|
||||
:script="inbox.callback_webhook_url"
|
||||
lang="html"
|
||||
></woot-code>
|
||||
</settings-section>
|
||||
</div>
|
||||
<div v-else-if="isALineChannel" class="settings--content">
|
||||
<settings-section
|
||||
:title="$t('INBOX_MGMT.ADD.LINE_CHANNEL.API_CALLBACK.TITLE')"
|
||||
:sub-title="$t('INBOX_MGMT.ADD.LINE_CHANNEL.API_CALLBACK.SUBTITLE')"
|
||||
>
|
||||
<woot-code
|
||||
:script="inbox.callback_webhook_url"
|
||||
lang="html"
|
||||
></woot-code>
|
||||
</settings-section>
|
||||
</div>
|
||||
<div v-else-if="isAWebWidgetInbox">
|
||||
@@ -398,7 +412,12 @@ export default {
|
||||
];
|
||||
}
|
||||
|
||||
if (this.isATwilioChannel || this.isAPIInbox || this.isAnEmailChannel) {
|
||||
if (
|
||||
this.isATwilioChannel ||
|
||||
this.isALineChannel ||
|
||||
this.isAPIInbox ||
|
||||
this.isAnEmailChannel
|
||||
) {
|
||||
return [
|
||||
...visibleToAllChannelTabs,
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ export const INBOX_TYPES = {
|
||||
TWILIO: 'Channel::TwilioSms',
|
||||
API: 'Channel::Api',
|
||||
EMAIL: 'Channel::Email',
|
||||
LINE: 'Channel::Line',
|
||||
};
|
||||
|
||||
export default {
|
||||
@@ -27,6 +28,9 @@ export default {
|
||||
isATwilioChannel() {
|
||||
return this.channelType === INBOX_TYPES.TWILIO;
|
||||
},
|
||||
isALineChannel() {
|
||||
return this.channelType === INBOX_TYPES.LINE;
|
||||
},
|
||||
isAnEmailChannel() {
|
||||
return this.channelType === INBOX_TYPES.EMAIL;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user