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 { useProjectStore } from "../../stores/project";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import ClientBrief from "./cards/ClientBrief.vue";
|
import ClientBrief from "./cards/ClientBrief.vue";
|
||||||
|
import Proposal from "./cards/Proposal.vue";
|
||||||
|
|
||||||
const { step } = defineProps({
|
const { step } = defineProps({
|
||||||
step: Object,
|
step: Object,
|
||||||
|
|
@ -28,6 +29,7 @@ const { step } = defineProps({
|
||||||
|
|
||||||
const cardsMap = {
|
const cardsMap = {
|
||||||
clientBrief: ClientBrief,
|
clientBrief: ClientBrief,
|
||||||
|
proposal: Proposal,
|
||||||
};
|
};
|
||||||
|
|
||||||
const emit = defineEmits(["update:file"]);
|
const emit = defineEmits(["update:file"]);
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,16 @@
|
||||||
|
|
||||||
<DateTime :date="pdf.modified" />
|
<DateTime :date="pdf.modified" />
|
||||||
|
|
||||||
<figure
|
<template v-if="hasImage">
|
||||||
v-if="pdf.cover"
|
<figure
|
||||||
class="card__images pdf-cover"
|
v-if="pdf.cover"
|
||||||
style="aspect-ratio: unset"
|
class="card__images pdf-cover"
|
||||||
>
|
style="aspect-ratio: unset"
|
||||||
<img :src="pdf.cover" alt="" />
|
>
|
||||||
</figure>
|
<img :src="pdf.cover" alt="" />
|
||||||
<div v-else class="card__images" data-icon="document"></div>
|
</figure>
|
||||||
|
<div v-else class="card__images" data-icon="document"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<footer
|
<footer
|
||||||
v-if="pdf.comments?.length > 0"
|
v-if="pdf.comments?.length > 0"
|
||||||
|
|
@ -44,5 +46,9 @@ const { step, pdf, index } = defineProps({
|
||||||
default: 0,
|
default: 0,
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
|
hasImage: {
|
||||||
|
default: true,
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</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