@extends('layouts.app', ['title' => 'Dashboard – ' . $dep->name]) @section('content') {{-- PDF Modal --}}
{{-- Header --}}

{{ $dep->name }}

Abteilungs-Dashboard
@if(session('msg'))
{{ session('msg') }}
@endif @if(!empty($projects)) {{-- Stat Cards --}}
{{ $count_all }}
Aktuell offen
{{ $count_new }}
Unbearbeitet
{{ $count_inpro }}
In Bearbeitung
{{ $count_wait }}
Warten auf Rückmeldung
{{-- Suche --}}
{{-- Kanban Spalten --}}
{{-- Spalte 1: Unbearbeitet --}}
Unbearbeitet {{ $projects->where('fk_status_in_department_id','1')->count() + $invoices->where('fk_status_in_department_id','1')->count() }}
@foreach($invoices->where('fk_status_in_department_id','1')->sortBy('expiry_date') as $item)
{{ (int) max(0, now()->diffInDays($item->expiry_date, false)) }}d
{{ date('d.m.y', strtotime($item->expiry_date)) }}
@endforeach @foreach($projects->where('fk_status_in_department_id','1')->sortBy('project_deadline') as $item)
{{ (int) max(0, now()->diffInDays($item->project_deadline, false)) }}d
{{ date('d.m.y', strtotime($item->project_deadline)) }}
@include('dashboard._project_link', ['item' => $item, 'dep' => $dep])
@endforeach @if($projects->where('fk_status_in_department_id','1')->count() == 0 && $invoices->where('fk_status_in_department_id','1')->count() == 0)
Keine Einträge
@endif
{{-- Spalte 2: In Bearbeitung --}}
In Bearbeitung {{ $projects->where('fk_status_in_department_id','2')->count() + $invoices->where('fk_status_in_department_id','2')->count() }}
@foreach($invoices->where('fk_status_in_department_id','2')->sortBy('expiry_date') as $item)
{{ (int) max(0, now()->diffInDays($item->expiry_date, false)) }}d
{{ date('d.m.y', strtotime($item->expiry_date)) }}
@endforeach @foreach($projects->where('fk_status_in_department_id','2')->sortBy('project_deadline') as $item)
{{ (int) max(0, now()->diffInDays($item->project_deadline, false)) }}d
{{ date('d.m.y', strtotime($item->project_deadline)) }}
@include('dashboard._project_link', ['item' => $item, 'dep' => $dep])
@endforeach @if($projects->where('fk_status_in_department_id','2')->count() == 0 && $invoices->where('fk_status_in_department_id','2')->count() == 0)
Keine Einträge
@endif
{{-- Spalte 3: Wartet auf Rückmeldung --}}
Wartet auf Rückmeldung {{ $projects->where('fk_status_in_department_id','3')->count() + $invoices->where('fk_status_in_department_id','3')->count() }}
@foreach($invoices->where('fk_status_in_department_id','3')->sortBy('expiry_date') as $item)
{{ (int) max(0, now()->diffInDays($item->expiry_date, false)) }}d
{{ date('d.m.y', strtotime($item->expiry_date)) }}
@endforeach @foreach($projects->where('fk_status_in_department_id','3')->sortBy('project_deadline') as $item)
{{ (int) max(0, now()->diffInDays($item->project_deadline, false)) }}d
{{ date('d.m.y', strtotime($item->project_deadline)) }}
@include('dashboard._project_link', ['item' => $item, 'dep' => $dep])
@endforeach @if($projects->where('fk_status_in_department_id','3')->count() == 0 && $invoices->where('fk_status_in_department_id','3')->count() == 0)
Keine Einträge
@endif
{{-- /row --}} @else

Keine offenen Aufgaben

@endif
@endsection