project blueprint - add optional steps
This commit is contained in:
parent
0df79ba8a8
commit
595c275100
5 changed files with 67 additions and 13 deletions
|
|
@ -2,12 +2,16 @@ Title: Miss Dior Blooming Bouquet
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Optionalsteps: industrialIdeation, physicalSample
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Currentstep: brief
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
Client: - page://G418qZ4ABsoWFx4i
|
Client: - page://G418qZ4ABsoWFx4i
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Currentstep: clientBrief
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Uuid: 513oEM4JFuWBt2Bw
|
Uuid: 513oEM4JFuWBt2Bw
|
||||||
|
|
@ -8,16 +8,25 @@ tabs:
|
||||||
columns:
|
columns:
|
||||||
- width: 1/1
|
- width: 1/1
|
||||||
fields:
|
fields:
|
||||||
|
optionalSteps:
|
||||||
|
label: Étapes optionnelles
|
||||||
|
type: checkboxes
|
||||||
|
width: 1/2
|
||||||
|
columns: 2
|
||||||
|
options:
|
||||||
|
industrialIdeation: Idéation industrielle
|
||||||
|
physicalSample: Échantillon physique
|
||||||
|
help: Après modification, sauvegardez et rechargez la page pour mettre à jour la liste ci-dessous.
|
||||||
currentStep:
|
currentStep:
|
||||||
label: Étape en cours
|
label: Étape en cours
|
||||||
type: radio
|
type: radio
|
||||||
columns: 4
|
columns: 6
|
||||||
default: clientBrief
|
default: clientBrief
|
||||||
options:
|
options:
|
||||||
clientBrief: Brief client
|
type: query
|
||||||
proposal: Offre commerciale
|
query: page.getSteps
|
||||||
extendedBrief: Brief enrichi
|
text: "{{ item.text }}"
|
||||||
virtualSample: Échantillon virtuel
|
value: "{{ item.value }}"
|
||||||
- width: 1/3
|
- width: 1/3
|
||||||
fields:
|
fields:
|
||||||
client:
|
client:
|
||||||
|
|
|
||||||
42
public/site/models/project.php
Normal file
42
public/site/models/project.php
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class ProjectPage extends Page {
|
||||||
|
public function getSteps() {
|
||||||
|
|
||||||
|
$steps = [
|
||||||
|
[
|
||||||
|
'text' => '1. Brief',
|
||||||
|
'value' => 'brief'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'text' => '2. Offre commerciale',
|
||||||
|
'value' => 'proposal'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'text' => '3. Brief enrichi',
|
||||||
|
'value' => 'extendedBrief'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
if (str_contains($this->optionalSteps(), 'industrialIdeation')) {
|
||||||
|
$steps[] = [
|
||||||
|
'text' => '4. Idéation industrielle',
|
||||||
|
'value' => 'industrialIdeation'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$steps[] = [
|
||||||
|
'text' => count($steps) + 1 . '. Échantillon virtuel',
|
||||||
|
'value' => 'virtualSample'
|
||||||
|
];
|
||||||
|
|
||||||
|
if (str_contains($this->optionalSteps(), 'physicalSample')) {
|
||||||
|
$steps[] = [
|
||||||
|
'text' => count($steps) + 1 . '.Échantillon physique',
|
||||||
|
'value' => 'physicalSample'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $steps;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$children = $page->children()->map(function ($child) {
|
$children = $page->children()->map(function ($child) {
|
||||||
return [
|
return [
|
||||||
'title' => $child->title()->value(),
|
'title' => $child->title()->value(),
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@
|
||||||
<button class="btn | ml-auto">Demander un RDV</button>
|
<button class="btn | ml-auto">Demander un RDV</button>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- <component :is="stepsComponents[currentStep]" @update:step="changeStep" /> -->
|
<component :is="stepsComponents[currentStep]" @update:step="changeStep" />
|
||||||
<!-- <VirtualSample /> -->
|
<!-- <VirtualSample /> -->
|
||||||
|
|
||||||
<!-- Kanban: Status Brief Enrichi -->
|
<!-- Kanban: Status Brief Enrichi -->
|
||||||
|
|
||||||
<div class="kanban">
|
<!-- <div class="kanban">
|
||||||
<section
|
<section
|
||||||
class="flex-1"
|
class="flex-1"
|
||||||
aria-labelledby="votre-brief-label"
|
aria-labelledby="votre-brief-label"
|
||||||
|
|
@ -150,7 +150,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div> -->
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue