@extends('layouts.app', ['title' => 'Kunden']) @section('content') {{-- new Item --}} {{-- --}} {{-- customer edit Item --}} {{-- customer delete Item --}} {{-- contact show Item --}} {{-- contact- edit Item --}} {{-- contact delete Item --}}
{{-- --}}

@if (session('error'))

{{ session('error') }}

{{ session('error1') }}

{{ session('error2') }}

@endif @if (session('msg'))

{{ session('msg') }}

@endif
{{-- @csrf --}}

Kunden

@if (Auth::user()->get_employee->is_mgt) @endif {{-- --}} @if (Auth::user()->get_employee->is_mgt) @endif @if ($customers->isNotEmpty()) @foreach ($customers as $item) @if (Auth::user()->get_employee->is_mgt) @endif @if (Auth::user()->get_employee->is_mgt) @endif @endforeach @else @endif
{{--
@csrf
--}} ID
Kunde letzte Hinweis letzte Kontakt Kunden Kategorie Status Action
{{ $item->customer_id }} {{ $item->name }} @if ($item->contact_history->count() > 0) {{ date('d.m.Y', strtotime($item->contact_history->sortByDesc('cch_id')->first()->created_at)) }} {{-- {{ $item->timelines->where('is_note', '=', '1')->sortby('timeline_id')->first()->created_at }} --}} @else - - - - - - - - @endif {{-- {{ $item->timelines->sortByDesc('timeline_id')->first()->created_at }} --}} @if ($item->contact_history->count() > 0) @if ($item->contact_history->sortByDesc('cch_id')->first()->is_call) @endif @if ($item->contact_history->sortByDesc('cch_id')->first()->is_email) @endif @if ($item->contact_history->sortByDesc('cch_id')->first()->is_post) @endif @if ($item->contact_history->sortByDesc('cch_id')->first()->is_personally) @endif {{ $item->contact_history->sortByDesc('cch_id')->first()->employee->first_name }} {{ $item->contact_history->sortByDesc('cch_id')->first()->employee->last_name }} {{-- {{ $item->timelines->where('is_note', '=', '1')->sortby('timeline_id')->first()->created_at }} --}} @else - - - - - - - - @endif {{-- {{ $item->timelines->sortByDesc('timeline_id')->first()->created_at }} --}} {{ $item->category->name }}
Keine Daten

Kontakte

@if (!empty($contacts))
@if (Auth::user()->get_employee->is_mgt) @endif @foreach ($contacts as $item) @if (Auth::user()->get_employee->is_mgt) @endif @endforeach
ID Name | Beruf Firma Email Tel / Mobile Action
{{ $item->employee_id }} {{ $item->name }} {{ $item->customer->name }} {{ $item->email }} {{ $item->tel }} / {{ $item->mobile }}

@else
Keine Daten
@endif
@endsection