@php $infoboxes = []; @endphp {{-- Ajánlatok, Megrendelések --}} @can('show-offer') @php $infoboxes['offers'] = [ 'title' => 'Ajánlatok', 'description' => '', 'total' => App\Models\Offer::all()->count(), 'open' => false, 'task' => false, 'task_text_visible' => false, 'delayed' => false, 'web_task' => App\Models\Offer::WebTask()->count(), 'prepare' => App\Models\Offer::Prepare()->count(), 'client_indicates' => App\Models\Offer::ClientIndicates()->count(), 'contacting_client' => App\Models\Offer::ContactingClient()->count(), 'request_callback' => App\Models\Offer::RequestCallback()->count(), 'organize' => false, 'report' => false, 'total_url' => route('offers.index'), 'open_url' => false, 'task_url' => false, 'delayed_url' => false, 'web_task_url' => route('offers.index', ['view' => 'WebTask']), 'prepare_url' => route('offers.index', ['view' => 'Prepare']), 'client_indicates_url' => route('offers.index', ['view' => 'ClientIndicates']), 'contacting_client_url' => route('offers.index', ['view' => 'ContactingClient']), 'request_callback_url' => route('offers.index', ['view' => 'RequestCallback']), 'organize_url' => false, 'report_url' => false, 'modal' => false, ]; $infoboxes['orders'] = [ 'title' => 'Megrendelések', 'description' => '', 'total' => App\Models\Order::all()->count(), 'open' => App\Models\Order::task()->count(), 'task' => false, 'task_text_visible' => false, 'delayed' => false, 'send_order' => App\Models\Order::SendOrder()->count(), 'waiting_for_signed_contract' => App\Models\Order::WaitingForSignedContract()->count(), 'approval' => App\Models\Order::executiveApproval()->count(), 'awaiting_advance_payment' => App\Models\Order::AwaitingAdvancePayment()->count(), 'waiting_for_survey' => App\Models\Order::WaitingForSurvey()->count(), 'awaiting_inspection' => App\Models\Order::AwaitingInspection()->count(), 'hiring_suppliers' => App\Models\Order::HiringSuppliers()->count(), 'on_going' => App\Models\Order::OnGoing()->count(), 'deadline_expired' => App\Models\Order::DeadlineExpired()->count(), 'organize' => false, 'report' => false, 'total_url' => route('orders.index'), 'open_url' => false, 'task_url' => false, 'delayed_url' => null, 'send_order_url' => route('orders.index', ['view' => 'SendOrder']), 'waiting_for_signed_contract_url' => route('orders.index', ['view' => 'WaitingForSignedContract']), 'approval_url' => route('orders.index', ['view' => 'executiveApproval']), 'awaiting_advance_payment_url' => route('orders.index', ['view' => 'AwaitingAdvancePayment']), 'waiting_for_survey_url' => route('orders.index', ['view' => 'WaitingForSurvey']), 'awaiting_inspection_url' => route('orders.index', ['view' => 'AwaitingInspection']), 'hiring_suppliers_url' => route('orders.index', ['view' => 'HiringSuppliers']), 'on_going_url' => route('orders.index', ['view' => 'OnGoing']), 'deadline_expired_url' => route('orders.index', ['view' => 'DeadlineExpired']), 'organize_url' => false, 'report_url' => false, 'modal' => false, ]; @endphp @endcan {{-- Felmérések --}} @can('show-survey') @php $infoboxes['surveys'] = [ 'title' => 'Felmérések', 'description' => '', 'total' => App\Models\Survey::all()->count(), 'open' => false, 'task' => false, 'task_text_visible' => false, 'delayed' => App\Models\Survey::delayed()->count(), 'organize' => App\Models\Survey::organize()->count(), 'report' => App\Models\Survey::report()->count(), 'total_url' => route('surveys.index'), 'open_url' => false, 'task_url' => false, 'delayed_url' => route('surveys.index', ['view' => 'delayed']), 'organize_url' => route('surveys.organize'), 'report_url' => route('surveys.index', ['view' => 'report']), 'modal' => false, ]; @endphp @endcan {{-- Beszállítói ajánlatok, Beszállítói megrendelések --}} @can('show-supplier-offer') @php $infoboxes['supplier_offers'] = [ 'title' => 'Beszállítói ajánlatok', 'description' => '', 'total' => App\Models\SupplierOffer::OnlySupplierOffers()->get()->count(), 'open' => false, 'task' => false, 'task_text_visible' => false, 'delayed' => false, 'waiting_for_response' => App\Models\SupplierOffer::waitingForResponse()->count(), 'to_send' => App\Models\SupplierOffer::toSend()->count(), 'call_supplier' => App\Models\SupplierOffer::callSupplier()->count(), 'organize' => false, 'report' => false, 'total_url' => route('supplier_offers.index'), 'open_url' => false, 'task_url' => false, 'delayed_url' => null, 'waiting_for_response_url' => route('supplier_offers.index', ['view' => 'waitingForResponse']), 'to_send_url' => route('supplier_offers.index', ['view' => 'toSend']), 'call_supplier_url' => route('supplier_offers.index', ['view' => 'callSupplier']), 'organize_url' => false, 'report_url' => false, 'modal' => false, ]; $infoboxes['supplier_orders'] = [ 'title' => 'Beszállítói rendelések', 'description' => '', 'total' => App\Models\SupplierOrder::all()->count(), 'open' => false, 'task' => false, 'task_text_visible' => false, 'delayed' => false, 'to_order' => App\Models\SupplierOrder::ToOrder()->count(), 'confirmation_delayed' => App\Models\SupplierOrder::ConfirmationDelayed()->count(), 'awaiting_approval' => App\Models\SupplierOrder::AwaitingApproval()->count(), 'waiting_to_receive' => App\Models\SupplierOrder::WaitingToReceive()->count(), 'supplier_waybill_awaiting_upload' => App\Models\SupplierOrder::SupplierWaybillAwaitingUpload()->count(), 'supplier_deadline_expired' => App\Models\SupplierOrder::SupplierDeadlineExpired()->count(), 'organize' => false, 'report' => false, 'total_url' => route('supplier_orders.index'), 'open_url' => false, 'task_url' => false, 'delayed_url' => null, 'to_order_url' => route('supplier_orders.index', ['view' => 'toOrder']), 'confirmation_delayed_url' => route('supplier_orders.index', ['view' => 'ConfirmationDelayed']), 'awaiting_approval_url' => route('supplier_orders.index', ['view' => 'AwaitingApproval']), 'waiting_to_receive_url' => route('supplier_orders.index', ['view' => 'WaitingToReceive']), 'supplier_waybill_awaiting_upload_url' => route('supplier_orders.index', ['view' => 'SupplierWaybillAwaitingUpload']), 'supplier_deadline_expired_url' => route('supplier_orders.index', ['view' => 'SupplierDeadlineExpired']), 'organize_url' => false, 'report_url' => false, 'modal' => false, ]; @endphp @endcan {{-- Munkák --}} @can('show-work') @php $infoboxes['works'] = [ 'title' => 'Munkák', 'description' => '', 'total' => App\Models\Work::all()->count(), 'open' => false, 'task' => false, 'task_text_visible' => false, 'delayed' => App\Models\Work::delayed()->count(), 'organize' => App\Models\Work::organize()->count(), 'report' => App\Models\Work::report()->count(), 'total_url' => route('works.index'), 'open_url' => false, 'task_url' => false, 'delayed_url' => route('works.index', ['view' => 'delayed']), 'organize_url' => route('works.organize'), 'report_url' => route('works.index', ['view' => 'report']), 'modal' => false, ]; @endphp @endcan {{-- Hiányosan érkezett --}} {{-- @can('show-supplier-offer') @php $infoboxes['incomplete'] = [ 'title' => 'Hiányosan érkezett', 'description' => '', 'total' => false, 'open' => false, 'task' => App\Models\SupplierOrder::incomplete()->count(), 'task_text_visible' => false, 'delayed' => false, 'organize' => false, 'report' => false, 'total_url' => false, 'open_url' => false, 'task_url' => route('supplier_orders.index', ['view' => 'incomplete']), 'delayed_url' => null, 'organize_url' => false, 'report_url' => false, 'modal' => false, ]; @endphp @endcan --}} {{-- Jóváhagyás szükséges --}} {{-- @can('approve') @php $infoboxes['executive_approvals'] = [ 'type' => 'approval', 'title' => 'Jóváhagyások', 'description' => '', 'total' => false, 'open' => false, 'task' => App\Models\Order::executiveApproval()->count(), //App\Models\Order::approval()->count() 'task_text_visible' => false, 'delayed' => false, 'organize' => false, 'report' => false, 'total_url' => false, 'open_url' => false, 'task_url' => route('orders.index', ['view' => 'executiveApproval']), //route('orders.index', ['view' => 'approval']) 'delayed_url' => null, 'organize_url' => false, 'report_url' => false, 'modal' => false, ]; @endphp @endcan --}} @can('show-offer') @php $infoboxes['finance'] = [ 'title' => 'Pénzügy', 'description' => '', 'total' => App\Models\Payment::all()->count(), 'open' => false, 'task' => false, 'task_text_visible' => false, 'delayed' => false, 'payment_reconciliation' => App\Models\Order::PaymentReconciliation()->count(), 'comes_in_to_pay' => App\Models\Order::ComesInToPay()->count(), 'didnt_come_in_to_pay' => App\Models\Order::DidntComeInToPay()->count(), 'need_to_be_invoiced' => App\Models\Order::NeedToBeInvoiced()->count(), 'waiting_for_the_transfer' => App\Models\Order::WaitingForTheTransfer()->count(), 'did_not_transfer' => App\Models\Order::DidNotTransfer()->count(), 'pay_locally' => App\Models\Order::PayLocally()->count(), 'didnt_paid_locally' => App\Models\Order::DidntPaidLocally()->count(), 'transfer_after_work' => App\Models\Order::TransferAfterWork()->count(), 'cash_certificate' => App\Models\Payment::CashCertificate()->count(), 'organize' => false, 'report' => false, 'total_url' => route('payments.index'), 'open_url' => false, 'task_url' => false, 'delayed_url' => false, 'payment_reconciliation_url' => route('orders.index', ['view' => 'PaymentReconciliation']), 'comes_in_to_pay_url' => route('orders.index', ['view' => 'ComesInToPay']), 'didnt_come_in_to_pay_url' => route('orders.index', ['view' => 'DidntComeInToPay']), 'need_to_be_invoiced_url' => route('orders.index', ['view' => 'NeedToBeInvoiced']), 'waiting_for_the_transfer_url' => route('orders.index', ['view' => 'WaitingForTheTransfer']), 'did_not_transfer_url' => route('orders.index', ['view' => 'DidNotTransfer']), 'pay_locally_url' => route('orders.index', ['view' => 'PayLocally']), 'didnt_paid_locally_url' => route('orders.index', ['view' => 'DidntPaidLocally']), 'transfer_after_work_url' => route('orders.index', ['view' => 'TransferAfterWork']), 'cash_certificate_url' => route('payments.index', ['view' => 'CashCertificate']), 'organize_url' => false, 'report_url' => false, 'modal' => false, ]; @endphp @endcan {{-- Naptárak --}} @if(auth()->user()->can('show-complete-calendar') || auth()->user()->can('show-survey-calendar') || auth()->user()->can('show-vehicle-calendar')) @php $infoboxes['calendar'] = [ 'type' => 'calendar', 'title' => 'Naptárak', 'description' => 'Letölthető naptárak.', 'total' => false, 'open' => false, 'task' => false, 'task_text_visible' => false, 'delayed' => false, 'organize' => false, 'report' => false, 'total_url' => false, 'open_url' => false, 'task_url' => false, 'delayed_url' => null, 'organize_url' => false, 'report_url' => false, 'modal' => 'calendarModal', ]; @endphp @endif @extends('layouts.admin') @section('main-content')
@foreach ($infoboxes as $infobox)
@if ($infobox['total_url']) {!! $infobox['title'] !!} @else {!! $infobox['title'] !!} @endif {{-- @if( $infobox['title'] != 'Ajánlatok' && is_numeric($infobox['total']) && $infobox['total'] > 0 ) {{ $infobox['total'] }} @endif --}}
@if($infobox['task_text_visible']) @if($infobox['total']) Eddig összesen: {{ $infobox['total'] }} volt, amiből {{ $infobox['open'] }} van folyamatban. @else Jelenleg {{ $infobox['task'] + $infobox['organize'] + $infobox['report'] }} feladat van. @endif @endif {{$infobox['description']}}
{{-- default START --}} @if (isset($infobox['open_url']) && $infobox['open_url']) Folyamatban @if( $infobox['open'] > 0 ) {{ $infobox['open'] }} @endif @endif @if (isset($infobox['task_url']) && $infobox['task_url']) Feladatok @if( $infobox['task'] > 0 ) {{ $infobox['task'] }} @endif @endif {{-- default END --}} {{-- Ajánlatok START --}} @if (isset($infobox['web_task_url']) && $infobox['web_task_url']) Webes @if( $infobox['web_task'] > 0 ) {{ $infobox['web_task'] }} @endif @endif @if (isset($infobox['prepare_url']) && $infobox['prepare_url']) Készíteni @if( $infobox['prepare'] > 0 ) {{ $infobox['prepare'] }} @endif @endif @if (isset($infobox['client_indicates_url']) && $infobox['client_indicates_url']) Ügyfél jelez @if( $infobox['client_indicates'] > 0 ) {{ $infobox['client_indicates'] }} @endif @endif @if (isset($infobox['contacting_client_url']) && $infobox['contacting_client_url']) Ügyfelet keresni @if( $infobox['contacting_client'] > 0 ) {{ $infobox['contacting_client'] }} @endif @endif @if (isset($infobox['request_callback_url']) && $infobox['request_callback_url']) Visszahívást kér @if( $infobox['request_callback'] > 0 ) {{ $infobox['request_callback'] }} @endif @endif {{-- Ajánlatok END --}} {{-- Felmérések, Munkák START --}} @if (isset($infobox['organize_url']) && $infobox['organize_url']) Szervezni @if( $infobox['organize'] > 0 ) {{ $infobox['organize'] }} @endif @endif @if (isset($infobox['delayed_url']) && $infobox['delayed_url']) Elhúzódott @if( $infobox['delayed'] > 0 ) {{ $infobox['delayed'] }} @endif @endif @if (isset($infobox['report_url']) && $infobox['report_url']) Jelentés @if( $infobox['report'] > 0 ) {{ $infobox['report'] }} @endif @endif {{-- Felmérések, Munkák END --}} {{-- Beszállítói ajánlatok, Beszállítói megrendelések START --}} @if (isset($infobox['to_send_url']) && $infobox['to_send_url']) Küldeni @if( $infobox['to_send'] > 0 ) {{ $infobox['to_send'] }} @endif @endif @if (isset($infobox['waiting_for_response_url']) && $infobox['waiting_for_response_url']) Várjuk @if( $infobox['waiting_for_response'] > 0 ) {{ $infobox['waiting_for_response'] }} @endif @endif {{-- Beszállítói ajánlatok, Beszállítói megrendelések END --}} {{-- Beszállítói ajánlatok START --}} @if (isset($infobox['call_supplier_url']) && $infobox['call_supplier_url']) Beszállítót hívni @if( $infobox['call_supplier'] > 0 ) {{ $infobox['call_supplier'] }} @endif @endif {{-- Beszállítói ajánlatok END --}} {{-- Beszállítói megrendelések START --}} @if (isset($infobox['to_order_url']) && $infobox['to_order_url']) Rendelni @if( $infobox['to_order'] > 0 ) {{ $infobox['to_order'] }} @endif @endif @if (isset($infobox['confirmation_delayed_url']) && $infobox['confirmation_delayed_url']) Visszaigazolás késik @if( $infobox['confirmation_delayed'] > 0 ) {{ $infobox['confirmation_delayed'] }} @endif @endif @if (isset($infobox['awaiting_approval_url']) && $infobox['awaiting_approval_url']) Jóváhagyásra vár @if( $infobox['awaiting_approval'] > 0 ) {{ $infobox['awaiting_approval'] }} @endif @endif @if (isset($infobox['waiting_to_receive_url']) && $infobox['waiting_to_receive_url']) Beérkezésre vár @if( $infobox['waiting_to_receive'] > 0 ) {{ $infobox['waiting_to_receive'] }} @endif @endif @if (isset($infobox['supplier_waybill_awaiting_upload_url']) && $infobox['supplier_waybill_awaiting_upload_url']) Szállítólevél feltöltése @if( $infobox['supplier_waybill_awaiting_upload'] > 0 ) {{ $infobox['supplier_waybill_awaiting_upload'] }} @endif @endif @if (isset($infobox['supplier_deadline_expired_url']) && $infobox['supplier_deadline_expired_url']) Beszállító határideje lejárt @if( $infobox['supplier_deadline_expired'] > 0 ) {{ $infobox['supplier_deadline_expired'] }} @endif @endif {{-- Beszállítói megrendelések END --}} {{-- Megrendelések START --}} @if (isset($infobox['send_order_url']) && $infobox['send_order_url']) Szerződést küldeni @if( $infobox['send_order'] > 0 ) {{ $infobox['send_order'] }} @endif @endif {{-- Szerződést várjuk --}} @if (isset($infobox['waiting_for_signed_contract_url']) && $infobox['waiting_for_signed_contract_url']) Szerződést várjuk @if( $infobox['waiting_for_signed_contract'] > 0 ) {{ $infobox['waiting_for_signed_contract'] }} @endif @endif {{-- Előleget várjuk --}} @if (isset($infobox['awaiting_advance_payment_url']) && $infobox['awaiting_advance_payment_url']) Előleget várjuk @if( $infobox['awaiting_advance_payment'] > 0 ) {{ $infobox['awaiting_advance_payment'] }} @endif @endif @if (isset($infobox['approval_url']) && $infobox['approval_url']) Jóváhagyni @if( $infobox['approval'] > 0 ) {{ $infobox['approval'] }} @endif @endif @if (isset($infobox['waiting_for_survey_url']) && $infobox['waiting_for_survey_url']) Felmérésre vár @if( $infobox['waiting_for_survey'] > 0 ) {{ $infobox['waiting_for_survey'] }} @endif @endif {{-- Ellenőrzésre vár --}} @if (isset($infobox['awaiting_inspection_url']) && $infobox['awaiting_inspection_url']) Ellenőrzésre vár @if( $infobox['awaiting_inspection'] > 0 ) {{ $infobox['awaiting_inspection'] }} @endif @endif {{-- Beszállítók felvétele --}} @if (isset($infobox['hiring_suppliers_url']) && $infobox['hiring_suppliers_url']) Beszállítók felvétele @if( $infobox['hiring_suppliers'] > 0 ) {{ $infobox['hiring_suppliers'] }} @endif @endif {{-- Folyamatban --}} @if (isset($infobox['on_going_url']) && $infobox['on_going_url']) Folyamatban @if( $infobox['on_going'] > 0 ) {{ $infobox['on_going'] }} @endif @endif {{-- Vállalt határidő lejárt --}} @if (isset($infobox['deadline_expired_url']) && $infobox['deadline_expired_url']) Vállalt határidő lejárt @if( $infobox['deadline_expired'] > 0 ) {{ $infobox['deadline_expired'] }} @endif @endif {{-- Megrendelések END --}} {{-- Pénzügy START --}} {{-- Fizetés egyeztetése --}} @if (isset($infobox['payment_reconciliation_url']) && $infobox['payment_reconciliation_url']) Fizetés egyeztetése @if( $infobox['payment_reconciliation'] > 0 ) {{ $infobox['payment_reconciliation'] }} @endif @endif {{-- Bejön fizetni --}} @if (isset($infobox['comes_in_to_pay_url']) && $infobox['comes_in_to_pay_url']) Bejön fizetni @if( $infobox['comes_in_to_pay'] > 0 ) {{ $infobox['comes_in_to_pay'] }} @endif @endif {{-- Nem jött be fizetni --}} @if (isset($infobox['didnt_come_in_to_pay_url']) && $infobox['didnt_come_in_to_pay_url']) Nem jött be fizetni @if( $infobox['didnt_come_in_to_pay'] > 0 ) {{ $infobox['didnt_come_in_to_pay'] }} @endif @endif {{-- Számlázni kell --}} @if (isset($infobox['need_to_be_invoiced_url']) && $infobox['need_to_be_invoiced_url']) Számlázni kell @if( $infobox['need_to_be_invoiced'] > 0 ) {{ $infobox['need_to_be_invoiced'] }} @endif @endif {{-- Utalást várjuk --}} @if (isset($infobox['waiting_for_the_transfer_url']) && $infobox['waiting_for_the_transfer_url']) Utalást várjuk @if( $infobox['waiting_for_the_transfer'] > 0 ) {{ $infobox['waiting_for_the_transfer'] }} @endif @endif {{-- Nem utalt --}} @if (isset($infobox['did_not_transfer_url']) && $infobox['did_not_transfer_url']) Nem utalt @if( $infobox['did_not_transfer'] > 0 ) {{ $infobox['did_not_transfer'] }} @endif @endif {{-- Helyszínen fizet --}} @if (isset($infobox['pay_locally_url']) && $infobox['pay_locally_url']) Helyszínen fizet @if( $infobox['pay_locally'] > 0 ) {{ $infobox['pay_locally'] }} @endif @endif {{-- Helyszínen nem fizetett --}} @if (isset($infobox['didnt_paid_locally_url']) && $infobox['didnt_paid_locally_url']) Helyszínen nem fizetett @if( $infobox['didnt_paid_locally'] > 0 ) {{ $infobox['didnt_paid_locally'] }} @endif @endif {{-- Munkavégzés utáni utalás --}} @if (isset($infobox['transfer_after_work_url']) && $infobox['transfer_after_work_url']) Munkavégzés utáni utalás @if( $infobox['transfer_after_work'] > 0 ) {{ $infobox['transfer_after_work'] }} @endif @endif {{-- Készpénz igazolás --}} @if (isset($infobox['cash_certificate_url']) && $infobox['cash_certificate_url']) Készpénz igazolás @if( $infobox['cash_certificate'] > 0 ) {{ $infobox['cash_certificate'] }} @endif @endif {{-- Pénzügy END --}} @if ($infobox['modal']) @endif
@endforeach
@endsection