finish proposal
This commit is contained in:
parent
cdeebbf8c8
commit
16ae67dfc4
3 changed files with 30 additions and 8 deletions
|
|
@ -21,6 +21,7 @@ import { computed } from "vue";
|
|||
import { useProjectStore } from "../../stores/project";
|
||||
import { useRouter } from "vue-router";
|
||||
import ClientBrief from "./cards/ClientBrief.vue";
|
||||
import Proposal from "./cards/Proposal.vue";
|
||||
|
||||
const { step } = defineProps({
|
||||
step: Object,
|
||||
|
|
@ -28,6 +29,7 @@ const { step } = defineProps({
|
|||
|
||||
const cardsMap = {
|
||||
clientBrief: ClientBrief,
|
||||
proposal: Proposal,
|
||||
};
|
||||
|
||||
const emit = defineEmits(["update:file"]);
|
||||
|
|
|
|||
|
|
@ -13,14 +13,16 @@
|
|||
|
||||
<DateTime :date="pdf.modified" />
|
||||
|
||||
<figure
|
||||
v-if="pdf.cover"
|
||||
class="card__images pdf-cover"
|
||||
style="aspect-ratio: unset"
|
||||
>
|
||||
<img :src="pdf.cover" alt="" />
|
||||
</figure>
|
||||
<div v-else class="card__images" data-icon="document"></div>
|
||||
<template v-if="hasImage">
|
||||
<figure
|
||||
v-if="pdf.cover"
|
||||
class="card__images pdf-cover"
|
||||
style="aspect-ratio: unset"
|
||||
>
|
||||
<img :src="pdf.cover" alt="" />
|
||||
</figure>
|
||||
<div v-else class="card__images" data-icon="document"></div>
|
||||
</template>
|
||||
|
||||
<footer
|
||||
v-if="pdf.comments?.length > 0"
|
||||
|
|
@ -44,5 +46,9 @@ const { step, pdf, index } = defineProps({
|
|||
default: 0,
|
||||
type: Number,
|
||||
},
|
||||
hasImage: {
|
||||
default: true,
|
||||
type: Boolean,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
14
src/components/project/cards/Proposal.vue
Normal file
14
src/components/project/cards/Proposal.vue
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<Document
|
||||
v-for="(pdf, index) in step.files"
|
||||
:key="pdf.uri"
|
||||
:step="step"
|
||||
:pdf="pdf"
|
||||
:index="index"
|
||||
:has-image="index === 0"
|
||||
/>
|
||||
</template>
|
||||
<script setup>
|
||||
import Document from "./Document.vue";
|
||||
const { step } = defineProps({ step: Object });
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue