Skip to content

Commit

Permalink
Address some linter findings
Browse files Browse the repository at this point in the history
  • Loading branch information
wssheldon committed Nov 28, 2023
1 parent 40e9c16 commit 20afe54
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 69 deletions.
97 changes: 38 additions & 59 deletions src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
<v-dialog v-model="dialogVisible" max-width="600">
<v-card>
<v-card-title>Update Case Status</v-card-title>
<v-card-text
>Are you sure you want to change the case status from {{ _case.status }} to
{{ selectedStatus }}</v-card-text
>

<v-card-text>
Are you sure you want to change the case status from {{ _case.status }} to
{{ selectedStatus }}
</v-card-text>
<v-btn
class="ml-6 mb-4"
small
size="small"
color="info"
elevation="1"
@click="changeStatus(selectedStatus)"
Expand All @@ -23,62 +22,42 @@
<v-container fluid>
<v-row no-gutters>
<v-col v-for="status in statuses" :key="status.name" cols="6" md="2">
<v-item v-slot="{ active, toggle }">
<v-item v-slot="{ toggle }">
<div class="overlap-card" :class="status.hoverClass" @click="openDialog(status.name)">
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-sheet outlined color="grey-lighten-1" :class="status.sheetClass">
<FancyTooltip :text="status.tooltip" hotkeys="">
<template v-slot:activator="{ tooltip }">
<v-card
class="d-flex align-center"
:class="status.sheetClass"
height="30"
width="100%"
@click="toggle"
variant="flat"
color="grey-lighten-4"
v-bind="{ ...attrs, ...tooltip }"
v-on="on"
<v-sheet outlined color="grey-lighten-1" :class="status.sheetClass">

Check failure on line 27 in src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue

View workflow job for this annotation

GitHub Actions / build

'outlined' has been removed
<FancyTooltip :text="status.tooltip" hotkeys="">
<template #activator="{ tooltip }">
<v-card
class="d-flex align-center"
:class="status.sheetClass"
height="30"
width="100%"
@click="toggle"
variant="flat"
color="grey-lighten-4"
v-bind="tooltip"
>
<v-scroll-y-transition>
<div
v-if="isActiveStatus(status.name)"
class="flex-grow-1 text-center dispatch-font-enabled"
>
<v-scroll-y-transition>
<div
v-if="isActiveStatus(status.name)"
class="flex-grow-1 text-center dispatch-font-enabled"
>
<v-badge
:color="status.color"
bordered
dot
left
offset-x="10"
offset-y="-8"
>
</v-badge
>{{ status.label }}
</div>
<v-badge :color="status.color" bordered dot offset-x="10" offset-y="-8">

Check warning on line 45 in src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue

View workflow job for this annotation

GitHub Actions / build

Require self-closing on Vue.js custom components (<v-badge>)
</v-badge
>{{ status.label }}
</div>

<div
v-else
class="flex-grow-1 text-center text--disabled dispatch-font"
>
{{ status.label }}
</div>
<span>{{
status.tooltip
? status.tooltip
: `Not yet ${status.label.toLowerCase()}`
}}</span>
</v-scroll-y-transition>
</v-card>
</template>
</FancyTooltip>
</v-sheet>
</template>
<span>{{
status.tooltip ? status.tooltip : `Not yet ${status.label.toLowerCase()}`
}}</span>
</v-tooltip>
<div v-else class="flex-grow-1 text-center text--disabled dispatch-font">
{{ status.label }}
</div>
<span>{{
status.tooltip ? status.tooltip : `Not yet ${status.label.toLowerCase()}`
}}</span>
</v-scroll-y-transition>
</v-card>
</template>
</FancyTooltip>
</v-sheet>
</div>
</v-item>
</v-col>
Expand Down
10 changes: 0 additions & 10 deletions src/dispatch/static/dispatch/src/case/CaseTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ import { ref, watch, toRefs } from "vue"
import { useRoute, useRouter } from "vue-router"
import GraphTab from "@/case/GraphTab.vue"
import CaseResourcesTab from "@/case/ResourcesTab.vue"
import EntitiesTab from "@/entity/EntitiesTab.vue"
import CaseSignalInstanceTab from "@/case/CaseSignalInstanceTab.vue"
import CaseTimelineTab from "@/case/TimelineTab.vue"
Expand All @@ -98,7 +97,6 @@ export default {
},
},
components: {
CaseResourcesTab,
EntitiesTab,

Check failure on line 100 in src/dispatch/static/dispatch/src/case/CaseTabs.vue

View workflow job for this annotation

GitHub Actions / build

The "EntitiesTab" component has been registered but not used
CaseSignalInstanceTab,
CaseTimelineTab,
Expand All @@ -115,8 +113,6 @@ export default {
const resources = ref(props.modelValue.resources)
const entities = ref(props.modelValue.entities)
const events = ref(props.modelValue.events)
console.log("Got events for timeline", events)
console.log("Got signalInstances", signalInstances.value)
watch(loading, (newValue) => {
internalLoading.value = newValue
Expand Down Expand Up @@ -216,10 +212,4 @@ export default {
.selected-button.v-btn--variant-plain {
opacity: 1 !important;
}
/* .unselected-button {
border: none !important;
color: rgb(107, 111, 118);
background-color: rgb(244, 245, 248);
} */
</style>

0 comments on commit 20afe54

Please sign in to comment.