Skip to content

Commit

Permalink
fix: make typescript happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Mar 11, 2024
1 parent a7b6bf0 commit 0fe4d6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/jobs/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
}),
methods: {
async fetchData() {
let job_id = this.$route.params.id;
let job_id = (this.$route.params as { id: string }).id;
this.job = (await axios.get(hostname + `/api/job/info?job_id=${job_id}`)).data;
}
}
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/pages/jobs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
item-value="id"
@update:options="loadItems">
<template #item.id="{ item }">
<router-link :to="{ path: `/jobs/${item.id}`, params: { id: item.id } }">
{{ item.id }}
<router-link :to="{ path: `/jobs/${(item as Job).id}`, params: { id: (item as Job).id } }">
{{ (item as Job).id }}
</router-link>
</template>
</v-data-table-server>
Expand All @@ -34,6 +34,10 @@
itemsPerPage: number;
}
interface Job {
id: number;
}
export default {
data: () => ({
itemsPerPage: 10,
Expand Down

0 comments on commit 0fe4d6c

Please sign in to comment.