mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-07-16 04:02:54 -06:00
fix: typebot e chatwoot booleans
This commit is contained in:
parent
6567fc7db0
commit
9d3dc85522
@ -148,6 +148,17 @@
|
|||||||
import ChatwootConfig from "@/components/modal/ChatwootConfig.vue";
|
import ChatwootConfig from "@/components/modal/ChatwootConfig.vue";
|
||||||
import instanceController from "@/services/instanceController";
|
import instanceController from "@/services/instanceController";
|
||||||
|
|
||||||
|
|
||||||
|
const defaultObj = () => ({
|
||||||
|
enabled: false,
|
||||||
|
url: "",
|
||||||
|
account_id: "",
|
||||||
|
token: "",
|
||||||
|
sign_msg: true,
|
||||||
|
reopen_conversation: true,
|
||||||
|
conversation_pending: false,
|
||||||
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "InstanceChatwoot",
|
name: "InstanceChatwoot",
|
||||||
props: {
|
props: {
|
||||||
@ -213,8 +224,8 @@ export default {
|
|||||||
const chatwootData = await instanceController.chatwoot.get(
|
const chatwootData = await instanceController.chatwoot.get(
|
||||||
this.instance.instance.instanceName
|
this.instance.instance.instanceName
|
||||||
);
|
);
|
||||||
this.chatwootData = Object.assign({}, chatwootData || {});
|
this.chatwootData = Object.assign(defaultObj(), chatwootData || {});
|
||||||
this.defaultChatwootData = Object.assign({}, chatwootData || {});
|
this.defaultChatwootData = Object.assign(defaultObj(), chatwootData || {});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.error = e.message?.message || e.message || e;
|
this.error = e.message?.message || e.message || e;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -183,6 +183,17 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import instanceController from "@/services/instanceController";
|
import instanceController from "@/services/instanceController";
|
||||||
|
const defaultObj = () => ({
|
||||||
|
enabled: false,
|
||||||
|
expire: 0,
|
||||||
|
delay_message: 0,
|
||||||
|
listening_from_me: false,
|
||||||
|
sessions: [],
|
||||||
|
typebot: "",
|
||||||
|
url: "",
|
||||||
|
keyword_finish: "",
|
||||||
|
unknown_message: "",
|
||||||
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "InstanceTypebot",
|
name: "InstanceTypebot",
|
||||||
@ -237,9 +248,10 @@ export default {
|
|||||||
url: this.typebotData.url.trim().replace(/\/$/, ""),
|
url: this.typebotData.url.trim().replace(/\/$/, ""),
|
||||||
delay_message: parseInt(this.typebotData.delay_message),
|
delay_message: parseInt(this.typebotData.delay_message),
|
||||||
expire: parseInt(this.typebotData.expire),
|
expire: parseInt(this.typebotData.expire),
|
||||||
|
listening_from_me: !!this.typebotData.listening_from_me,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.defaultTypebotData = Object.assign({}, this.typebotData);
|
this.defaultTypebotData = Object.assign(defaultObj(), this.typebotData);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.error = e.message?.message || e.message || e;
|
this.error = e.message?.message || e.message || e;
|
||||||
} finally {
|
} finally {
|
||||||
@ -255,8 +267,8 @@ export default {
|
|||||||
this.instance.instance.instanceName
|
this.instance.instance.instanceName
|
||||||
);
|
);
|
||||||
|
|
||||||
this.typebotData = Object.assign({}, typebotData);
|
this.typebotData = Object.assign(defaultObj(), typebotData);
|
||||||
this.defaultTypebotData = Object.assign({}, typebotData);
|
this.defaultTypebotData = Object.assign(defaultObj(), typebotData);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.error = e.message?.message || e.message || e;
|
this.error = e.message?.message || e.message || e;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -55,13 +55,17 @@
|
|||||||
<p><b>Passo 5:</b> Pronto! Agora você pode receber mensagens.</p>
|
<p><b>Passo 5:</b> Pronto! Agora você pode receber mensagens.</p>
|
||||||
<v-img src="@/assets/chatwoot/chatwoot_api_3.png" />
|
<v-img src="@/assets/chatwoot/chatwoot_api_3.png" />
|
||||||
|
|
||||||
<!-- Add link to chatwoot doc -->
|
<!-- Add link to chatwoot doc -->
|
||||||
<!-- https://www.chatwoot.com/docs/product/channels/api/create-channel -->
|
<!-- https://www.chatwoot.com/docs/product/channels/api/create-channel -->
|
||||||
<v-btn size="small" variant="text" block href="https://www.chatwoot.com/docs/product/channels/api/create-channel" target="_blank">
|
<v-btn
|
||||||
|
size="small"
|
||||||
|
variant="text"
|
||||||
|
block
|
||||||
|
href="https://www.chatwoot.com/docs/product/channels/api/create-channel"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
Ver documentação completa
|
Ver documentação completa
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
Loading…
Reference in New Issue
Block a user