diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1445320111_perfume-1042715_1280.jpg.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1445320111_perfume-1042715_1280.jpg.txt deleted file mode 100644 index 8555b51..0000000 --- a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1445320111_perfume-1042715_1280.jpg.txt +++ /dev/null @@ -1,9 +0,0 @@ -Date: 2024-10-02 01:10 - ----- - -Uuid: 1NmPGSM9FKgiyOwH - ----- - -Template: default \ No newline at end of file diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1510991102_perfume-2721147_1280.jpg.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1510991102_perfume-2721147_1280.jpg.txt deleted file mode 100644 index ed6aa97..0000000 --- a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1510991102_perfume-2721147_1280.jpg.txt +++ /dev/null @@ -1,9 +0,0 @@ -Date: 2024-10-02 01:10 - ----- - -Uuid: ump9516TWbjrIo7T - ----- - -Template: default \ No newline at end of file diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4049252942_perfume-2643349_1280.jpg b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3194485007_perfume-2643349_1280.jpg similarity index 100% rename from public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4049252942_perfume-2643349_1280.jpg rename to public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3194485007_perfume-2643349_1280.jpg diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3194485007_perfume-2643349_1280.jpg.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3194485007_perfume-2643349_1280.jpg.txt new file mode 100644 index 0000000..ca44fe7 --- /dev/null +++ b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3194485007_perfume-2643349_1280.jpg.txt @@ -0,0 +1,17 @@ +Date: 2024-10-02 02:10 + +---- + +Description: + +---- + +Tags: + +---- + +Uuid: RBUbSD0s5cYo0uQE + +---- + +Template: image \ No newline at end of file diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1445320111_perfume-1042715_1280.jpg b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3969630140_perfume-1042715_1280.jpg similarity index 100% rename from public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1445320111_perfume-1042715_1280.jpg rename to public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3969630140_perfume-1042715_1280.jpg diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3969630140_perfume-1042715_1280.jpg.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3969630140_perfume-1042715_1280.jpg.txt new file mode 100644 index 0000000..e6e9fb2 --- /dev/null +++ b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/3969630140_perfume-1042715_1280.jpg.txt @@ -0,0 +1,17 @@ +Description: + +---- + +Tags: coloris & nuances, DA globale + +---- + +Date: 2024-10-02 02:10 + +---- + +Uuid: gc1lqYk2YUOBgEoS + +---- + +Template: image \ No newline at end of file diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4049252942_perfume-2643349_1280.jpg.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4049252942_perfume-2643349_1280.jpg.txt deleted file mode 100644 index 37f7828..0000000 --- a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4049252942_perfume-2643349_1280.jpg.txt +++ /dev/null @@ -1,9 +0,0 @@ -Date: 2024-10-02 01:10 - ----- - -Uuid: RaQyVfBK6c8gv8pW - ----- - -Template: default \ No newline at end of file diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1510991102_perfume-2721147_1280.jpg b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4175623167_perfume-2721147_1280.jpg similarity index 100% rename from public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/1510991102_perfume-2721147_1280.jpg rename to public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4175623167_perfume-2721147_1280.jpg diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4175623167_perfume-2721147_1280.jpg.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4175623167_perfume-2721147_1280.jpg.txt new file mode 100644 index 0000000..4f6fb3c --- /dev/null +++ b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/4175623167_perfume-2721147_1280.jpg.txt @@ -0,0 +1,17 @@ +Date: 2024-10-02 02:10 + +---- + +Description: + +---- + +Tags: + +---- + +Uuid: nf6u4SZVnNUUKKU2 + +---- + +Template: image \ No newline at end of file diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/client-brief.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/client-brief.txt index 427e0b5..f09693c 100644 --- a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/client-brief.txt +++ b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/client-brief.txt @@ -16,9 +16,9 @@ Description: Sed congue magna magna lorem aliquam diam dolor arcu fusce adipisci Clientbriefimages: -- file://ump9516TWbjrIo7T -- file://RaQyVfBK6c8gv8pW -- file://1NmPGSM9FKgiyOwH +- file://gc1lqYk2YUOBgEoS +- file://RBUbSD0s5cYo0uQE +- file://nf6u4SZVnNUUKKU2 ---- diff --git a/public/content/projects/projects.txt b/public/content/projects/projects.txt index 5a90c70..656927b 100644 --- a/public/content/projects/projects.txt +++ b/public/content/projects/projects.txt @@ -2,6 +2,10 @@ Title: Projets ---- +Clientbriefimagetags: bouchon, bouton poussoir, coloris & nuances, DA globale, forme & design, matériaux & textures, parachèvements + +---- + Steps: Votre Brief, Offre Commerciale, Brief Enrichi, Rendu 360° ---- diff --git a/public/site/blueprints/files/image.yml b/public/site/blueprints/files/image.yml index d5417a3..8eac67d 100644 --- a/public/site/blueprints/files/image.yml +++ b/public/site/blueprints/files/image.yml @@ -12,6 +12,6 @@ fields: size: small width: 1/2 tags: - type: tags - # tags: - # type: tags + type: multiselect + options: query + query: page('projects').clientBriefImageTags.split diff --git a/public/site/blueprints/pages/projects.yml b/public/site/blueprints/pages/projects.yml index 61c4dee..5706efd 100644 --- a/public/site/blueprints/pages/projects.yml +++ b/public/site/blueprints/pages/projects.yml @@ -1,6 +1,12 @@ title: Projets sections: + fieldsSection: + type: fields + fields: + clientBriefImageTags: + label: Tags des images ajoutées aux briefs + type: tags drafts: extends: sections/projects headline: Brouillons diff --git a/public/site/config/routes/upload-images.php b/public/site/config/routes/upload-images.php index 2a9e1d1..010955b 100644 --- a/public/site/config/routes/upload-images.php +++ b/public/site/config/routes/upload-images.php @@ -34,7 +34,7 @@ return [ $newFile = $page->createFile([ 'source' => $upload['tmp_name'], 'filename' => $name, - 'template' => 'default', + 'template' => 'image', 'content' => [ 'date' => date('Y-m-d h:m') ] diff --git a/public/site/templates/client-brief.json.php b/public/site/templates/client-brief.json.php index 53a73dd..61c66d5 100644 --- a/public/site/templates/client-brief.json.php +++ b/public/site/templates/client-brief.json.php @@ -5,11 +5,14 @@ $images = []; foreach ($page->clientBriefImages()->toFiles() as $image) { $images[] = [ 'url' => $image->url(), - 'uuid' => (string) $image->uuid() + 'uuid' => (string) $image->uuid(), + 'tags' => page('projects')->clientBriefImageTags()->split(), + 'selectedTags' => $image->tags()->split() ]; } $specificData = [ + "tags" => $page->parent()->parent()->clientBriefImageTags()->split(), "images" => $images ]; diff --git a/src/components/project/ClientBrief/Images.vue b/src/components/project/ClientBrief/Images.vue index 5bcf94c..002762e 100644 --- a/src/components/project/ClientBrief/Images.vue +++ b/src/components/project/ClientBrief/Images.vue @@ -20,81 +20,48 @@
Filtrer par tags
- - - - - - - - - - - - - - - +
- -
+ Ajouter une ou plusieurs images + +
Tag
- + Inspirations -
+
- +
- +
- +
- +
- +
@@ -180,74 +165,24 @@ header="Détails de l’image" class="bg-white | text-grey-800 | rounded-2xl | overflow-hidden" > - +
Tags
- - - - - - - - - - - - - - +
@@ -281,10 +216,12 @@ import FileUpload from "primevue/fileupload"; import Dialog from "primevue/dialog"; import { useToast } from "primevue/usetoast"; import { usePageStore } from "../../../stores/page"; -import { ref } from "vue"; +import { ref, watch } from "vue"; +import { toPascalCase } from "../../../helpers"; const { page } = usePageStore(); const toast = useToast(); +const selectedTags = ref([]); const beforeSend = (event) => { const formData = event.formData; @@ -294,6 +231,19 @@ const beforeSend = (event) => { ); }; +const modal = ref(null); +watch(modal, (newValue) => { + if (newValue) { + newValue.selectedTags = newValue.selectedTags.map((tag) => { + if (!tag.includes("image")) { + return tag + "-image"; + } else { + return tag; + } + }); + } +}); + const images = ref(page.images); const onAdvancedUpload = (event) => { @@ -371,7 +321,6 @@ input[type="file"] { flex-grow: 1; } - #add-images { --sidebar-width: 12.5rem; counter-set: selected-images; @@ -395,7 +344,7 @@ input[type="file"] { border-left-color: var(--color-grey-800); } #add-images nav li.active::before { - content: ''; + content: ""; width: 2px; position: absolute; top: 0; @@ -428,7 +377,6 @@ input[type="file"] { height: 1.5rem; } - #image-details { width: min(100vw - var(--gutter) * 2, 62.5rem); height: min(100vh - var(--gutter) * 2, 50rem); diff --git a/src/components/project/ClientBrief/ModeSelection.vue b/src/components/project/ClientBrief/ModeSelection.vue index 8536b54..69d0c88 100644 --- a/src/components/project/ClientBrief/ModeSelection.vue +++ b/src/components/project/ClientBrief/ModeSelection.vue @@ -5,7 +5,7 @@ >
diff --git a/src/helpers/index.js b/src/helpers/index.js new file mode 100644 index 0000000..d64195a --- /dev/null +++ b/src/helpers/index.js @@ -0,0 +1,9 @@ +function toPascalCase(string) { + return string.replace(/\p{L}+/gu, function (w) { + return ( + w[0].toLocaleUpperCase("fr-FR") + w.slice(1).toLocaleLowerCase("fr-FR") + ); + }); +} + +export { toPascalCase };