lint & format

This commit is contained in:
Peter Morton 2023-10-12 18:01:17 -05:00
parent 9728959b5e
commit 300abb5360
9 changed files with 59 additions and 50 deletions

View File

@ -2,7 +2,7 @@
The is a single page application built using Vite (<https://vitejs.dev/>) 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 ## Project setup

View File

@ -7,7 +7,6 @@ export default {
<!-- <router-view class="view sidebar" name="SideBarView"></router-view> --> <!-- <router-view class="view sidebar" name="SideBarView"></router-view> -->
<router-view class="view main-content"></router-view> <router-view class="view main-content"></router-view>
</template> </template>
<style lang="scss"> <style lang="scss">
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600"); @import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600");

View File

@ -1,18 +1,17 @@
<script> <script>
// This template uses https://vuejs.org/guide/extras/render-function.html to // This template uses https://vuejs.org/guide/extras/render-function.html to
// create DOM elements from properties // create DOM elements from properties
import { h } from 'vue' import { h } from "vue";
export default { export default {
props: { props: {
summary: { type: String, default: "<h2>Summary Should go here</h2>" } summary: { type: String, default: "<h2>Summary Should go here</h2>" },
}, },
setup(props) { setup(props) {
// return the render function // return the render function
return () => h('div', { class: 'bar', innerHTML: props.summary }) return () => h("div", { class: "bar", innerHTML: props.summary });
} },
} };
</script> </script>
<style> <style>
span.customer { span.customer {

View File

@ -1,17 +1,24 @@
<script setup> <script setup>
// eslint-disable-next-line // eslint-disable-next-line
const props = defineProps(["label", "value"]); const props = defineProps(["label", "value"]);
const rows = Math.ceil(props.value.length/18); const rows = Math.ceil(props.value.length / 18);
</script> </script>
<template> <template>
<div class="vertical-layout-cell"> <div class="vertical-layout-cell">
<div class="GTTextLabel GTRTextLabel" :title="label" style="">{{ label }}</div> <div class="GTTextLabel GTRTextLabel" :title="label" style="">
{{ label }}
</div>
</div> </div>
<div class="vertical-layout-cell"> <div class="vertical-layout-cell">
<textarea <textarea
:value="value" class="GTTextField read-only" :title="label" type="textarea" readonly="" :rows="rows" :value="value"
maxlength="1024" /> class="GTTextField read-only"
:title="label"
type="textarea"
readonly=""
:rows="rows"
maxlength="1024"
/>
</div> </div>
</template> </template>
<style></style> <style></style>

View File

@ -6,7 +6,9 @@ export function getAuthKeyFromProperties(props) {
} else if (props.username && props.username.length > 0) { } else if (props.username && props.username.length > 0) {
authKey = props.username; authKey = props.username;
} else { } 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;
} }

View File

@ -49,7 +49,7 @@ const routes = [
default: (route) => ({ default: (route) => ({
...route.params, ...route.params,
...route.query, ...route.query,
sessionIdentifier: route.query._sessionIdentifier sessionIdentifier: route.query._sessionIdentifier,
}), }),
}, },
}, },

View File

@ -1,6 +1,6 @@
<script setup> <script setup>
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { getAuthKeyFromProperties } from '../helpers/index' import { getAuthKeyFromProperties } from "../helpers/index";
import * as d3 from "d3"; import * as d3 from "d3";
import * as align from "d3-sankey"; import * as align from "d3-sankey";
@ -43,7 +43,8 @@ function fetchData() {
return; return;
} }
fetch( 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}`, }&authKey=${authKey}`,
{ {
credentials: "include", // fetch won't send cookies unless you set credentials credentials: "include", // fetch won't send cookies unless you set credentials

View File

@ -1,6 +1,6 @@
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
import { getAuthKeyFromProperties } from '../helpers/index' import { getAuthKeyFromProperties } from "../helpers/index";
import ContactTable from "../components/ContactTable.vue"; import ContactTable from "../components/ContactTable.vue";
import ContactsSummary from "../components/ContactsSummary.vue"; import ContactsSummary from "../components/ContactsSummary.vue";

View File

@ -1,7 +1,7 @@
<script setup> <script setup>
import { ref, onMounted, h } from "vue"; import { ref, onMounted } from "vue";
import VerticalLabelValue from "../components/VerticalLabelValue.vue"; import VerticalLabelValue from "../components/VerticalLabelValue.vue";
import { getAuthKeyFromProperties } from '../helpers/index' import { getAuthKeyFromProperties } from "../helpers/index";
import ErrorMessage from "../components/ErrorMessage.vue"; import ErrorMessage from "../components/ErrorMessage.vue";
import TransferSummary from "../components/TransferSummary.vue"; import TransferSummary from "../components/TransferSummary.vue";
@ -36,9 +36,11 @@ function fetchData() {
errorMessage.value = error; errorMessage.value = error;
return; return;
} }
console.log(`Fetching TPS Property ${props.transferSummary}`) console.log(`Fetching TPS Property ${props.transferSummary}`);
fetch( 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 credentials: "include", // fetch won't send cookies unless you set credentials
} }
@ -51,7 +53,7 @@ function fetchData() {
return Promise.reject(error); return Promise.reject(error);
} }
response.json().then((data) => { response.json().then((data) => {
console.log("Found Property:" + JSON.stringify(data)) console.log("Found Property:" + JSON.stringify(data));
transferSummaryBlock.value = data.data.value; transferSummaryBlock.value = data.data.value;
}); });
}) })
@ -60,7 +62,6 @@ function fetchData() {
errorMessage.value = `${error} for TPS property ${props.transferSummary}`; errorMessage.value = `${error} for TPS property ${props.transferSummary}`;
}); });
} }
</script> </script>
<template> <template>
<h2>Summary</h2> <h2>Summary</h2>
@ -97,7 +98,7 @@ function fetchData() {
style="width: 25%" style="width: 25%"
> >
<h3>Da Vinci Transfer Summary</h3> <h3>Da Vinci Transfer Summary</h3>
<TransferSummary :summary="transferSummaryBlock"/> <TransferSummary :summary="transferSummaryBlock" />
</div> </div>
<div <div
class="blockOuterSpacingRight col3 column-layout-cell" class="blockOuterSpacingRight col3 column-layout-cell"