@php $disabled = false; // !in_array($offer->status, ['offer_preparing', null]); $document_types = []; // 'offer_mail', 'location', 'technical_description', 'email', 'warranty', 'survey' // 'control' $document_model = 'Offer'; $document_id = $offer->id; $offer->checkPriceChangeOffer(); // újonnan létrehozott ajánlatnál is figyeljük, hogy volt-e árváltozás @endphp {{-- Jogosultságok alapján a dokumentum típusok leküldése --}} @can('show-document-plan') @php array_push($document_types, 'plan') @endphp @endcan @can('show-document-offer_mail') @php array_push($document_types, 'offer_mail') @endphp @endcan @can('show-document-location') @php array_push($document_types, 'location') @endphp @endcan @can('show-document-worksheet') @php array_push($document_types, 'worksheet') @endphp @endcan @can('show-document-handover_report') @php array_push($document_types, 'handover_report') @endphp @endcan @can('show-document-technical_description') @php array_push($document_types, 'technical_description') @endphp @endcan @can('show-document-email') @php array_push($document_types, 'email') @endphp @endcan @can('show-document-warranty') @php array_push($document_types, 'warranty') @endphp @endcan @can('show-document-survey') @php array_push($document_types, 'survey') @endphp @endcan @can('show-document-other') @php array_push($document_types, 'other') @endphp @endcan {{-- Emailes ügyfél válaszok kezelése --}} @if (isset($offer->id) && $offer->client_response) @include('process.messages.client_response', ['offer' => $offer]) @endif @include('process.steps.components.check_messages', ['offer' => $offer]) {{-- Az ajánlat ellenőrzésre vár START --}} @php if(isset($offer->id)) (App\Models\Offer::where('id', $offer->id)->where('post_order_survey_check_required', true) ->whereHas('surveys', function ($q) { $q->whereIn('status', ['completed']); }) ->whereDoesntHave('surveys', function ($l) { $l->whereIn('status', ['organize', 'organized']); }) ->first()) ? $has_completed_post_order_survey = true : $has_completed_post_order_survey = false; @endphp @if($offer->post_order_survey_check_required && isset($offer->id) && $has_completed_post_order_survey) @endif {{-- Az ajánlat ellenőrzésre vár END --}} {{-- Árváltozás történt START --}} @if ($offer->price_change) @php $pc = ''; if($offer->price_updated_at == null) $price_change = App\Models\PriceChange::where('created_at', '>=', $offer->updated_at)->orWhere('date', '>=', date('Y-m-d'))->orderBy('date', 'asc')->get(); else $price_change = App\Models\PriceChange::where('created_at', '>=', $offer->price_change_at)->orderBy('date', 'asc')->get(); @endphp @if($price_change->count() != 0) @endif @endif {{-- Árváltozás történt END --}}

@include('process.forms.offer')
@if($offer->id)

Felmérések

@include('process.tables.surveys', ['surveys' => $offer->surveys, 'table_id' => 'dt_offer'])

Beszállítói Ajánlatok

@include('process.tables.supplier_offers', ['supplier_offers' => App\Models\SupplierOffer::OnlySupplierOffers($offer->id)->get(), 'create_button' => false, 'table_id' => 'dt_offer'])

Dokumentumok

@include('process.tables.documents', ['documents' => $offer->getDocuments(), 'types' => $document_types, 'model' => $document_model, 'id' => $document_id, 'table_id' => 'dt_offer'])
@if( $offer->status == 'offer_preparing' || $offer->status == 'arrived_from_web')
@if ($offer->status == 'offer_preparing' && $offer->offer_sent_at != null)
@csrf {{-- --}}
@endif
@if ($offer->status == 'arrived_from_web')
@csrf
@endif
@csrf
@endif @if( $offer->status == 'offer_sent' || $offer->status == 'offer_rejected' || $offer->status == 'offer_expired')

Ügyfél válasza az ajánlatra:

@csrf
@csrf {{-- Ügyfél cím hiánya, Folyamat beruházási cím hiánya START --}} @if (!$process->checkAddress()['status'] || !$client->checkAddress()['status']) @php $message1 = $process->checkAddress()['message']; $message2 = $client->checkAddress()['message']; $message3 = "Biztosan folytatni akarod?"; $nonEmptyMessages = array_filter([$message1, $message2, $message3]); $message = implode('
', $nonEmptyMessages); @endphp @endif {{-- Ügyfél cím hiánya, Folyamat beruházási cím hiánya END --}}
@endif @endif