@include('partials.filters', [
'filter_route' => url('/Backoffice/leads'),
'filter_id' => 'leadFilter',
])
| Customer Name | Customer Email | Phone Number | Location | Building | Expected Date | Creation Date | Actions |
|---|---|---|---|---|---|---|---|
| {{ $value->name }} | {{ $value->email }} | {{ $value->phone_number }} | {{ $value->location }} | {{ $value->building }} | {{ $value->expected_date }} | {{ $value->created_at }} | @php $latestInst = $value->installations()->latest()->first(); $showConvert = !$latestInst || in_array(strtolower($latestInst->status), ['cancelled', 'canceled']); $actions = [ [ 'data-replace' => '#editCustomer', 'url' => '#editCustomerModal', 'ajax-url' => url( '/Backoffice/customers/' . $value->id . '/edit', ), 'name' => 'Edit Lead', 'icon' => 'pencil', ], ]; if ($showConvert) { $actions[] = ['url'=>url('/Backoffice/new/installations/'.$value->id), 'name'=>'Convert Customer', 'icon'=>'pencil']; } @endphp @include('partials.actions', [ 'actions' => $actions, ]) |
@include('customers.formleads', ['customer' => ''])