Title
Refuel has some apps that they’d like to embed within Refuel Social and Influiente.
Instructions in VUE.JS
import { defineComponent, ref } from "vue";
import { useStore } from "vuex";
import {errorAlert} from "@/services/utils";
export default defineComponent({
name: "Customer-Journey-Report",
setup() {
let url = ref();
const store = useStore();
// const clientId = localStorage.getItem('client_id');
let clientId = store.getters.clientId;
if (!clientId || clientId === "" || isNaN(clientId)) {
const personInfo = localStorage.getItem('personInfo');
if (personInfo) {
const data = JSON.parse(personInfo);
clientId = data.client_id;
}
else {
errorAlert("ERROR: No Workspace Id Found - Try to log in and out of the application");}
}
url.value = `https://app.hex.tech/dbbc144d-7e89-4580-98bd-abaf5a9f771b/app/968ff040-2939-437c-a808-f0c15e01f21f/latest?_client_id="${clientId}"&embedded=true`
return {
url
}
}
});
]
Instructions for embedding Wrench.ai build apps in an iFrame using Vue.js are provided. The code includes a setup function to retrieve the client ID and construct the URL for the embedded app, along with a template that displays the app in an iframe.