{{ __('site.start_activity.current_status') }} @php // prefer translation from related statut record when available $statutText = trans_field($projet->statut, 'statut') ?? null; @endphp
@if($projet->id_statut == 1)
{{ $statutText ?? __('site.start_activity.status.accepted') }}
@elseif($projet->id_statut == 3)
{{ $statutText ?? __('site.start_activity.status.rejected') }}
@else
{{ $statutText ?? __('site.start_activity.status.pending') }}
@endif
@php
// prefer the project's own comment, otherwise use the relevant history comment (if any)
$currentComment = !empty($projet->commentaire_motif) ? $projet->commentaire_motif : ($relevantHistory->commentaire ?? null);
$historyAuthor = $relevantHistory->changer->name ?? $relevantHistory->changed_by ?? null;
$historyAt = isset($relevantHistory->created_at) ? $relevantHistory->created_at->format('Y-m-d H:i') : null;
@endphp
@if(!empty($currentComment))
{{ __('site.start_activity.rejection_reason_label') }}
{{ $currentComment }}
@endif
{{-- IDENTITÉ --}}
{{ __('site.full_name_label') }} {{ $user->nom_prenom ?? '-' }}
{{ __('site.place_of_birth') }} {{ $user->lieu_naissance ?? '-' }}
{{ __('site.date_of_birth') }} {{ $user->date_naissance ?? '-' }}
{{ __('site.identity_type_label') }} {{ trans_field($user->typeIdentite,'type') ?? '-' }}
{{-- Identité spécifique --}}
@if($user->id_type_identite == 1)
{{ __('site.cin_label') }}
{{ $user->cin ?? '-' }}
{{ __('site.cin_issue_date_label') }}
{{ $user->date_delivrance_cin ?? '-' }}
@elseif($user->id_type_identite == 2)
{{ __('site.passport_label') }}
{{ $user->passport ?? '-' }}
@elseif($user->id_type_identite == 3)
{{ __('site.fiscal_id_label') }}
{{ $user->num_fiscal ?? '-' }}
@endif
{{ __('site.personal_address') }}
{{ $user->adresse ?? '-' }}
{{ __('site.education_level') }}
{{ $projet->niveau_etude_user ?? __('site.not_specified') }}
{{ __('site.last_degree') }}
{{ $projet->dernier_diplome_user ?? __('site.not_specified') }}
{{-- PROJECT CHARACTERISTICS --}}
@foreach([ ['flag'=>$projet->espace_spectacle, 'label'=>__('site.espace_spectacle_label'), 'value'=>$projet->caracteristique_spec], ['flag'=>$projet->espace_sportif, 'label'=>__('site.espace_sportif_label'), 'value'=>$projet->caracteristique_sportif], ['flag'=>$projet->espace_activite_service, 'label'=>__('site.espace_service_label'), 'value'=>$projet->caracteristique_activite_serv], ['flag'=>$projet->espace_activite_culturelle, 'label'=>__('site.espace_culturel_label'), 'value'=>$projet->caracteristique_activite_cult], ] as $item) @if($item['flag'])
✔ {{ $item['label'] }} @if(!empty($item['value'])) {{ $item['value'] }} @endif
@endif @endforeach @if(!$projet->espace_spectacle && !$projet->espace_sportif && !$projet->espace_activite_service && !$projet->espace_activite_culturelle)
{{ __('site.not_specified') }}
@endif
{{-- NEW: PROJECT NATURE & IMMOBILIER DETAILS (integrated block adapted to interface style) --}}
@php
// helper to build a public URL from stored file path (best-effort)
$buildFileUrl = function ($path) {
if (!$path) return null;
// already a full URL?
if (filter_var($path, FILTER_VALIDATE_URL)) {
return $path;
}
// If path contains shared_uploads, generate a URL to the named route using the basename.
// This avoids handing absolute filesystem paths (or directories) into the URL.
if (\Illuminate\Support\Str::contains($path, 'shared_uploads')) {
$filename = basename($path);
try {
// make sure the named route exists: route('shared.image', ['filename' => $filename])
return route('shared.image', ['filename' => $filename]);
} catch (\Throwable $ex) {
// fallback: build a safe URL (encode filename)
return url('/shared_uploads/images/' . rawurlencode($filename));
}
}
// If path already contains '/storage/' it's likely publicly accessible via asset()
if (\Illuminate\Support\Str::contains($path, '/storage/')) {
return asset($path);
}
// generic fallback (relative to web root)
return url('/' . ltrim($path, '/'));
};
// selected labels for selects
$selectedType = $type_imm->firstWhere('id_type', $projet->id_imm);
$selectedUsage = $usage_immo->firstWhere('id_usage_imm', $projet->id_usage_immo);
// file urls
$certPath = $projet->certif_class_immobiliere ?? null;
$contratPath = $projet->copie_contrat_loc_prop ?? null;
$certUrl = $certPath ? $buildFileUrl($certPath) : null;
$contratUrl = $contratPath ? $buildFileUrl($contratPath) : null;
@endphp
{{-- Nature du projet --}}
{{ __('site.choose_nature') }} {{ trans_field($projet->natureProjet, 'nature') ?? __('site.not_specified') }}
{{-- Nom du projet & Adresse --}}
{{ __('site.jeunesse.form.label_project_name') }}
{{ $projet->nom_projet ?? __('site.not_specified') }}
{{ __('site.jeunesse.form.label_project_address') }}
{{ $projet->adresse_siege ?? __('site.not_specified') }}
{{-- Type immobilier & Certificat --}}
{{ __('site.immobilier.label_type') }}
@if($selectedType)
{{ trans_field($selectedType, 'type') }}
@else
{{ __('site.not_specified') }}
@endif
{{ __('site.immobilier.label_certificat') }}
@if($certUrl)
{{ __('site.show_current_file') }}
@elseif($certPath)
{{ \Illuminate\Support\Str::limit($certPath, 60) }}
@else
{{ __('site.not_specified') }}
@endif
{{-- Usage immobilier & Copie contrat --}}
{{ __('site.immobilier.label_usage') }}
@if($selectedUsage)
{{ trans_field($selectedUsage, 'usage') }}
@else
{{ __('site.not_specified') }}
@endif
{{ __('site.immobilier.label_copie_contrat') }}
@if($contratUrl)
{{ __('site.show_current_file') }}
@elseif($contratPath)
{{ \Illuminate\Support\Str::limit($contratPath, 60) }}
@else
{{ __('site.not_specified') }}
@endif
{{-- Gouvernorat & Délégation --}}
{{ __('site.jeunesse.form.label_gouvernorat') }}
{{ trans_field($projet->gouvernorat, 'nom') ?? __('site.not_specified') }}
{{ __('site.jeunesse.form.label_delegation') }}
{{ trans_field($projet->delegation, 'nom') ?? __('site.not_specified') }}
{{-- Code postal --}}
{{ __('site.jeunesse.form.label_postal_code') }}
{{ $projet->code_postal ?? __('site.not_specified') }}
{{-- DIRECTOR --}}
{{ __('site.full_name_label') }} {{ $projet->directeur->nom_prenom_d ?? __('site.not_specified') }}
{{ __('site.cin_label') }} {{ $projet->directeur->num_cin ?? __('site.not_specified') }}
{{ __('site.cin_issue_date_label') }} {{ $projet->directeur->date_delivrance ?? __('site.not_specified') }}
{{ __('site.cin_issue_place_label') }} {{ $projet->directeur->lieu_delivrance ?? __('site.not_specified') }}
{{ __('site.education_level') }} {{ $projet->directeur->niveau_etude ?? __('site.not_specified') }}
{{ __('site.last_degree') }} {{ $projet->directeur->dernier_diplome_obtenu ?? __('site.not_specified') }}
{{-- INVESTISSEMENTS --}}