feat: start finance page + correction on FieldGroup key name
This commit is contained in:
parent
dea1c89f13
commit
36dc18da4c
2 changed files with 11 additions and 22 deletions
|
|
@ -99,7 +99,7 @@ export default function FieldGroup({
|
|||
zIndex: isDragging ? 50 : 0,
|
||||
};
|
||||
|
||||
// Get all enum values, labels and names.
|
||||
// Get all enum values, labels and names.
|
||||
const enumDynamicFieldTypes = usePage().props.enumDynamicFieldTypes as DynamicFieldTypes;
|
||||
|
||||
// Set the current state of the accordion.
|
||||
|
|
@ -109,12 +109,12 @@ export default function FieldGroup({
|
|||
const currentEnum = Object.values(enumDynamicFieldTypes).find(
|
||||
(def) => def.value === currentField.type
|
||||
);
|
||||
// Set a prefix related to the current enum.
|
||||
// Set a prefix related to the current enum.
|
||||
const enumCurrentBase = `${currentEnum?.name}_`;
|
||||
|
||||
// Set the editable part of the current key.
|
||||
const [editableKey, setEditableKey] = useState<string>(() => {
|
||||
return (currentField.key.startsWith(enumCurrentBase)) ? currentField.key.split(enumCurrentBase)[1] : currentField.key;
|
||||
return (currentField.key.startsWith(enumCurrentBase)) ? currentField.key.replace(enumCurrentBase, "") : currentField.key;
|
||||
});
|
||||
|
||||
// Set the complete key (prefix + editable) that will be sent to the backend.
|
||||
|
|
@ -122,7 +122,6 @@ export default function FieldGroup({
|
|||
|
||||
// Set the state of copying key.
|
||||
const [copied, setCopied] = useState(false);
|
||||
|
||||
// Copy the complete key in the clipboard.
|
||||
const handleClick = () => {
|
||||
navigator.clipboard.writeText(completeKey);
|
||||
|
|
@ -133,7 +132,7 @@ export default function FieldGroup({
|
|||
/**
|
||||
* Reorder the elements list.
|
||||
* @param event DragEndEvent
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
const handleOnDragEnd = (event: DragEndEvent) => {
|
||||
const { active, over } = event;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
@extends('front.layouts.layout')
|
||||
|
||||
@section('title', 'Découvrez comment devenir actionnaire | Le groupe LDC')
|
||||
@section('description', 'Vous souhaitez devenir actionnaire ? Consultez toutes les informations financières et chiffres
|
||||
@section('description',
|
||||
'Vous souhaitez devenir actionnaire ? Consultez toutes les informations financières et chiffres
|
||||
clés ainsi que les dernières publications investisseurs.')
|
||||
|
||||
@section('content')
|
||||
|
|
@ -45,29 +46,18 @@
|
|||
@endphp
|
||||
<x-front.hero :hero="$hero" />
|
||||
|
||||
|
||||
<x-front.commitments.wrapper :engagements="[
|
||||
'title' => 'Agir avec nos territoires',
|
||||
'text' => nl2br(
|
||||
__(
|
||||
':ulStart :liStart des produits locaux sains et sûrs,:liEnd :liStart issus de filières toujours plus équitables,:liEnd :liStart par des femmes et des hommes responsables,:liEnd :liStart qui agissent au cœur des territoires.:liEnd :ulEnd :h4Start En 2020, le Groupe s’est fixé 4 engagements pour répondre aux enjeux du Développement Durable avec sa démarche « Agir avec nos Territoires » : Élever Durablement, Mieux Vivre Ensemble, Respecter la Terre et Bien Nourrir.:h4End',
|
||||
[
|
||||
'ulStart' => '<ul>',
|
||||
'ulEnd' => '</ul>',
|
||||
'h4Start' => '<h4>',
|
||||
'h4End' => '</h4>',
|
||||
'liStart' => '<li>',
|
||||
'liEnd' => '</li>',
|
||||
],
|
||||
),
|
||||
),
|
||||
'title' => data_get($dynamicPageModel->content, 'list_agir_avec_territoires.0.string_title'),
|
||||
'text' => clean(data_get($dynamicPageModel->content, 'list_agir_avec_territoires.0.wysiwyg_content')),
|
||||
]" id="finance_1" />
|
||||
|
||||
<x-front.pages.finance.bourse />
|
||||
{{-- <x-front.pages.finance.bourse />
|
||||
<x-front.pages.finance.finance-3 />
|
||||
<x-front.pages.finance.finance-rights />
|
||||
<x-front.pages.finance.finance-4 />
|
||||
<x-front.pages.finance.graphics />
|
||||
<x-front.pages.finance.dividend />
|
||||
<x-front.pages.finance.finance-6 />
|
||||
<x-front.pages.finance.assemblees-generales />
|
||||
<x-front.pages.finance.assemblees-generales /> --}}
|
||||
@endsection
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue