Skip to content

Commit

Permalink
fix: updated files subtable in plugins view
Browse files Browse the repository at this point in the history
  • Loading branch information
henrychoy committed Nov 5, 2024
1 parent 349036b commit 64a55dd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/views/CreatePluginFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,12 @@
description: res.data.description
}
title.value = `Edit ${res.data.filename}`
pluginFile.value.tasks = res.data.tasks
pluginFile.value.tasks.forEach((task) => {
[...task.inputParams, ... task.outputParams].forEach((param) => {
[...task.inputParams, ...task.outputParams].forEach((param) => {
param.parameterType = param.parameterType.id
})
})
initialCopy.value = JSON.parse(JSON.stringify(pluginFile.value))
} catch(err) {
notify.error(err.response.data.message)
}
Expand Down
23 changes: 17 additions & 6 deletions src/frontend/src/views/PluginsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,27 @@
class="q-ma-md"
@click="router.push(`/plugins/${row.id}/files`)"
/>
<BasicTable
<TableComponent
:columns="fileColumns"
:rows="row.files"
:title="`${row.name} Files`"
:hideSearch="true"
:hideEditTable="true"
id="fileTable"
class="q-mx-md"
:title="`${row.name} Files`"
/>
:hideCreateBtn="true"
:hideDeleteBtn="true"
:hideEditBtn="true"
:disableSelect="true"
style="margin: 0px 5vw 2vh"
>
<template #body-cell-filename="props">
<RouterLink :to="`/plugins/${row.id}/files/${props.row.id}`">
{{ props.row.filename }}
</RouterLink>
</template>
<template #body-cell-tasks="props">
<div>{{ props.row.tasks?.length }}</div>
</template>
</TableComponent>
</template>
</TableComponent>
<q-btn
Expand Down Expand Up @@ -73,7 +85,6 @@

<script setup>
import TableComponent from '@/components/TableComponent.vue'
import BasicTable from '@/components/BasicTable.vue'
import PluginDialog from '@/dialogs/PluginDialog.vue'
import DeleteDialog from '@/dialogs/DeleteDialog.vue'
import { ref, watch } from 'vue'
Expand Down

0 comments on commit 64a55dd

Please sign in to comment.