proposal step : handle multiple files
This commit is contained in:
parent
9ade34e6ea
commit
86d3f8b22c
7 changed files with 119 additions and 31 deletions
|
|
@ -1,4 +1,33 @@
|
|||
Comments:
|
||||
Comments:
|
||||
|
||||
-
|
||||
location:
|
||||
page:
|
||||
uri: >
|
||||
projects/miss-dior-blooming-bouquet/proposal
|
||||
title: Offre commerciale
|
||||
href: '/projects/miss-dior-blooming-bouquet?dialog=proposal&fileIndex=1'
|
||||
project:
|
||||
title: Miss Dior Blooming Bouquet
|
||||
uri: projects/miss-dior-blooming-bouquet
|
||||
file:
|
||||
uuid: file://7cCbXLUJWENOMUwh
|
||||
url: file://7cCbXLUJWENOMUwh
|
||||
position:
|
||||
pageIndex: 1
|
||||
x: '40.256495570504'
|
||||
y: '48.069498069498'
|
||||
replies: [ ]
|
||||
text: test2
|
||||
author:
|
||||
name: Adrien Payet
|
||||
email: adrien.payet@outlook.com
|
||||
uuid: user://WWjXgPWk
|
||||
role: admin
|
||||
date: 2024-11-18T16:16:54+01:00
|
||||
id: m3n65iqx
|
||||
type: comment
|
||||
isRead: false
|
||||
|
||||
----
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,43 @@
|
|||
Comments:
|
||||
|
||||
-
|
||||
location:
|
||||
page:
|
||||
uri: >
|
||||
projects/miss-dior-blooming-bouquet/proposal
|
||||
title: Offre commerciale
|
||||
href: >
|
||||
/projects/miss-dior-blooming-bouquet?dialog=proposal
|
||||
project:
|
||||
title: Miss Dior Blooming Bouquet
|
||||
uri: projects/miss-dior-blooming-bouquet
|
||||
file:
|
||||
uuid: file://3vTh1tMFeFM2JxaN
|
||||
url: file://3vTh1tMFeFM2JxaN
|
||||
position:
|
||||
pageIndex: 1
|
||||
x: '26.50821702805'
|
||||
y: '62.355212355212'
|
||||
replies: [ ]
|
||||
text: test
|
||||
author:
|
||||
name: Adrien Payet
|
||||
email: adrien.payet@outlook.com
|
||||
uuid: user://WWjXgPWk
|
||||
role: admin
|
||||
date: 2024-11-18T16:00:11+01:00
|
||||
id: m3n5k0mb
|
||||
type: comment
|
||||
isRead: false
|
||||
|
||||
----
|
||||
|
||||
Label: Offre n°2
|
||||
|
||||
----
|
||||
|
||||
Uuid: 3vTh1tMFeFM2JxaN
|
||||
|
||||
----
|
||||
|
||||
Template: pdf
|
||||
|
|
@ -2,7 +2,10 @@ Title: Offre commerciale
|
|||
|
||||
----
|
||||
|
||||
Pdf: - file://7cCbXLUJWENOMUwh
|
||||
Pdf:
|
||||
|
||||
- file://3vTh1tMFeFM2JxaN
|
||||
- file://7cCbXLUJWENOMUwh
|
||||
|
||||
----
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<section class="flex-1" :aria-labelledby="step.id" :data-status="status">
|
||||
<router-link :to="'/' + step.uri">
|
||||
<h2 :id="step.id">
|
||||
<!-- ADRIEN / TIMOTHÉE : DYNAMISER L'ICONE -->
|
||||
<span :data-icon="step.id">{{ step.label }}</span>
|
||||
</h2>
|
||||
<div class="cards | flow">
|
||||
<article v-if="step.id !== 'proposal'" class="card">
|
||||
<h2 :id="step.id">
|
||||
<!-- ADRIEN / TIMOTHÉE : DYNAMISER L'ICONE -->
|
||||
<span :data-icon="step.id">{{ step.label }}</span>
|
||||
</h2>
|
||||
<div class="cards | flow">
|
||||
<article class="card" v-if="step.id !== 'proposal'">
|
||||
<router-link :to="'/' + step.uri">
|
||||
<hgroup class="order-last">
|
||||
<h3 class="card__title | font-serif | text-lg">{{ step.label }}</h3>
|
||||
</hgroup>
|
||||
|
|
@ -57,10 +57,16 @@
|
|||
step.files[0].comments.length > 1 ? "s" : ""
|
||||
}}
|
||||
</footer>
|
||||
</article>
|
||||
</router-link>
|
||||
</article>
|
||||
|
||||
<template v-if="step.id == 'proposal' && step.files.length">
|
||||
<article class="card" v-for="file in step.files">
|
||||
<template v-if="step.id == 'proposal' && step.files.length">
|
||||
<article
|
||||
class="card"
|
||||
v-for="(file, index) in step.files"
|
||||
:key="file.name"
|
||||
>
|
||||
<router-link :to="'/' + step.uri + '&fileIndex=' + index">
|
||||
<hgroup class="order-last">
|
||||
<h3 class="card__title | font-serif | text-lg">
|
||||
{{
|
||||
|
|
@ -75,17 +81,21 @@
|
|||
>{{ dayjs(file.modified).format("DD MMMM YYYY") }}</time
|
||||
>
|
||||
</div>
|
||||
<div class="card__images" data-icon="document"></div>
|
||||
<div
|
||||
v-if="index === 0"
|
||||
class="card__images"
|
||||
data-icon="document"
|
||||
></div>
|
||||
|
||||
<footer v-if="file.comments?.length > 0">
|
||||
{{ file.comments.length }} commentaire{{
|
||||
file.comments.length > 1 ? "s" : ""
|
||||
}}
|
||||
</footer>
|
||||
</article>
|
||||
</template>
|
||||
</div>
|
||||
</router-link>
|
||||
</router-link>
|
||||
</article>
|
||||
</template>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -44,13 +44,16 @@ import { useDialogStore } from "../../../stores/dialog";
|
|||
import { useRoute, useRouter } from "vue-router";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
const dialog = useDialogStore();
|
||||
const { openedFile, comments } = storeToRefs(useDialogStore());
|
||||
openedFile.value = dialog.content.files[0];
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const dialog = useDialogStore();
|
||||
const { openedFile, comments } = storeToRefs(useDialogStore());
|
||||
|
||||
openedFile.value = route.query.fileIndex
|
||||
? dialog.content.files[route.query.fileIndex]
|
||||
: dialog.content.files[0];
|
||||
|
||||
const licenseKey = import.meta.env.VITE_VPV_LICENSE;
|
||||
useLicense({ licenseKey });
|
||||
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@
|
|||
v-for="notification in sortedNotifications"
|
||||
:key="notification.id"
|
||||
>
|
||||
<router-link
|
||||
v-if="currentTab === 'all' || !notification.isRead"
|
||||
:to="notification.location.href"
|
||||
<article
|
||||
class="notification | bg-white rounded-lg | p-16 | flow"
|
||||
:data-status="notification.isRead ? 'read' : 'unread'"
|
||||
:data-type="notification.type"
|
||||
>
|
||||
<article
|
||||
class="notification | bg-white rounded-lg | p-16 | flow"
|
||||
:data-status="notification.isRead ? 'read' : 'unread'"
|
||||
:data-type="notification.type"
|
||||
<router-link
|
||||
v-if="currentTab === 'all' || !notification.isRead"
|
||||
:to="notification.location.href"
|
||||
>
|
||||
<header>
|
||||
<p class="flex">
|
||||
|
|
@ -71,8 +71,8 @@
|
|||
>
|
||||
{{ notification.text }}
|
||||
</p>
|
||||
</article>
|
||||
</router-link>
|
||||
</router-link>
|
||||
</article>
|
||||
</template>
|
||||
<!-- <article
|
||||
class="notification | bg-white rounded-lg | p-16 | flow"
|
||||
|
|
@ -156,7 +156,7 @@ function formatDate(notification) {
|
|||
const isToday = notificationDigitalDate === todayDigitalDate;
|
||||
|
||||
if (isToday) {
|
||||
return dayjs(notification.date).format("h:m");
|
||||
return dayjs(notification.date).format("HH:mm");
|
||||
} else if (todayDigitalDate === notificationDigitalDate + 1) {
|
||||
return "hier";
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue