project blueprint - optional steps working

This commit is contained in:
isUnknown 2024-09-26 17:21:24 +02:00
parent 595c275100
commit 8da0fb0e36
30 changed files with 296 additions and 127 deletions

View file

@ -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;
}