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>
|
<template>
|
||||||
<section class="flex-1" :aria-labelledby="step.id" :data-status="status">
|
<section class="flex-1" :aria-labelledby="step.id" :data-status="status">
|
||||||
<router-link :to="'/' + step.uri">
|
<h2 :id="step.id">
|
||||||
<h2 :id="step.id">
|
<!-- ADRIEN / TIMOTHÉE : DYNAMISER L'ICONE -->
|
||||||
<!-- ADRIEN / TIMOTHÉE : DYNAMISER L'ICONE -->
|
<span :data-icon="step.id">{{ step.label }}</span>
|
||||||
<span :data-icon="step.id">{{ step.label }}</span>
|
</h2>
|
||||||
</h2>
|
<div class="cards | flow">
|
||||||
<div class="cards | flow">
|
<article class="card" v-if="step.id !== 'proposal'">
|
||||||
<article v-if="step.id !== 'proposal'" class="card">
|
<router-link :to="'/' + step.uri">
|
||||||
<hgroup class="order-last">
|
<hgroup class="order-last">
|
||||||
<h3 class="card__title | font-serif | text-lg">{{ step.label }}</h3>
|
<h3 class="card__title | font-serif | text-lg">{{ step.label }}</h3>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
|
|
@ -57,10 +57,16 @@
|
||||||
step.files[0].comments.length > 1 ? "s" : ""
|
step.files[0].comments.length > 1 ? "s" : ""
|
||||||
}}
|
}}
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</router-link>
|
||||||
|
</article>
|
||||||
|
|
||||||
<template v-if="step.id == 'proposal' && step.files.length">
|
<template v-if="step.id == 'proposal' && step.files.length">
|
||||||
<article class="card" v-for="file in step.files">
|
<article
|
||||||
|
class="card"
|
||||||
|
v-for="(file, index) in step.files"
|
||||||
|
:key="file.name"
|
||||||
|
>
|
||||||
|
<router-link :to="'/' + step.uri + '&fileIndex=' + index">
|
||||||
<hgroup class="order-last">
|
<hgroup class="order-last">
|
||||||
<h3 class="card__title | font-serif | text-lg">
|
<h3 class="card__title | font-serif | text-lg">
|
||||||
{{
|
{{
|
||||||
|
|
@ -75,17 +81,21 @@
|
||||||
>{{ dayjs(file.modified).format("DD MMMM YYYY") }}</time
|
>{{ dayjs(file.modified).format("DD MMMM YYYY") }}</time
|
||||||
>
|
>
|
||||||
</div>
|
</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">
|
<footer v-if="file.comments?.length > 0">
|
||||||
{{ file.comments.length }} commentaire{{
|
{{ file.comments.length }} commentaire{{
|
||||||
file.comments.length > 1 ? "s" : ""
|
file.comments.length > 1 ? "s" : ""
|
||||||
}}
|
}}
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</router-link>
|
||||||
</template>
|
</article>
|
||||||
</div>
|
</template>
|
||||||
</router-link>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,13 +44,16 @@ import { useDialogStore } from "../../../stores/dialog";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
const dialog = useDialogStore();
|
|
||||||
const { openedFile, comments } = storeToRefs(useDialogStore());
|
|
||||||
openedFile.value = dialog.content.files[0];
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
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;
|
const licenseKey = import.meta.env.VITE_VPV_LICENSE;
|
||||||
useLicense({ licenseKey });
|
useLicense({ licenseKey });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,14 @@
|
||||||
v-for="notification in sortedNotifications"
|
v-for="notification in sortedNotifications"
|
||||||
:key="notification.id"
|
:key="notification.id"
|
||||||
>
|
>
|
||||||
<router-link
|
<article
|
||||||
v-if="currentTab === 'all' || !notification.isRead"
|
class="notification | bg-white rounded-lg | p-16 | flow"
|
||||||
:to="notification.location.href"
|
:data-status="notification.isRead ? 'read' : 'unread'"
|
||||||
|
:data-type="notification.type"
|
||||||
>
|
>
|
||||||
<article
|
<router-link
|
||||||
class="notification | bg-white rounded-lg | p-16 | flow"
|
v-if="currentTab === 'all' || !notification.isRead"
|
||||||
:data-status="notification.isRead ? 'read' : 'unread'"
|
:to="notification.location.href"
|
||||||
:data-type="notification.type"
|
|
||||||
>
|
>
|
||||||
<header>
|
<header>
|
||||||
<p class="flex">
|
<p class="flex">
|
||||||
|
|
@ -71,8 +71,8 @@
|
||||||
>
|
>
|
||||||
{{ notification.text }}
|
{{ notification.text }}
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</router-link>
|
||||||
</router-link>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
<!-- <article
|
<!-- <article
|
||||||
class="notification | bg-white rounded-lg | p-16 | flow"
|
class="notification | bg-white rounded-lg | p-16 | flow"
|
||||||
|
|
@ -156,7 +156,7 @@ function formatDate(notification) {
|
||||||
const isToday = notificationDigitalDate === todayDigitalDate;
|
const isToday = notificationDigitalDate === todayDigitalDate;
|
||||||
|
|
||||||
if (isToday) {
|
if (isToday) {
|
||||||
return dayjs(notification.date).format("h:m");
|
return dayjs(notification.date).format("HH:mm");
|
||||||
} else if (todayDigitalDate === notificationDigitalDate + 1) {
|
} else if (todayDigitalDate === notificationDigitalDate + 1) {
|
||||||
return "hier";
|
return "hier";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue