This commit is contained in:
isUnknown 2024-11-28 14:45:45 +01:00
parent cca389f1b0
commit 7764f4651c
17 changed files with 40 additions and 47 deletions

View file

@ -0,0 +1,5 @@
Uuid: WrFkfiMVZuxwdYad
----
Comments:

View file

@ -2,11 +2,11 @@ Title: Échantillon virtuel
----
Rawglass: - file://inTVYmCtOtEsv5eV
Rawglass: - file://WrFkfiMVZuxwdYad
----
Finishedglass: - file://pXjr94mzDdcxVMVv
Finishedglass: - file://6pNYNJpB2BCTWAEn
----

View file

@ -28,7 +28,9 @@ tabs:
label: PDF
type: files
multiple: false
uploads: pdf
template: pdf
accept:
extension: pdf
description:
type: textarea
size: tiny
@ -37,6 +39,6 @@ tabs:
moodboard:
label: Images
type: files
uploads: image
template: image
layout: cards
size: medium

View file

@ -41,11 +41,11 @@ tabs:
label: Verre brut
type: files
multiple: false
uploads: pdf
template: pdf
finishedGlass:
label: Verre parachevé
type: files
mutliple: false
uploads: pdf
template: pdf
stepName:
type: hidden

View file

@ -15,9 +15,9 @@ function getFileData($file) {
$data['tags'] = $file->tags()->split();
};
if($file->comments()->exists()) {
$data['comments'] = Data::decode($file->comments()->value(), 'yaml');
}
if($file->extension() == "pdf") {
$data['comments'] = $file->comments()->exists() && $file->comments() ? Data::decode($file->comments()->value(), 'yaml') : [];
}
return $data;
}