{% extends 'dashboard/base.twig' %} {% block title %}Fiche Produit{% endblock %} {% block title_header %}Gestion du Matériel{% endblock %} {% block actions %}
{% if product is defined and product is not null and product.id %}
{% if not product.isPublish %}
Hors ligne
Publier
{% else %}
En ligne
Désactiver
{% endif %}
{% endif %} {% if product.slug != "" %} Voir sur le site {% endif %}
{% endblock %} {% block body %}
{{ form_start(form) }}
{# --- COLONNE GAUCHE --- #}
{# 00. IMAGE DU PRODUIT #}

00 Image du Produit

{# Preview Image #}
{# Input File #}
{{ form_label(form.imageFile, 'Sélectionner un fichier', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-widest mb-2 block'}}) }} {{ form_widget(form.imageFile, { 'id': 'product_image_input', 'attr': { 'class': 'block w-full text-xs text-slate-400 file:mr-4 file:py-2.5 file:px-4 file:rounded-xl file:border-0 file:text-[10px] file:font-black file:uppercase file:tracking-widest file:bg-blue-600/10 file:text-blue-500 hover:file:bg-blue-600/20 transition-all cursor-pointer' } }) }}
{# 01. INFORMATIONS GÉNÉRALES #}

01 Détails du Catalogue

{{ form_label(form.name, 'Désignation Commerciale', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(form.name, {'attr': {'placeholder': 'Ex: Château Gonflable Jungle', 'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-blue-500/20 focus:border-blue-500 transition-all py-3.5 px-5'}}) }}
{{ form_label(form.category, 'Catégorie', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(form.category, {'attr': {'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-blue-500/20 focus:border-blue-500 transition-all py-3.5 px-5'}}) }}
{{ form_label(form.ref, 'Référence Interne (SKU)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(form.ref, {'attr': {'placeholder': 'REF-000', 'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white font-mono focus:ring-blue-500/20 focus:border-blue-500 transition-all py-3.5 px-5'}}) }}
{{ form_label(form.description, 'Description détaillée', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(form.description, { 'attr': { 'is':'crm-editor', 'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-blue-500/20 focus:border-blue-500 transition-all py-3.5 px-5 min-h-[150px]', 'placeholder': 'Décrivez les dimensions, la capacité, les points forts...' } }) }} {% if form_errors(form.description) %}
{{ form_errors(form.description) }}
{% endif %}
{# 02. DIMENSIONS DU PRODUIT #}

02 Dimensions de la Structure

{# Largeur #}
{{ form_label(form.dimW, 'Largeur (m)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }}
W
{{ form_widget(form.dimW, {'attr': {'placeholder': '0.00', 'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white font-mono focus:ring-blue-500/20 focus:border-blue-500 transition-all py-3.5 pl-10 pr-5'}}) }}
{# Longueur #}
{{ form_label(form.dimP, 'Longueur (m)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }}
L
{{ form_widget(form.dimP, {'attr': {'placeholder': '0.00', 'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white font-mono focus:ring-blue-500/20 focus:border-blue-500 transition-all py-3.5 pl-10 pr-5'}}) }}
{# Hauteur #}
{{ form_label(form.dimH, 'Hauteur (m)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }}
H
{{ form_widget(form.dimH, {'attr': {'placeholder': '0.00', 'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white font-mono focus:ring-blue-500/20 focus:border-blue-500 transition-all py-3.5 pl-10 pr-5'}}) }}
{# --- COLONNE DROITE --- #}
{# 03. FINANCES & TARIFS #}

03 Finances & Tarifs

{{ form_label(form.priceDay, 'Tarif 1er Jour (€)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-widest ml-1 mb-2 block'}}) }}

Ou tarif weekend pour les barnums

{{ form_widget(form.priceDay, {'attr': {'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-emerald-400 font-black text-xl focus:ring-emerald-500/20 focus:border-emerald-500 transition-all py-4 px-5'}}) }} €HT

Com. Stripe (EEE) : 1,5% + 0,25€

~ {{ ((form.priceDay.vars.value|default(0) * 0.015) + 0.25)|number_format(2, ',', ' ') }} €

{{ form_label(form.priceSup, 'Tarif Jour Sup. (€)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-widest ml-1 mb-2 block'}}) }}
{{ form_widget(form.priceSup, {'attr': {'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-blue-400 font-black text-xl focus:ring-blue-500/20 focus:border-blue-500 transition-all py-4 px-5'}}) }} €HT

Com. Stripe (EEE) : 1,5% + 0,25€

~ {{ ((form.priceSup.vars.value|default(0) * 0.015) + 0.25)|number_format(2, ',', ' ') }} €


{{ form_label(form.caution, 'Montant de la Caution (€)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-widest ml-1 mb-2 block'}}) }}
{{ form_widget(form.caution, {'attr': {'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white font-mono focus:ring-blue-500/20 focus:border-blue-500 transition-all py-3 px-5 text-center'}}) }}

Information importante Cette somme sera prélevée sur le compte bancaire du client. Conformément aux politiques de Stripe, les fonds peuvent être bloqués pour un maximum de 4 jours.

{# FOOTER ACTIONS #}
{{ form_end(form) }} {# 04. LISTE DES OPTIONS #} {% if is_edit is defined and is_edit %}

04 Options du produit

{# LISTE DES OPTIONS #}
{% for option in product.options %}
{% if option.imageName %} {% else %} {% endif %}
{{ option.name }}
{{ option.priceHt }} € HT
{% else %}

Aucune option liée

{% endfor %}
{# FORMULAIRE D'AJOUT OPTION #}
{% endif %} {# 05. DOCUMENTS TECHNIQUES (PDF) #} {% if formDoc is defined %}

05 Documents & Notices

{# LISTE DES DOCUMENTS #}
{% for doc in product.productDocs %}
{{ doc.name }}
{{ doc.isPublic ? '● Public' : '○ Privé (Interne)' }}
{% else %}

Aucun document attaché

{% endfor %}
{# FORMULAIRE D'AJOUT DOC #} {{ form_start(formDoc) }}
{{ form_label(formDoc.name, 'Nom du document', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(formDoc.name, {'attr': {'placeholder': 'Ex: Notice technique PDF', 'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-amber-500/20 focus:border-amber-500 transition-all py-4 px-5 font-bold text-sm'}}) }}
{{ form_label(formDoc.isPublic, 'Visibilité Client', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(formDoc.isPublic, {'attr': {'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-blue-500/20 focus:border-blue-500 transition-all py-4 px-5 font-bold text-sm cursor-pointer'}}) }}
{{ form_label(formDoc.docProduct, 'Fichier PDF (Notice, Certificat...)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-widest mb-4 block text-center'}}) }} {{ form_widget(formDoc.docProduct, { 'attr': { 'class': 'block w-full text-xs text-slate-400 file:mr-4 file:py-3 file:px-6 file:rounded-xl file:border-0 file:text-[10px] file:font-black file:uppercase file:tracking-widest file:bg-amber-600 file:text-white hover:file:bg-amber-500 transition-all cursor-pointer' } }) }}
{{ form_end(formDoc) }}
{% endif %} {# 06. VIDEOS #} {% if formVideo is defined %}

06 Vidéos

{# LISTE DES VIDÉOS #}
{% for video in product.productVideos %}
{# DELETE BUTTON VIDEO #}
{% else %}

Aucune vidéo

{% endfor %}
{# FORMULAIRE D'AJOUT VIDEO #} {{ form_start(formVideo) }}
{{ form_label(formVideo.imageFile, 'Fichier Vidéo (MP4, WebM...)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-widest mb-4 block text-center'}}) }} {{ form_widget(formVideo.imageFile, { 'attr': { 'class': 'block w-full text-xs text-slate-400 file:mr-4 file:py-3 file:px-6 file:rounded-xl file:border-0 file:text-[10px] file:font-black file:uppercase file:tracking-widest file:bg-rose-600 file:text-white hover:file:bg-rose-500 transition-all cursor-pointer' } }) }}
{{ form_end(formVideo) }}
{% endif %} {# 07. PHOTOS #} {% if formPhoto is defined %}

07 Photos Supplémentaires

{# LISTE DES PHOTOS #}
{% for photo in product.productPhotos %}
{# DELETE BUTTON PHOTO #}
{% else %}

Aucune photo

{% endfor %}
{# FORMULAIRE D'AJOUT PHOTO #} {{ form_start(formPhoto) }}
{{ form_label(formPhoto.imageFile, 'Fichier Image (JPG, PNG...)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-widest mb-4 block text-center'}}) }} {{ form_widget(formPhoto.imageFile, { 'attr': { 'class': 'block w-full text-xs text-slate-400 file:mr-4 file:py-3 file:px-6 file:rounded-xl file:border-0 file:text-[10px] file:font-black file:uppercase file:tracking-widest file:bg-cyan-600 file:text-white hover:file:bg-cyan-500 transition-all cursor-pointer' } }) }}
{{ form_end(formPhoto) }}
{% endif %} {# 08. PÉRIODES BLOQUÉES #} {% if formBlocked is defined %}

08 Indisponibilités & Blocages

{# LISTE DES BLOCAGES #}
{% for blocked in product.productBlockeds %}
Indisponible

Du {{ blocked.dateStart|date('d/m/Y H:i') }}

Au {{ blocked.dateEnd|date('d/m/Y H:i') }}

{% if blocked.reason %}

{{ blocked.reason }}

{% endif %}
{# DELETE BUTTON BLOCKED #}
{% else %}

Aucune période bloquée

{% endfor %}
{# FORMULAIRE D'AJOUT BLOCAGE #} {{ form_start(formBlocked) }}
{{ form_label(formBlocked.dateStart, 'Début du blocage', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(formBlocked.dateStart, {'attr': {'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-rose-500/20 focus:border-rose-500 transition-all py-4 px-5 font-bold text-sm'}}) }}
{{ form_label(formBlocked.dateEnd, 'Fin du blocage', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(formBlocked.dateEnd, {'attr': {'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-rose-500/20 focus:border-rose-500 transition-all py-4 px-5 font-bold text-sm'}}) }}
{{ form_label(formBlocked.reason, 'Raison (Optionnel)', {'label_attr': {'class': 'text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] ml-1 mb-2 block'}}) }} {{ form_widget(formBlocked.reason, {'attr': {'placeholder': 'Ex: Maintenance annuelle, Réparation...', 'class': 'w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-rose-500/20 focus:border-rose-500 transition-all py-4 px-5 font-medium text-sm min-h-[100px]'}}) }}
{{ form_end(formBlocked) }}
{% endif %} {# 09. POINTS DE CONTRÔLE #} {% if is_edit is defined and is_edit %}

09 Points de Contrôle (Entretien)

{% for point in product.productPointControlls %}
{{ point.name }}
{% else %}

Aucun point de contrôle défini

{% endfor %}
{% endif %}
{% endblock %}