project blueprint - optional steps working
This commit is contained in:
parent
595c275100
commit
8da0fb0e36
30 changed files with 296 additions and 127 deletions
|
|
@ -3,39 +3,12 @@
|
|||
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 = array_map(function($child) {
|
||||
return [
|
||||
'text' => $child['content']['title'],
|
||||
'value' => $child['content']['stepname']
|
||||
];
|
||||
}
|
||||
|
||||
$steps[] = [
|
||||
'text' => count($steps) + 1 . '. Échantillon virtuel',
|
||||
'value' => 'virtualSample'
|
||||
];
|
||||
|
||||
if (str_contains($this->optionalSteps(), 'physicalSample')) {
|
||||
$steps[] = [
|
||||
'text' => count($steps) + 1 . '.Échantillon physique',
|
||||
'value' => 'physicalSample'
|
||||
];
|
||||
}
|
||||
}, $this->children()->toArray());
|
||||
|
||||
return $steps;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue