kanban > step > virtual sample : fix uri

This commit is contained in:
isUnknown 2024-12-20 10:40:44 +01:00
parent dd8d9c7fa1
commit 8c0a347d2c
7 changed files with 46 additions and 15 deletions

View file

@ -2,10 +2,7 @@
<article class="card">
<hgroup class="order-last">
<h3 class="card__title | font-serif | text-lg">
<router-link
:to="'/' + step.uri + '&fileIndex=' + index"
class="link-full"
>
<router-link :to="uri" class="link-full">
{{ pdf.label.length ? pdf.label : pdf.name.replace(".pdf", "") }}
</router-link>
</h3>
@ -42,13 +39,18 @@ import DateTime from "./DateTime.vue";
const { step, pdf, index } = defineProps({
step: Object,
pdf: Object,
index: {
default: 0,
type: Number,
},
index: Number,
hasImage: {
default: true,
type: Boolean,
},
});
const uri =
location.pathname + "?dialog=" + step.slug + "&fileIndex=" + getIndex();
function getIndex() {
if (index) return index;
return step.files.findIndex((file) => file.type === "document");
}
</script>