Commit 5f3b56a7 by Damien Moulard

show presta products in presta admin

parent 7b23e444
......@@ -2154,4 +2154,14 @@ https://github.com/sonata-project/SonataAdminBundle/issues/4022
width: 0.1px !important;
height: 0.1px !important;
opacity: 0.01 !important;
}
.prestataire-products-families-row {
display: flex;
gap: 10px;
}
.prestataire-products-families-row .form-group {
flex-basis: 50%;
margin-bottom: 5px;
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
"/build/admin.86a2d986.js"
],
"css": [
"/build/admin.5dc0eea7.css"
"/build/admin.4de55830.css"
]
}
}
......
{
"build/app.css": "/build/app.c40ef51c.css",
"build/app.js": "/build/app.94b71822.js",
"build/admin.css": "/build/admin.5dc0eea7.css",
"build/admin.css": "/build/admin.4de55830.css",
"build/admin.js": "/build/admin.86a2d986.js",
"build/runtime.js": "/build/runtime.6ad5c9da.js",
"build/images/fa-solid-900.svg": "/build/images/fa-solid-900.a838c42a.svg",
......
......@@ -21,6 +21,7 @@ use App\Exporter\CustomDoctrineORMQuerySourceIterator;
use App\Form\Type\ContactEntityFormType;
use App\Form\Type\GeolocPrestataireFormType;
use App\Form\Type\UserFormType;
use App\Form\Type\PrestataireProductFamilyFormType;
use Doctrine\ORM\Query;
use FOS\CKEditorBundle\Form\Type\CKEditorType;
use FOS\UserBundle\Event\UserEvent;
......@@ -369,6 +370,23 @@ class PrestataireAdmin extends AbstractAdmin
->end();
}
if ($this->getConfigurationPool()->getContainer()->getParameter('presta_extra_data')) {
$formMapper
->tab('Prestataire')
->with('Prestataire', ['class' => 'col-md-6'])
->add('prestataireProductFamilies', CollectionType::class, [
'label' => 'Produits que le prestataire a renseigné',
'entry_type' => PrestataireProductFamilyFormType::class,
'required' => false,
'disabled' => true,
'entry_options' => [
'attr' => ['class' => 'prestataire-products-families-row'],
],
])
->end()
->end();
}
// @TODO : add tags model transformer if add new from text
// ->get('etats')
// ->addModelTransformer(new CallbackTransformer(
......
......@@ -10,7 +10,7 @@
{% block blockcontent %}
{% set form = getPrestataireInfosForm(app.user) %}
{# Create "template" as a macro for a product family entry in the form collection #}
{# Use macro as a template : macro for a prestataire product family entry in the form collection #}
{% import _self as formMacros %}
{% macro printPrestataireProductFamilyForm(prestataireProductFamilyForm, formName = "") %}
<div class="presta-products-family">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment