lint & format
This commit is contained in:
parent
9728959b5e
commit
300abb5360
@ -2,7 +2,7 @@
|
||||
|
||||
The is a single page application built using Vite (<https://vitejs.dev/>)
|
||||
|
||||
Example URL for Account View <http://localhost:5173/customerAccount/1234/?ani=+13125138223&dnis=unknown&queue=GeneralInquires&direction=INBOUND&channel=AmazonConnect&type=Voice&_sessionIdentifier=bc93f1fc>
|
||||
Example URL for Account View <http://localhost:5173/telephonyContext/?ani=+13125138223&dnis=unknown&queue=GeneralInquires&direction=INBOUND&channel=AmazonConnect&type=Voice&_sessionIdentifier=bc93f1fc>
|
||||
|
||||
## Project setup
|
||||
|
||||
|
||||
@ -4,10 +4,9 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<!-- <router-view class="view sidebar" name="SideBarView"></router-view> -->
|
||||
|
||||
<router-view class="view main-content"></router-view>
|
||||
<!-- <router-view class="view sidebar" name="SideBarView"></router-view> -->
|
||||
|
||||
<router-view class="view main-content"></router-view>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600");
|
||||
|
||||
@ -1,27 +1,26 @@
|
||||
<script>
|
||||
// This template uses https://vuejs.org/guide/extras/render-function.html to
|
||||
// create DOM elements from properties
|
||||
import { h } from 'vue'
|
||||
import { h } from "vue";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
summary: { type: String, default: "<h2>Summary Should go here</h2>" }
|
||||
},
|
||||
setup(props) {
|
||||
|
||||
// return the render function
|
||||
return () => h('div', { class: 'bar', innerHTML: props.summary })
|
||||
}
|
||||
}
|
||||
props: {
|
||||
summary: { type: String, default: "<h2>Summary Should go here</h2>" },
|
||||
},
|
||||
setup(props) {
|
||||
// return the render function
|
||||
return () => h("div", { class: "bar", innerHTML: props.summary });
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
span.customer {
|
||||
color: #ff0000;
|
||||
font-weight: bold;
|
||||
color: #ff0000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.iva {
|
||||
color: #0000a0;
|
||||
font-weight: bold;
|
||||
color: #0000a0;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,17 +1,24 @@
|
||||
|
||||
<script setup>
|
||||
// eslint-disable-next-line
|
||||
const props = defineProps(["label", "value"]);
|
||||
const rows = Math.ceil(props.value.length/18);
|
||||
const rows = Math.ceil(props.value.length / 18);
|
||||
</script>
|
||||
<template>
|
||||
<div class="vertical-layout-cell">
|
||||
<div class="GTTextLabel GTRTextLabel" :title="label" style="">{{ label }}</div>
|
||||
</div>
|
||||
<div class="vertical-layout-cell">
|
||||
<textarea
|
||||
:value="value" class="GTTextField read-only" :title="label" type="textarea" readonly="" :rows="rows"
|
||||
maxlength="1024" />
|
||||
<div class="vertical-layout-cell">
|
||||
<div class="GTTextLabel GTRTextLabel" :title="label" style="">
|
||||
{{ label }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="vertical-layout-cell">
|
||||
<textarea
|
||||
:value="value"
|
||||
class="GTTextField read-only"
|
||||
:title="label"
|
||||
type="textarea"
|
||||
readonly=""
|
||||
:rows="rows"
|
||||
maxlength="1024"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<style></style>
|
||||
<style></style>
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
export function getAuthKeyFromProperties(props) {
|
||||
var authKey;
|
||||
var authKey;
|
||||
|
||||
if (props.sessionIdentifier && props.sessionIdentifier.length > 0) {
|
||||
authKey = props.sessionIdentifier;
|
||||
} else if (props.username && props.username.length > 0) {
|
||||
authKey = props.username;
|
||||
} else {
|
||||
throw new Error('_sessionIdentifier or username properties not found (check query params)');
|
||||
throw new Error(
|
||||
"_sessionIdentifier or username properties not found (check query params)"
|
||||
);
|
||||
}
|
||||
return authKey
|
||||
return authKey;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ const routes = [
|
||||
default: (route) => ({
|
||||
...route.params,
|
||||
...route.query,
|
||||
sessionIdentifier: route.query._sessionIdentifier
|
||||
sessionIdentifier: route.query._sessionIdentifier,
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { getAuthKeyFromProperties } from '../helpers/index'
|
||||
import { getAuthKeyFromProperties } from "../helpers/index";
|
||||
|
||||
import * as d3 from "d3";
|
||||
import * as align from "d3-sankey";
|
||||
@ -43,7 +43,8 @@ function fetchData() {
|
||||
return;
|
||||
}
|
||||
fetch(
|
||||
`${import.meta.env.VITE_EO_SERVICES_URL}/api/interactions-flow?filter=${multiSelected.value
|
||||
`${import.meta.env.VITE_EO_SERVICES_URL}/api/interactions-flow?filter=${
|
||||
multiSelected.value
|
||||
}&authKey=${authKey}`,
|
||||
{
|
||||
credentials: "include", // fetch won't send cookies unless you set credentials
|
||||
@ -99,9 +100,9 @@ function generateSankey(data) {
|
||||
.nodeId((d) => d.name)
|
||||
.nodeAlign(
|
||||
align[
|
||||
`sankey${alignSelected.value[0].toUpperCase()}${alignSelected.value.slice(
|
||||
1
|
||||
)}`
|
||||
`sankey${alignSelected.value[0].toUpperCase()}${alignSelected.value.slice(
|
||||
1
|
||||
)}`
|
||||
]
|
||||
) // d3.sankeyLeft, etc.
|
||||
.nodeWidth(15)
|
||||
@ -173,10 +174,10 @@ function generateSankey(data) {
|
||||
linkColor === "source-target"
|
||||
? (d) => `url(#${d.uid})`
|
||||
: linkColor === "source"
|
||||
? (d) => color(d.source.category)
|
||||
: linkColor === "target"
|
||||
? (d) => color(d.target.category)
|
||||
: linkColor
|
||||
? (d) => color(d.source.category)
|
||||
: linkColor === "target"
|
||||
? (d) => color(d.target.category)
|
||||
: linkColor
|
||||
)
|
||||
.attr("stroke-width", (d) => Math.max(1, d.width));
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { getAuthKeyFromProperties } from '../helpers/index'
|
||||
import { getAuthKeyFromProperties } from "../helpers/index";
|
||||
|
||||
import ContactTable from "../components/ContactTable.vue";
|
||||
import ContactsSummary from "../components/ContactsSummary.vue";
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted, h } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import VerticalLabelValue from "../components/VerticalLabelValue.vue";
|
||||
import { getAuthKeyFromProperties } from '../helpers/index'
|
||||
import { getAuthKeyFromProperties } from "../helpers/index";
|
||||
import ErrorMessage from "../components/ErrorMessage.vue";
|
||||
import TransferSummary from "../components/TransferSummary.vue";
|
||||
|
||||
@ -36,9 +36,11 @@ function fetchData() {
|
||||
errorMessage.value = error;
|
||||
return;
|
||||
}
|
||||
console.log(`Fetching TPS Property ${props.transferSummary}`)
|
||||
console.log(`Fetching TPS Property ${props.transferSummary}`);
|
||||
fetch(
|
||||
`${import.meta.env.VITE_EO_SERVICES_URL}/api/tps?propertyName=${props.transferSummary}&authKey=${authKey}`,
|
||||
`${import.meta.env.VITE_EO_SERVICES_URL}/api/tps?propertyName=${
|
||||
props.transferSummary
|
||||
}&authKey=${authKey}`,
|
||||
{
|
||||
credentials: "include", // fetch won't send cookies unless you set credentials
|
||||
}
|
||||
@ -51,7 +53,7 @@ function fetchData() {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
response.json().then((data) => {
|
||||
console.log("Found Property:" + JSON.stringify(data))
|
||||
console.log("Found Property:" + JSON.stringify(data));
|
||||
transferSummaryBlock.value = data.data.value;
|
||||
});
|
||||
})
|
||||
@ -60,7 +62,6 @@ function fetchData() {
|
||||
errorMessage.value = `${error} for TPS property ${props.transferSummary}`;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<h2>Summary</h2>
|
||||
@ -97,7 +98,7 @@ function fetchData() {
|
||||
style="width: 25%"
|
||||
>
|
||||
<h3>Da Vinci Transfer Summary</h3>
|
||||
<TransferSummary :summary="transferSummaryBlock"/>
|
||||
<TransferSummary :summary="transferSummaryBlock" />
|
||||
</div>
|
||||
<div
|
||||
class="blockOuterSpacingRight col3 column-layout-cell"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user