Skip to content

Commit

Permalink
Fix all the eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wssheldon committed Nov 29, 2023
1 parent 18a51ef commit f0d0b3a
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 56 deletions.
37 changes: 17 additions & 20 deletions src/dispatch/static/dispatch/src/case/CaseSignalInstanceTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,28 @@
</template>

<script setup lang="ts">
import { ref, watch, withDefaults, toRef } from "vue"
import { ref, watch, toRef } from "vue"
import { useRoute, useRouter } from "vue-router"
import { formatRelativeDate } from "@/filters"
import RawSignalViewer from "@/signal/NewRawSignalViewer.vue"
// Define props
const props = withDefaults(
defineProps<{
modelValue: {
type: any[]
required: true
}
loading: {
type: boolean
default: false
required: true
}
selectedSignalId: string
}>(),
{
modelValue: [],
loading: false,
}
)
const props = defineProps({
modelValue: {
type: Array as () => any[],
default: () => [],
required: true,
},
loading: {
type: Boolean,
default: () => false,
required: true,
},
selectedSignalId: {
type: String,
default: () => "",
},
})
const signalInstances = toRef(props, "modelValue")
const internalLoading = toRef(props, "loading")
Expand Down
15 changes: 0 additions & 15 deletions src/dispatch/static/dispatch/src/case/GraphTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,6 @@ onConnect((params) => addEdges(params))
const dark = ref(false)
/**
* To update node properties you can simply use your elements v-model and mutate the elements directly
* Changes should always be reflected on the graph reactively, without the need to overwrite the elements
*/
function updatePos() {
return elements.value.forEach((el) => {
if (isNode(el)) {
el.position = {
x: Math.random() * 400,
y: Math.random() * 400,
}
}
})
}
/**
* toObject transforms your current graph data to an easily persist-able object
*/
Expand Down
3 changes: 0 additions & 3 deletions src/dispatch/static/dispatch/src/case/TimelineTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ watchEffect(async () => {
}
})
const showDetails = ref(false)
const exportLoading = ref(false)
const sortedEvents = computed(() => {
Expand Down Expand Up @@ -79,8 +78,6 @@ const descriptionMap = {
"Case participants added to conversation.": "added case participants to conversation",
// Add more mappings as needed...
}
const menu = ref(false)
</script>

<template>
Expand Down
6 changes: 3 additions & 3 deletions src/dispatch/static/dispatch/src/components/DMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
offset="10"
transition="false"
>
<template #activator="{ props: menu }">
<v-btn class="text-subtitle-2 font-weight-regular" variant="text" v-bind="menu">
<template #activator="{ props: menuProps }">
<v-btn class="text-subtitle-2 font-weight-regular" variant="text" v-bind="menuProps">
<v-icon>mdi-dots-horizontal</v-icon>
</v-btn>
</template>
Expand Down Expand Up @@ -36,7 +36,7 @@
import { ref } from "vue"
import type { Ref } from "vue"
const props = defineProps<{ options: string[] }>()
defineProps<{ options: string[] }>()
const menu: Ref<boolean> = ref(false)
Expand Down
8 changes: 4 additions & 4 deletions src/dispatch/static/dispatch/src/components/SearchPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ const toggleMenu = () => {
offset="10"
transition="false"
>
<template #activator="{ props: menu }">
<template #activator="{ props: menuProps }">
<v-btn
class="menu-activator text-subtitle-2 font-weight-regular"
variant="text"
v-bind="menu"
v-bind="menuProps"
:ripple="false"
>
<span class="dispatch-text-subtitle">
Expand Down Expand Up @@ -104,7 +104,7 @@ const toggleMenu = () => {
</v-row>
<v-divider />
<v-list lines="one">
<template v-for="(item, _) in filteredItems" :key="index">
<div v-for="(item, index) in filteredItems" :key="`item-${index}`">
<v-list-item
@click="selectItem(item)"
@mouseover="hoveredData = item"
Expand All @@ -118,7 +118,7 @@ const toggleMenu = () => {
<slot :item="item">{{ item }}</slot>
</span>
</v-list-item>
</template>
</div>
</v-list>
</v-card>
</v-menu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ const toggleMenu = () => {
offset="10"
transition="false"
>
<template #activator="{ props: menu }">
<v-btn variant="text" v-bind="menu">
<template #activator="{ props: menuProps }">
<v-btn variant="text" v-bind="menuProps">
<!-- Display Visible Participants -->
<div class="avatar-row">
<!-- Display +n Avatar -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ const toggleMenu = () => {
offset="10"
transition="false"
>
<template #activator="{ props: menu }">
<template #activator="{ props: menuProps }">
<DTooltip :text="props.tooltipLabel" :hotkeys="[hotkey.toUpperCase()]">
<template #activator="{ tooltip }">
<v-btn
class="menu-activator text-subtitle-2 font-weight-regular"
variant="text"
v-bind="{ ...tooltip, ...menu }"
v-bind="{ ...tooltip, ...menuProps }"
>
<template #prepend>
<v-avatar
Expand Down Expand Up @@ -214,10 +214,10 @@ const toggleMenu = () => {
<v-divider />
<v-list lines="one">
<v-list-item
v-for="(participant, index) in filteredParticipants"
v-for="(filteredParticipant, index) in filteredParticipants"
:key="index"
@click="selectParticipant(participant)"
@mouseover="hoveredParticipant = participant"
@click="selectParticipant(filteredParticipant)"
@mouseover="hoveredParticipant = filteredParticipant"
@mouseleave="hoveredParticipant = ''"
density="compact"
rounded="lg"
Expand All @@ -228,14 +228,16 @@ const toggleMenu = () => {
<v-avatar
class="mr-n2"
size="12px"
:style="{ background: getAvatarGradient(participant) }"
:style="{ background: getAvatarGradient(filteredParticipant) }"
/>
<!-- <v-icon class="mr-n6 ml-n2" size="x-small" icon="mdi-account"></v-icon> -->
</template>
<v-list-item-title class="dispatch-text-title">{{ participant }}</v-list-item-title>
<v-list-item-title class="dispatch-text-title">
{{ filteredParticipant }}
</v-list-item-title>
<template #append>
<v-icon
v-if="participant === selectedParticipant"
v-if="filteredParticipant === selectedParticipant"
class="ml-2"
size="x-small"
:color="hoveredParticipant === selectedParticipant ? 'black' : ''"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defineProps<{
data: any
}>()
const emit = defineEmits(["openViewer"])
defineEmits(["openViewer"])
// TODO: (wshel) Future release
// function openViewer() {
Expand Down

0 comments on commit f0d0b3a

Please sign in to comment.