@php error_reporting(0) @endphp @extends('layouts.app',[ 'class' => '', 'folderActive' => '', 'elementActive' => '' ]) @section('content')
{{ $operation['operation_title'] }}
Opération ID : {{ $operation['operation_id'] }}
{{ config('various.operation_status.' . $operation['statut_operation']) }}
{{ $operation['operation_status_desc'] }} @if ($total_rapport_101 + $total_rapport_103 < ($operation['target_objectif'] * $rows) / 100) @endif @if ((auth()->user()->user_type === 1 && auth()->user()->client_id === 0) || !isset(auth()->user()->client_id)) @if ($operation['statut_operation'] == -1)
@csrf
@endif @if ($operation['statut_operation'] == 0)
@csrf
@endif @if ($operation['statut_operation'] == 1)
@csrf
@endif @if ($operation['statut_operation'] == 2)
@csrf
@endif @endif @if ((auth()->user()->user_type === 1 && auth()->user()->client_id === 0) || !isset(auth()->user()->client_id)) @endif
@if ((auth()->user()->user_type === 1 && auth()->user()->client_id === 0) || !isset(auth()->user()->client_id))
@if ($current_attribution->where('active', 1)->isNotEmpty()) Opération attribué à :
@foreach ($current_attribution->where('active', 1) as $attribution) {{ $attribution->user->user_firstname }} {{ $attribution->user->user_lastname }} du {{ $attribution->start->format('d/m/Y') }} au {{ $attribution->end->format('d/m/Y') }}
@endforeach @else Opération non attribué @endif
@endif
@if (session()->has('error_insert'))
Erreur dans votre fichier :
@foreach (session()->get('error_insert') as $key => $value) @endforeach
Erreurs
Lignes concernés
{{ $key }} @foreach ($value as $line) Ligne : {{ $line }}; @endforeach
@php session()->forget('error_insert') @endphp @endif
@if (in_array($operation['statut_operation'], [0, 1, 2])) @if ((auth()->user()->user_type == 1 || (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id))) && $operation['statut_operation'] != -1) @endif @if ((auth()->user()->client_id == 0 || !isset(auth()->user()->client_id)) && auth()->user()->user_type == 1) @if (in_array($operation['statut_operation'], [1, 2]))
@csrf
@endif @endif @endif @if ($operation['statut_operation'] == -1) @endif @if ($operation['statut_operation'] == 3) @if ((auth()->user()->user_type == 1 || auth()->user()->user_type == 2) && (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id)))
@csrf
@endif @endif
{{ ($rows>0) ? $rows : 0 }}
Total des lignes
du fichier
@if ($operation['statut_operation'] != -2)
{{ $count_rdv_total }}
RDV
pris
{{ $count_rapports_total }}
Rapports
effectués
{{ $count_conformes_total }}
Rapports
conformes
@if($rows>0) {{ number_format((float) (($count_conformes_total / $rows) * 100), 2, ',', '') . '%' }} @endif
Rapports
conformes
{{ $count_non_conformes_total }}
Rapports
non conformes
{{ $count_non_verifiables_total - $count_incidents_total > 0 ? $count_non_verifiables_total - $count_incidents_total : ($count_non_verifiables_total - $count_incidents_total) * -1 }}
Rapports
non vérifiables
{{ ceil($count_incidents_total) }}
Incidents
de visite
@if (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id))
{{ ceil($count_non_renseignes_total) }}
Conformités
NON RENSEIGNEES
@endif @endif
@if (auth()->user()->client_id === 0 || !isset(auth()->user()->client_id))
{{ count($rapports) }}
Total de rapport
Total de rapport
Validé
Total de rapport
Non validé
Total de rapport
Relu
Rapport relu mais non validé
@endif @foreach ($cdp_operations as $cdp) @if ($cdp || ($cdp == 0 && count($cdp_operations) > 1))
@if ($cdp) CDP {{ $cdp }} @else @if (count($cdp_operations) > 1) Hors Coup de Pouce @endif @endif
@endif @isset($types) @foreach ($types as $value) @if ($count_precarite_left[$cdp][$value] + $count_precarite_right[$cdp][$value] > 0)
{{ $count_precarite_left[$cdp][$value] }} {{ $texte_left[$cdp] }} - {{ $value }}
@if ($count_precarite_left[$cdp][$value] > 0) @if ((auth()->user()->client_id == 0 || !isset(auth()->user()->client_id)) && auth()->user()->user_type == 1) @endif @endif
@if ($operation['statut_operation'] != -2 && ($operation['statut_operation'] != -2 && $count_precarite_left[$cdp][$value] > 0))
{{ $objectif_left[$cdp] . ' %' }}
Objectif
{{ ($count_precarite_left[$cdp][$value] * $objectif_left[$cdp]) / 100 }}
Inspections à effectuer
{{ $count_non_renseignes_precarite_left[$cdp][$value] }}
Conformités non renseignées
{{ $count_rdv_left[$cdp][$value] }}
RDV Pris
{{ $count_rapports_left[$cdp][$value] }}
Rapports effectués
{{ $count_non_conformes_precarite_left[$cdp][$value] }}
Non conformes
{{ $count_non_verifiables_precarite_left[$cdp][$value] }}
Non vérifiables
@if ($operation['operation_type'] == 1 || $operation['operation_type'] == 0 || $operation['operation_type'] == 3) {{ (float) $count_incidents_precarite[$value][0] + (float) $count_incidents_precarite[$value][1] + (float) $count_incidents_precarite[$value][2] . ' ' }} @endif @if ($operation['operation_type'] == 2 || $operation['operation_type'] == 4) {{ (float) $count_incidents_precarite[$value][0] + (float) $count_incidents_precarite[$value][1] . ' ' }} @endif @if ($operation['operation_type'] == 5) {{ (float) $count_incidents_precarite[$value][0] . ' ' }} @endif
Incidents de visite
{{ number_format(($count_conformes_precarite_left[$cdp][$value] / $count_precarite_left[$cdp][$value]) * 100,2,'.','') }} %
{{ $count_conformes_precarite_left[$cdp][$value] }} Rapports conformes
@endif
{{ $count_precarite_right[$cdp][$value] }} {{ $texte_right[$cdp] }} - {{ $value }}
@if ($count_precarite_right[$cdp][$value] > 0) @if ((auth()->user()->client_id == 0 || !isset(auth()->user()->client_id)) && auth()->user()->user_type == 1) @endif @endif
@if ($operation['statut_operation'] != -2 && ($operation['statut_operation'] != -2 && $count_precarite_right[$cdp][$value] > 0))
{{ $objectif_right[$cdp] . ' %' }}
Objectif
{{ ceil(($count_precarite_right[$cdp][$value] * $objectif_right[$cdp]) / 100) }}
Inspections à effectuer
{{ $count_non_renseignes_precarite_right[$cdp][$value] }}
Conformités non renseignées
{{ $count_rdv_right[$cdp][$value] }}
RDV Pris
{{ $count_rapports_right[$cdp][$value] }}
Rapports effectués
{{ $count_non_conformes_precarite_right[$cdp][$value] }}
Non conformes
{{ $count_non_verifiables_precarite_right[$cdp][$value] }}
Non vérifiables
@if ($operation['operation_type'] == 1 || $operation['operation_type'] == 0 || $operation['operation_type'] == 3) {{ (float) $count_incidents_precarite[$value][3] . ' ' }} @endif @if ($operation['operation_type'] == 2 || $operation['operation_type'] == 4 || $operation['operation_type'] == 5) {{ (float) $count_incidents_precarite[$value][3] + (float) $count_incidents_precarite[$value][2] . ' ' }} @endif
Incidents de visite
{{ number_format(($count_conformes_precarite_right[$cdp][$value] / $count_precarite_right[$cdp][$value]) * 100,2,'.','') }} %
{{ $count_conformes_precarite_right[$cdp][$value] }} Rapports conformes
@endif
@endif @endforeach @endisset @endforeach
Détail des rapports effectués ou en cours de validation
@php $i=0 @endphp @foreach ($rapports as $key => $rapport) @php $i++ @endphp @endforeach
ID Client Bénéficiaire Artisan Inspecteur Opération Observations Précarité Résultat Rapport conformité nom precarite
{{ $rapport['prospect_id'] }} {{ $rapport['proprietaire_name'] . ' (' . substr($rapport['proprietaire_cp'], 0, 2) . ')' }} {{ strtoupper($rapport['entreprise_travaux']) }} {{ $rapport['user_firstname'] . ' ' . $rapport['user_lastname'] }} @php $nature_travaux = unserialize($rapport['nature_travaux']); @endphp @if (is_array($nature_travaux)) @foreach ($nature_travaux as $value) {{ config('types.nature_to_type')[$value] }} @endforeach @else {{ config('types.nature_to_type')[$nature_travaux] }} @endif @if ($rapport['preuve_facture'] == 0) Facture manquante @if (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id)) @endif @endif @if ($count_doublons > 1 && (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id)))
ATTENTION DOUBLE CONFORMITE
@endif {{-- @if ($rapport['surface'] != $rapport['surface_prevue_planchers'] && (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id))) --}} {{--
SURFACE DECLAREE DIFFERENTE
--}} {{-- @endif --}}
{{ $precarite_list[$rapport['precarite']] }} @php $link = ''; $visible = 0; @endphp @if ($ope['statut_operation'] == 1 || (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id)) || $rapport['statut_rdv'] == 4 || $_SESSION['see_all_rapports'] == 1) @if (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id)) @php $link = 'target="_blank" href="/rapports/fiche_rapport/' . $rapport->rapport_id . '"'; @endphp @endif @php $aa = ' '; @endphp @if ($rapport['conformite'] == 'conforme') @php $aa = ' '; $visible = 1; @endphp @endif @if ($rapport['conformite'] == 'non_verifiable') @php $aa = ' '; $visible = 1; @endphp @endif @if ($rapport['conformite'] == 'non_conforme') @php $aa = ' '; $visible = 1; @endphp @endif @if ($rapport['conformite'] == 'non_renseigne') @php $aa = ' '; $visible = 1; @endphp @endif @endif {!! $aa ?? 'En attente de validation' !!} @if (!empty($rapport)) @if (auth()->user()->client_id != 0) @if ($rapport['statut_rdv'] < 4) En attente de validation @else @if (file_exists('storage/rapports/rapport_' . $rapport->rapport_id . '/' . $rapport['nom_rapport'] . '.pdf')) Voir le rapport validé @else En attente de validation @endif @endif @else @if($rapport_meta[$rapport->rapport_id]['relu_par']>0) Rapport relu par {{$user_list[$rapport_meta[$rapport->rapport_id]['relu_par']]['user_firstname']}} {{$user_list[$rapport_meta[$rapport->rapport_id]['relu_par']]['user_lastname']}} @endif @if ($rapport['validation'] !== 1) Rapport non validé @else @if (file_exists('storage/rapports/rapport_' . $rapport->rapport_id . '/' . $rapport['nom_rapport'] . '.pdf')) Rapport validé @else Rapport non Généré
Générer le nouveau rapport
@endif @endif @endif @endif
@if ($rapport['conformite_combles'] == 'conforme' && in_array('comble_perdu', $nature)) 1 @endif @if ($rapport['conformite_combles'] == 'non_verifiable' && in_array('comble_perdu', $nature)) 3 @endif @if ($rapport['conformite_combles'] == 'non_conforme' && in_array('comble_perdu', $nature)) 2 @endif @if ($rapport['conformite_rampants'] == 'conforme' && in_array('rampant_toiture', $nature)) 1 @endif @if ($rapport['conformite_rampants'] == 'non_verifiable' && in_array('rampant_toiture', $nature)) 3 @endif @if ($rapport['conformite_rampants'] == 'non_conforme' && in_array('rampant_toiture', $nature)) 2 @endif {{ $rapport['prospect_id'] }} {{ $rapport['proprietaire_name'] . ' (' . substr($rapport['proprietaire_cp'], 0, 2) . ')' }} {{ $rapport['precarite'] }} @if ((auth()->user()->client_id != 0 && $rapport['statut_rdv'] >= 4) || (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id))) Télécharger le rapport Excel @endif
TOTAL: {{ $i }}
@if (auth()->user()->client_id == 0 || !isset(auth()->user()->client_id))
DOUBLONS DE RDV ({{ count($doublons_rdv) }})
@foreach ($doublons_rdv as $rdv_tmp) @foreach ($rdv_tmp as $rdv) @endforeach @endforeach
Date du RDV ID Client Bénéficiaire Inspecteur Opération Précarité
{{ date('d/m/Y', strtotime($rdv['date_rdv'])) }} {{ $rdv['prospect_id'] }} {!! '' . $rdv['beneficiaire_name'] . '
' . $rdv['beneficiaire_adresse'] . '
' . $rdv['beneficiaire_cp'] . ' ' . $rdv['beneficiaire_ville'] !!}
{{ $rdv['user_firstname'] . ' ' . $rdv['user_lastname'] }} {{ config('types.type_rapport')[$rdv['type_rdv']] }} {{ $precarite_list[$rdv['precarite']] }} Voir le rdv Annuler le rdv Supprimer le rdv
RDV de l'opération restants ({{ count($rdv_left) }})
SUPPRIMER LES RDV NON ATTRIBUES @foreach ($rdv_left as $rdv) @endforeach
Date du RDV ID Client Bénéficiaire Inspecteur Opération Précarité
{{ date('d/m/Y', strtotime($rdv['date_rdv'])) }} {{ $rdv['prospect_id'] }} {!! '' . $rdv['beneficiaire_name'] . '
' . $rdv['beneficiaire_adresse'] . '
' . $rdv['beneficiaire_cp'] . ' ' . $rdv['beneficiaire_ville'] !!}
{{ $rdv->user->user_firstname . ' ' . $rdv->user->user_lastname }} {{ config('types.type_rapport')[$rdv['type_rdv']] }} {{ $precarite_list[$rdv['precarite']] }} Voir le rdv Annuler le rdv Supprimer le rdv
Rapports non facturés ({{ count($to_facture) }})
@foreach ($to_facture as $facture) @endforeach
Date du Rapport Nom du rapport
{{ date('d/m/Y', strtotime(str_replace('/', '-', $facture['date_rapport']))) }} {{ $facture['nom_rapport'] }}
@endif @if (count($liste_demandes) > 0) @php $types = [ 'comble_perdu' => 'BAR-EN-101', 'rampant_toiture' => 'BAR-EN-101', 'planchers_bas' => 'BAR-EN-103', 'ite' => 'BAR-EN-102', 'pac' => 'BAR-TH-104 Pompe a chaleur', 'ballon' => 'BAR-TH-148 Ballon thermodynamique', 'vmc' => 'BAR-TH-127 VMC simple flux', 'vmc_double' => 'BAR-TH-125 VMC double flux', 'solaire' => 'BAR-TH-101 Ballon solaire', 'biomasse' => 'BAR-TH-113 Chaudière biomasse', 'poele' => 'BAR-TH-112 Poele à granules', ]; @endphp
Liste des demandes ({{ count($liste_demandes) }})
@foreach ($liste_demandes as $demande) @endforeach
ID Client Bénéficiaire Opération Statut Action
{{ $demande['prospect_id'] }} {!! '' . $demande['beneficiaire_name'] . '
' . $demande['beneficiaire_adresse'] . '
' . $demande['beneficiaire_cp'] . ' ' . $demande['beneficiaire_ville'] !!}
@foreach (unserialize($demande['nature_renovation']) as $k => $operation) {{ $types[$operation] }}
@endforeach
@if (isset($demande['rapport'])) user()->client_id === 0 || !isset(auth()->user()->client_id)) href="../../rapports/fiche_rapport/{{ $demande['rapport'][0]->rapport_id }}" @endif class="btn btn-primary">Rapport effectué @else @if (isset($demande['rdv'])) user()->client_id === 0 || !isset(auth()->user()->client_id)) href="../../rdv/{{ $demande['rdv'][0]->rdv_id }}" @endif class="btn btn-success">RDV Planifié @else @if (auth()->user()->client_id === 0 || !isset(auth()->user()->client_id)) Prendre rdv @endif @endif @endif
@endif @endsection @section('modal') @include('modals.doc') @include('modals.operations.importation_operation') @include('modals.operations.importation_operation_audiodit') @if (auth()->user()->client_id === 0 || !isset(auth()->user()->client_id)) @include('modals.factures.rapports') @include('modals.operations.modification_operation') @include('modals.operations.simulation') @include('modals.operations.pdf_generation') @include('modals.operations.affect-planning') @include('modals.operations.modify-attribution') @endif @endsection