@extends('layouts.base') @section('content') @section('breadcrumb') @endsection
@if(session('success')) @endif @if(session('error')) @endif @if ($errors->any()) @endif
@if($lot)

{{ $lot->name }}

{{ $program->name }}

@else

Nouveau lot

{{ $program->name }}

@endif
@if($lot) Voir le lot @endif Retour
@foreach(\App\Enums\ProductType::genderTypes() as $genderType) @endforeach
{{ isset($lot) ? 'Modifier un lot' : 'Créer un lot' }}
@csrf @if(isset($lot)) @method('PUT') @endif
Généré automatiquement à partir du numéro
Type de bien immobilier
Niveau du lot dans l'immeuble
Quote-part dans les charges communes
Orientations
@php $existingOrientations = isset($lot) ? $lot->orientations->pluck('type')->map(fn($o) => $o->value)->toArray() : []; @endphp @foreach(\App\Enums\Orientation::selectableCases() as $orientation)
value, old('orientations', $existingOrientations)) ? 'checked' : '' }}>
@endforeach
Vous pouvez sélectionner plusieurs orientations pour les lots d'angle ou traversants
Descriptions
@foreach(\App\Enums\DescriptionLotType::selectableCases() as $descType)
@php $existingDesc = isset($lot) ? $lot->descriptions->firstWhere('type', $descType->value) : null; @endphp @if($existingDesc) @endif
@endforeach
is_active ?? true) ? 'checked' : '' }}>
Prix du lot
@if(isset($lot) && $lot->prices && $lot->prices->count() > 0) @php $salePricesEdit = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_ht', 'prix_ttc', 'prix_tva_5_5', 'prix_tva_10']); }); @endphp @foreach($salePricesEdit as $index => $price)
@endforeach @endif
Prix immo
@if(isset($lot) && $lot->prices && $lot->prices->count() > 0) @php $immoPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_immo_ttc', 'prix_immo_ht']); }); $immoIndex = 0; @endphp @foreach($immoPrices as $price)
@php $immoIndex++; @endphp @endforeach @endif
Prix des travaux
@if(isset($lot) && $lot->prices && $lot->prices->count() > 0) @php $travauxPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_travaux_eligible', 'prix_travaux_non_eligible']); }); $travauxIndex = 0; @endphp @foreach($travauxPrices as $price)
@php $readOnlyKey = 'travaux_prices.'.$travauxIndex.'.read_only'; $readOnlyValue = old($readOnlyKey, $price->read_only ? 1 : 0); @endphp
@php $travauxIndex++; @endphp @endforeach @endif
Prix du loyer
@if(isset($lot) && $lot->prices && $lot->prices->count() > 0) @php $rentalPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['mensuel_ttc', 'mensuel_ht', 'mensuel_denormandie_ttc', 'mensuel_denormandie_ht', 'mensuel_garage', 'mensuel_parking']); }); $rentalIndex = 0; @endphp @foreach($rentalPrices as $price)
@php $rentalIndex++; @endphp @endforeach @endif
Frais et prix supplémentaires
@if(isset($lot) && $lot->prices && $lot->prices->count() > 0) @php $fraisPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_cuisine', 'frais_notaire', 'frais_notaire_tva_5_5', 'frais_notaire_tva_10', 'frais_pret', 'frais_gerance', 'frais_mise_copro', 'montant_depot_garantie']); }); $fraisIndex = 0; @endphp @foreach($fraisPrices as $price)
@php $fraisIndex++; @endphp @endforeach @endif
Charges
@if(isset($lot) && $lot->prices && $lot->prices->count() > 0) @php $chargePrices = $lot->prices->filter(function($price) { return in_array($price->type, ['taxe_fonciere', 'charge_copropriete']); }); $chargeIndex = 0; @endphp @foreach($chargePrices as $price)
@php $chargeIndex++; @endphp @endforeach @endif
Surfaces du lot
@if(isset($lot) && $lot->surfaces && $lot->surfaces->count() > 0) @foreach($lot->surfaces as $surfaceIndex => $surface)
@endforeach @endif
Annexes du lot
@if(isset($lot) && $lot->annexes->count() > 0) @foreach($lot->annexes as $annexeIndex => $existingAnnexe)
{{ $existingAnnexe->type->label() }}
Numéro d'identification de l'annexe
@php $annexeSurface = $existingAnnexe->surfaces->first(); @endphp @if($annexeSurface) @endif
@if($existingAnnexe->type->priceable())
@php $salePrices = $existingAnnexe->prices->filter(function($price) { return in_array($price->type, ['prix_ht', 'prix_ttc', 'prix_tva_5_5', 'prix_tva_10']); })->values(); $salePriceIdx = 0; @endphp @foreach($salePrices as $price)
@php $readOnlyKey = 'annexes_items.'.$annexeIndex.'.prices.'.$salePriceIdx.'.read_only'; $readOnlyValue = old($readOnlyKey, $price->read_only ? 1 : 0); @endphp
@php $salePriceIdx++; @endphp @endforeach
@endif @if($existingAnnexe->type->rentable())
@php $rentalPrices = $existingAnnexe->prices->filter(function($price) { return in_array($price->type, ['mensuel_garage', 'mensuel_parking', 'mensuel_ttc', 'mensuel_ht', 'mensuel_denormandie_ttc', 'mensuel_denormandie_ht']); })->values(); $rentalIndex = 0; @endphp @foreach($rentalPrices as $price)
@php $rentalIndex++; @endphp @endforeach
@endif
@endforeach @endif
@foreach(\App\Enums\ProductType::annexeTypes() as $annexeType) @endforeach

Documents PDF
@if(isset($lot) && $lot->documents->count() > 0)
@endif
Vous pouvez sélectionner plusieurs fichiers à la fois
@if(isset($formEditor) && $formEditor && $formEditor->fields->count() > 0)
Champs personnalisés
Ces champs sont spécifiques à cette application
Note : Ces champs ne concernent pas l'affichage sur le site de diffusion. Ils sont uniquement utilisés pour la gestion interne.
@foreach($formEditor->fields as $field)
@php $fieldName = $field->name ?? 'field_' . $field->id; $fieldLabel = $field->label ?? $field->type->label(); $fieldValue = old('custom_fields.' . $fieldName); if ($fieldValue === null && $field->data && isset($field->data->json['value'])) { $fieldValue = $field->data->json['value']; } @endphp @if($field->description) {{ $field->description }} @endif @if($field->type === \App\Enums\FieldType::TEXT) @elseif($field->type === \App\Enums\FieldType::CHECKBOX)
@elseif($field->type === \App\Enums\FieldType::NUMBER) @elseif($field->type === \App\Enums\FieldType::DATE) @endif
@endforeach
@endif
Annuler
@if(isset($lot))
@csrf @method('DELETE')
@endif
@include('modals.lot-assistant') @endsection