@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 = $work->offer_id; $hide_column = ['action', 'folder']; $hide_button = $work->status == 'organized' ? ['document_migration'] : ['document_migration', 'document_upload', 'worksheet_create']; $issue_ticket = $work->issue_ticket; $worksheet = []; if($issue_ticket) // ha hibajegy { if($issue_ticket->worksheet_id) $worksheet = App\Models\Worksheet::where('id', $issue_ticket->worksheet_id)->get(); $document_types = ['issue_ticket', 'survey']; $document_model = 'IssueTicket'; $document_id = $issue_ticket->id; $documents = App\Models\Document::where('target_type', 'App\Models\\'.$document_model)->where('target_id', $document_id)->get(); $hide_button = array_filter($hide_button, function($value) { return $value !== 'document_upload'; }); } if($work->task_id) // ha naptárbejegyzés { $documents = new App\Models\Document; $document_types = ['calendar_task']; $document_model = 'Work'; $document_id = $work ? $work->id : null; $documents = $work ? $documents->where('target_type', 'App\Models\\'.$document_model)->where('target_id', $document_id)->get() : null; } @endphp @if(!$issue_ticket && !$work->task_id) @can('show-document-plan') @php array_push($document_types, 'handover_report') @endphp @endcan @can('show-document-location') @php array_push($document_types, 'location') @endphp @endcan @endif @extends('layouts.admin') @section('main-content')
Munka részletei @if($issue_ticket) (Hibaazonosító: {{$issue_ticket->issue_number}})@endif
@if(App\Models\Offer::find($work->offer_id) && App\Models\Offer::find($work->offer_id)->final_payment_method == 'cash_locally') @endif @if(!$work->task_id)
@if(!$issue_ticket) {{ $work?->offer?->offer_number ?? null }} @else {{$issue_ticket->issue_number}} @endif {{ $work?->process?->client?->company_name ? $work?->process?->client?->company_name.' -' : '' }} {{ $work?->process?->project_name ? $work?->process?->project_name.',' : '' }} {{ $work?->process?->contact_name ? $work?->process?->contact_name : $work?->process?->client?->full_name }}
{{ $work?->process?->address?->full_address }}

@if($work?->process?->contact_phone || $work?->process?->client?->phone) {{ $phone }} @endif

@else
{{$work->task->title}}
@endif

@if(!$work->task_id) @if(!$issue_ticket) @if(!$issue_ticket && $work->offer->work_description)
Munkavégzés leírása: {{$work->offer->work_description ?? ''}}
@endif @if($work->description)
Feladat leírása: {{$work->description ?? ''}}
@endif {{-- @if($work->offer->order_description)
Megrendelés leírása: {{$work->offer->order_description ?? ''}}
@endif @if($work->offer->description)
Ajánlat leírása: {{$work->offer->description ?? ''}}
@endif --}} @else
Hibabejelentés leírása: {{$issue_ticket->description ?? ''}}
Hibajavítás leírása: {{$issue_ticket->fix_description ?? ''}}
@if($work->description)
Feladat leírása: {{$work->description ?? ''}}
@endif @if(isset($issue_ticket->history))
@include('issue_ticket.history', [$issue_ticket]) @endif @endif @else
Leírás: {{$work->task->description}}
@endif
@include('comments.panel', ['comment_target' => $work, 'hide_send' => true])
@if(!$work->task_id)

@php $supplier_orders = $work->offer->supplier_orders; if($issue_ticket) $supplier_orders = $supplier_orders->where('issue_ticket_id', $issue_ticket->id); @endphp @foreach ($supplier_orders as $supplier_order) @php $supplier = App\Models\Supplier::find($supplier_order->supplier_id); if($work->offer->has_additional_suppliers) { if(!$supplier_order->is_additional_suppliers) continue; } @endphp
Rövid elnevezés:
{{$supplier->short_name ?? '-'}}
Rendelés azonosító:
{{$supplier_order->supplier_order_number ?? '-'}}
Termék leírás:
{{$supplier_order->description ?? '-'}}
Tárolási azonosító:
{{$supplier_order->stock ?? '-'}}
@endforeach
@endif

Dokumentumok

@include('process.tables.documents', [ 'documents' => $documents, 'types' => $document_types, 'model' => $document_model, 'id' => $document_id, 'table_id' => 'dt_offer', 'hide_column' => $hide_column, 'hide_button' => $hide_button, ])
@if($work->offer_id)

Munkalapok / jegyzőkönyvek

@include('process.tables.worksheets', [ 'work' => $work, 'worksheet' => $worksheet, 'table_id' => 'dt_worksheet', 'hide_button' => $hide_button, ])
@else @endif
@endsection