Skip to content

Commit

Permalink
replace <v-chip>. correct type errors in RunsView.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Sep 8, 2023
1 parent 93fbc8a commit 16c1417
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions src/views/db/RunsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,22 @@
>
<template v-slot:item.runNo="{ item }">
<span class="font-weight-bold primary--text">
{{ item.selectable.runNo }}
{{ item.raw.runNo }}
</span>
</template>
<template v-slot:item.state="{ item }">
<v-chip
:color="stateChipColor[item.selectable.state]"
class="text-capitalize"
>
{{ item.selectable.state }}
</v-chip>
<span class="text-capitalize text-primary font-weight-bold">
{{ item.raw.state }}
</span>
</template>
<template v-slot:item.startedAt="{ item }">
{{ formatDateTime(item.selectable.startedAt) }}
{{ formatDateTime(item.raw.startedAt) }}
</template>
<template v-slot:item.endedAt="{ item }">
{{ formatDateTime(item.selectable.endedAt) }}
{{ formatDateTime(item.raw.endedAt) }}
</template>
<template v-slot:item.exception="{ item }">
<v-icon v-if="!item.selectable.exception" color="teal">
mdi-check
</v-icon>
<v-icon v-if="!item.raw.exception" color="primary"> mdi-check </v-icon>
<v-icon v-else color="red">mdi-close</v-icon>
</template>
</v-data-table>
Expand Down Expand Up @@ -71,18 +66,10 @@ const headers = ref([
{ title: "", key: "exception" },
]);
function onClickRow(event, item: any) {
function onClickRow(event: Event, item: any) {
router.push({ name: "run", params: { runNo: item.item.selectable.runNo } });
}
const stateChipColor = ref({
initialized: "success",
running: "primary",
exited: "warning",
finished: "warning",
closed: "warning",
});
const sortBy = reactive([
{
key: "runNo",
Expand Down

0 comments on commit 16c1417

Please sign in to comment.