Skip to content

Commit

Permalink
Show data in columns rather than rows in modal
Browse files Browse the repository at this point in the history
  • Loading branch information
ToukL committed Jan 20, 2025
1 parent dbcfc97 commit 6556c95
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions resources/assets/js/volumes/components/metadataModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,27 @@
id="modal-show-metadata"
ref="modal"
v-model="show"
size="lg"
size="sm"
:title="name"
:footer="false"
>
<div class="panel panel-default table-responsive">
<div class="panel panel-default">
<table class="table">
<thead>
<tr>
<th v-for="time in times">{{ time }}</th>
<th class="text-center" v-if="times">{{ "Time" }}</th>
<th class="text-center" v-if="name !== 'Times'">{{ name }}</th>
</tr>
</thead>
<tbody>
<tr v-if="items">
<td v-for="item in items">{{ item }}</td>
<tbody v-if="name === 'Times'">
<tr v-for="time in times">
<td class="text-center">{{ time }}</td>
</tr>
</tbody>
<tbody v-else-if="times.length === items.length">
<tr v-for="(item, index) in items">
<td class="text-center">{{ times[index] }}</td>
<td class="text-center">{{ item }}</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 6556c95

Please sign in to comment.