Merge branch 'main' of https://framagit.org/isUnknown/pdc-b2b-project-management-platform
* 'main' of https://framagit.org/isUnknown/pdc-b2b-project-management-platform: clientBriefPdf => pdf clientBriefImages => moodboard # Conflicts: # public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/client-brief.txt
This commit is contained in:
commit
9d6ee634fb
10 changed files with 17 additions and 17 deletions
|
|
@ -22,4 +22,4 @@ Uuid: 6yh1yt2Sk45Y2sOl
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Clientbriefpdf: home/927346290_au-commencement-du-college-chloe-avait-donc-fait-la-connaissance-dun-garcon.-il-etait-plus-vieux.pdf
|
Pdf: home/927346290_au-commencement-du-college-chloe-avait-donc-fait-la-connaissance-dun-garcon.-il-etait-plus-vieux.pdf
|
||||||
|
|
@ -6,7 +6,7 @@ Stepname: clientBrief
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Clientbriefpdf:
|
Pdf:
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@ Description:
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Clientbriefimages:
|
Moodboard:
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Uuid: 5NGq8baScF9pCeK9
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Clientbriefpdf:
|
Pdf:
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
@ -22,4 +22,4 @@ Description:
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Clientbriefimages:
|
Moodboard:
|
||||||
|
|
@ -2,4 +2,4 @@ Title: Nom du service
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Clientbriefimagestags: Parachèvements, Forme & design, Matériaux & textures, Coloris & nuances, Bouchon, Bouton poussoir, DA globale
|
Moodboardtags: Parachèvements, Forme & design, Matériaux & textures, Coloris & nuances, Bouchon, Bouton poussoir, DA globale
|
||||||
|
|
@ -24,7 +24,7 @@ tabs:
|
||||||
stepName:
|
stepName:
|
||||||
type: hidden
|
type: hidden
|
||||||
value: test
|
value: test
|
||||||
clientBriefPdf:
|
pdf:
|
||||||
label: PDF
|
label: PDF
|
||||||
type: files
|
type: files
|
||||||
multiple: false
|
multiple: false
|
||||||
|
|
@ -34,7 +34,7 @@ tabs:
|
||||||
size: tiny
|
size: tiny
|
||||||
buttons: false
|
buttons: false
|
||||||
maxlength: 700
|
maxlength: 700
|
||||||
clientBriefImages:
|
moodboard:
|
||||||
label: Images
|
label: Images
|
||||||
type: files
|
type: files
|
||||||
uploads: image
|
uploads: image
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ tabs:
|
||||||
label: Paramètres
|
label: Paramètres
|
||||||
type: fields
|
type: fields
|
||||||
fields:
|
fields:
|
||||||
clientBriefImagesTags:
|
moodboardTags:
|
||||||
label: Tags des images de Brief client
|
label: Tags des images de Brief client
|
||||||
help: Ensemble des tags d’images disponibles lors de la création du Brief client
|
help: Ensemble des tags d’images disponibles lors de la création du Brief client
|
||||||
type: tags
|
type: tags
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ return [
|
||||||
|
|
||||||
|
|
||||||
$page = page($pageUri);
|
$page = page($pageUri);
|
||||||
$allFiles = $page->clientBriefImages()->isNotEmpty() ? $page->clientBriefImages()->toFiles()->pluck('uuid', ',') : [];
|
$allFiles = $page->moodboard()->isNotEmpty() ? $page->moodboard()->toFiles()->pluck('uuid', ',') : [];
|
||||||
$alerts = [];
|
$alerts = [];
|
||||||
$success = [];
|
$success = [];
|
||||||
|
|
||||||
|
|
@ -125,13 +125,13 @@ return [
|
||||||
$newPage = $page->update([]);
|
$newPage = $page->update([]);
|
||||||
if (!empty($allFiles)) {
|
if (!empty($allFiles)) {
|
||||||
$newPage = $page->update([
|
$newPage = $page->update([
|
||||||
'clientBriefImages' => $allFiles
|
'moodboard' => $allFiles
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$images = [];
|
$images = [];
|
||||||
foreach ($newPage->clientBriefImages()->toFiles() as $image) {
|
foreach ($newPage->moodboard()->toFiles() as $image) {
|
||||||
$images[] = [
|
$images[] = [
|
||||||
'url' => $image->url(),
|
'url' => $image->url(),
|
||||||
'uuid' => (string) $image->uuid(),
|
'uuid' => (string) $image->uuid(),
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ return [
|
||||||
try {
|
try {
|
||||||
$name = crc32($upload['name'] . microtime()) . '_' . $upload['name'];
|
$name = crc32($upload['name'] . microtime()) . '_' . $upload['name'];
|
||||||
|
|
||||||
$existingFileId = $page->clientBriefPdf()->id() ?? null;
|
$existingFileId = $page->pdf()->id() ?? null;
|
||||||
|
|
||||||
if ($existingFileId) {
|
if ($existingFileId) {
|
||||||
$existingFile = $kirby->file($existingFileId);
|
$existingFile = $kirby->file($existingFileId);
|
||||||
|
|
@ -43,7 +43,7 @@ return [
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$newPage = $page->update([
|
$newPage = $page->update([
|
||||||
"clientBriefPdf" => $newFile->id()
|
"pdf" => $newFile->id()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $newPage->toArray();
|
return $newPage->toArray();
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
$images = [];
|
$images = [];
|
||||||
|
|
||||||
foreach ($page->clientBriefImages()->toFiles() as $image) {
|
foreach ($page->moodboard()->toFiles() as $image) {
|
||||||
$images[] = [
|
$images[] = [
|
||||||
'url' => $image->url(),
|
'url' => $image->url(),
|
||||||
'uuid' => (string) $image->uuid(),
|
'uuid' => (string) $image->uuid(),
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@ function changeStep(stepName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setInitialStep() {
|
function setInitialStep() {
|
||||||
const hasPDF = page.value.content.clientbriefpdf.length !== 0;
|
const hasPDF = page.value.content.pdf.length !== 0;
|
||||||
const hasImages =
|
const hasImages =
|
||||||
page.value.content.clientbriefimages.length !== 0 ||
|
page.value.content.moodboard.length !== 0 ||
|
||||||
page.value.content.description.length !== 0;
|
page.value.content.description.length !== 0;
|
||||||
const isEmpty = !hasPDF && !hasImages;
|
const isEmpty = !hasPDF && !hasImages;
|
||||||
if (isEmpty) return "Intro";
|
if (isEmpty) return "Intro";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue