DTL proposals : add custom titles

This commit is contained in:
isUnknown 2025-01-27 15:51:26 +01:00
parent 8e12988961
commit 46b0e8a4e0
3 changed files with 26 additions and 6 deletions

View file

@ -40,6 +40,9 @@ fields:
type: headline
label: La proposition
DTLProposalTitle:
label: Titre
type: text
DTLProposalLocation:
label: Localisation
help: Quelle étape contient la proposition Design to Light ?

View file

@ -80,6 +80,7 @@ function processDTLProposals($page) {
if ($proposalPage && $proposalFile) {
$index = $proposalPage->pdf()->toFiles()->indexOf($proposalFile);
$DTLProposal = [
"title" => $proposal->DTLProposalTitle()->isNotEmpty() ? (string) $proposal->DTLProposalTitle() : null,
"location" => [
"step" => "proposal",
"source" => (string) $proposalFile->url()
@ -97,6 +98,7 @@ function processDTLProposals($page) {
if ($proposalPage && $proposalFile) {
$DTLProposal = [
"title" => $proposal->DTLProposalTitle()->isNotEmpty() ? (string) $proposal->DTLProposalTitle() : null,
"location" => [
"step" => "industrialIdeation",
"source" => (string) $proposalFile->url()
@ -112,6 +114,7 @@ function processDTLProposals($page) {
$proposalPage = $proposal->DTLVirtualSampleDynamicTrack()->toPage();
if ($proposalPage) {
$DTLProposal = [
"title" => $proposal->DTLProposalTitle()->isNotEmpty() ? (string) $proposal->DTLProposalTitle() : null,
"location" => [
"step" => "virtualSample",
"type" => "dynamic",
@ -129,6 +132,7 @@ function processDTLProposals($page) {
$proposalFile = $proposal->DTLVirtualSampleStaticTrack()->toFile();
if ($proposalPage && $proposalFile) {
$DTLProposal = [
"title" => $proposal->DTLProposalTitle()->isNotEmpty() ? (string) $proposal->DTLProposalTitle() : null,
"location" => [
"step" => "virtualSample",
"type" => "static",