@extends(backpack_view('blank')) @section('head_scripts') @endsection @php $defaultBreadcrumbs = [ trans('backpack::crud.admin') => url(config('backpack.base.route_prefix'), 'dashboard'), $crud->entity_name_plural => url($crud->route), trans('backpack::crud.preview') => false, ]; // if breadcrumbs aren't defined in the CrudController, use the default breadcrumbs $breadcrumbs = $breadcrumbs ?? $defaultBreadcrumbs; $test = round(count($crud->columns()) / 2); @endphp @section('header')
@php $linkPrint = 'javascript: window.print();'; $isLink = false; if ($crud->entity_name == 'quotation') { $linkPrint = route('quotation.print', ['id' => request()->route('id')]); $isLink = true; } elseif ($crud->entity_name == 'agreement') { $linkPrint = route('agreement.print', ['id' => request()->route('id')]); $isLink = true; } elseif ($crud->entity_name == 'variation-order') { $linkPrint = route('variation-order.print', ['id' => request()->route('id')]); $isLink = true; } elseif ($crud->entity_name == 'invoice') { $linkPrint = route('invoice.print', ['id' => request()->route('id')]); $isLink = true; } elseif ($crud->entity_name == 'handover') { $linkPrint = route('handover.print', ['id' => request()->route('id')]); $isLink = true; } @endphp @if ($crud->entity_name != 'project-P&L-report') @endif

{!! $crud->getHeading() ?? $crud->entity_name_plural !!} {!! $crud->getSubheading() ?? mb_ucfirst(trans('backpack::crud.preview')) . ' ' . $crud->entity_name !!}. @if ($crud->hasAccess('list')) {{ trans('backpack::crud.back_to_all') }} {{ $crud->entity_name_plural }} @endif

@endsection @section('content')
@if ($crud->model->translationEnabled())
@endif
@foreach ($crud->columns() as $column) @if ($column['priority'] <= $test) @endif @endforeach
{!! $column['label'] !!}: @if (!isset($column['type'])) @include('crud::columns.text') @else @if (view()->exists('vendor.backpack.crud.columns.' . $column['type'])) @include('vendor.backpack.crud.columns.' . $column['type']) @else @if (view()->exists('crud::columns.' . $column['type'])) @include('crud::columns.' . $column['type']) @else @include('crud::columns.text') @endif @endif @endif
@if ($crud->entity_name == 'project-P&L-report') @include('app.project-commission-report.export') @endif
@foreach ($crud->columns() as $column) @if ($column['priority'] > $test) @endif @endforeach
{!! $column['label'] !!}: @if (!isset($column['type'])) @include('crud::columns.text') @else @if (view()->exists('vendor.backpack.crud.columns.' . $column['type'])) @include('vendor.backpack.crud.columns.' . $column['type']) @else @if (view()->exists('crud::columns.' . $column['type'])) @include('crud::columns.' . $column['type']) @else @include('crud::columns.text') @endif @endif @endif
@if ($crud->entity_name == 'project') {{ view('app.project.show') }} @endif @if ($crud->entity_name == 'quotation') {{ view('app.quotation.show') }} @endif @if ($crud->entity_name == 'agreement') {{ view('app.agreement.show') }} @endif @if ($crud->entity_name == 'variation-order') {{ view('app.variation-order.show') }} @endif @if ($crud->entity_name == 'template_quotation') {{ view('app.template.quotation.show') }} @endif @if ($crud->entity_name == 'pic-team')

Designers

@php $designer = $crud->entry->salesman; @endphp @foreach ($designer as $key => $item) @endforeach
No Name Commission(%) Commission($)
{{ $key + 1 }} {{ $item->name }} {{ $item->pivot->sales_percent }}% $ {{ $item->pivot->sales_budget }}
@endif @if ($crud->entity_name_plural == 'leads') @php if ($crud->entity_name == 'lead') { $remarks = \App\Models\LeadRemark::with('user') ->where('lead_id', $entry->getKey()) ->orderByDesc('created_at') ->get(); } elseif ($crud->entity_name == 'project') { $remarks = \App\Models\LogSales::with('user') ->where('project_id', $entry->getKey()) ->orderByDesc('created_at') ->get(); } @endphp

Appointment

@php $appointments = \App\Models\Appointment::where('lead_id', $entry->getKey()) ->orderBy('date', 'ASC') ->get(); @endphp
    @forelse ($appointments as $appointment)
  • Venue: {{ $appointment->venue }}

  • @empty
  • @endforelse

Remarks

    @php $count =0; @endphp @forelse($remarks as $remark) @if ($count == 10) @php break; @endphp @endif @if ($remark->remark_id == 0)
  • {{ $remark->remarks }}

  • @else
  • {{ $remark->remark->name }}

  • @endif @php $count++; @endphp @empty
  • @endforelse
@canany(['all-leads', 'lead-remarks']) @endcanany
@endif @if ($crud->entity_name == 'invoice') {{ view('app.invoice.show') }} @endif @if ($crud->entity_name == 'project-P&L-report') {{ view('app.project-commission-report.show') }} @endif @if ($crud->entity_name == 'handover-configuration') {{ view('app.configuration.handover-detail') }} @endif
@if ($crud->buttons()->where('stack', 'line')->count()) @include('crud::inc.button_stack', ['stack' => 'line']) @endif
@if ($crud->entity_name_plural == 'Supplier Invoices') @endif @endsection @section('after_styles') @endsection @section('after_scripts') @if ($crud->entity_name_plural == 'Supplier Invoices') @endif @if ($crud->entity_name == 'lead') {{-- FOR SOFT DELETE LEADS --}} @endif @endsection