@extends('layouts.app', ['title' => 'CRM | Kunden']) @section('content') {{-- Import Modal --}} {{-- Neuer Kunde Modal --}} {{-- Bearbeiten Modal --}} {{-- Löschen Modal --}} {{-- Main Content --}}
{{-- Header --}}

Kunden

CRM – Kundenverwaltung
@if(Auth::user()->get_employee->is_mgt) @endif @if(Auth::user()->get_employee->is_mgt || Auth::user()->get_employee->is_crm) @endif
{{-- Alerts --}} @if(session('error'))
{{ session('error') }} @if(session('error1'))
{{ session('error1') }}@endif @if(session('error2'))
{{ session('error2') }}@endif
@endif @if(session('msg'))
{{ session('msg') }}
@endif {{-- Suche --}}
{{-- Tabelle --}}
{{ $items->total() }} {{ $items->total() === 1 ? 'Kunde' : 'Kunden' }}
@if(Auth::user()->get_employee->is_mgt) @endif @if(Auth::user()->get_employee->is_mgt || Auth::user()->get_employee->is_crm) @endif @forelse($items as $item) @if(Auth::user()->get_employee->is_mgt) @endif @if(Auth::user()->get_employee->is_mgt || Auth::user()->get_employee->is_crm) @endif @empty @endforelse
@csrf
Datev-Konto
@csrf
@csrf
@csrf
Letzter Kontakt (Anfragen)Kategorie
{{ $item->customer_id }} @if($item->customer_code) {{ $item->customer_code }} @else @endif {{ $item->name }} @if($item->contact_history->count() > 0) {{ date('d.m.Y', strtotime($item->contact_history->sortByDesc('cch_id')->first()->created_at)) }} @else @endif @if($item->contact_history->count() > 0) @php $lastContact = $item->contact_history->sortByDesc('cch_id')->first(); @endphp @if($lastContact->is_call)@endif @if($lastContact->is_email)@endif @if($lastContact->is_post)@endif @if($lastContact->is_personally)@endif {{ $lastContact->employee->first_name }} {{ $lastContact->employee->last_name }} @else @endif @php $merged = $item->b1->merge($item->b2); @endphp @if($merged->count() > 0 && !is_null($merged->sortByDesc('last_contact')->first()->last_contact)) {{ $merged->sortByDesc('last_contact')->first()->last_contact }} @else @endif {{ $item->category->name }}
Keine Kunden gefunden
@if($items->hasPages()) @endif
@endsection