@extends('adminlte::page') @section('title', '担当顧客一覧') @section('content_header')
@stop @section('content')
@php $supportPackNews = array(); $repairRequestNews = array(); $consumableNews = array(); if($employeeNews->count() > 0){ $supportPackNews = $employeeNews->where('type', App\Models\EmployeeNews::TYPE_SUPPORT_PACK); $repairRequestNews = $employeeNews->where('type', App\Models\EmployeeNews::TYPE_REPAIR_REQUEST); $consumableNews = $employeeNews->where('type', App\Models\EmployeeNews::TYPE_CONSUMABLE); } @endphp
@if (!empty($supportPackNews)) @foreach ($supportPackNews as $supportPackNewsItem) @if($employee->position_id >= App\Models\Position::ID_MANAGEMENT_POSITION) @if(!$supportPackNewsItem->employeeSupportPackNews->is_display_manager) @continue @endif @endif
{{ $supportPackNewsItem->created_at->format('Y/m/d') }}
@endforeach @else
お知らせはありません。
@endif
@if (!empty($repairRequestNews)) @foreach ($repairRequestNews as $repairRequestNewsItem)
{{ $repairRequestNewsItem->created_at->format('Y/m/d') }}
@endforeach @else
お知らせはありません。
@endif
@if (!empty($consumableNews)) @foreach ($consumableNews as $consumableNewsItem)
{{ $consumableNewsItem->created_at->format('Y/m/d') }}
@endforeach @else
お知らせはありません。
@endif
@if($results->count() > 0) @php $thisMonth = new DateTime('first day of this month midnight'); $nextMonth = new DateTime('first day of next month midnight'); $twoMonthLater = new DateTime('first day of +2 month midnight'); @endphp @foreach ($results as $result) @endforeach @else @endif
医院名 院長名 担当部署 来月予定
メンテナンス
当月予定
メンテナンス
メンテナンス
遅れ
実施日
リクエスト
部品調達 修理依頼 交換時期が
近い消耗品
消耗品
購入依頼
未読
チャット
{{ $result->name }} {{ $result->clinic_manager_name }} {{ !empty($result->sfaClinic->affiliate->department) ? $result->sfaClinic->affiliate->department : '' }} @php $countNextMonthMaintenance = 0; if($result->supportMonth){ $countNextMonthMaintenance = $result->supportMonth->where('month', $nextMonth)->count(); } @endphp {{ $countNextMonthMaintenance }}件 @php $countThisMonthMaintenance = 0; if($result->supportMonth){ $countThisMonthMaintenance = $result->supportMonth->where('month', $thisMonth)->count(); } @endphp {{ $countThisMonthMaintenance }}件 @php $countExpiredMaintenance = 0; if($result->supportMonth){ $countExpiredMaintenance = $result->supportMonth ->where('is_completed', 0) ->where('month', '<',$thisMonth) ->groupBy('own_osada_equipment_id') ->count(); } @endphp {{ $countExpiredMaintenance }}件 @php $countDatetimeRequestedMaintenance = 0; if($result->supportMonth){ $countDatetimeRequestedMaintenance = $result->supportMonth ->where('is_completed', 0) ->where('is_datetime_requested', 1) ->groupBy('own_osada_equipment_id') ->count(); } @endphp {{ $countDatetimeRequestedMaintenance }}件 @php $countPartsNeedToBeProcuredMaintenance = 0; if($result->supportMonth){ $countPartsNeedToBeProcuredMaintenance = $result->supportMonth ->where('is_completed', 0) ->where('is_parts_procured', 0) ->where('month', '<=', $twoMonthLater) ->groupBy('own_osada_equipment_id') ->count(); } @endphp {{ $countPartsNeedToBeProcuredMaintenance }}件 @php $countRepairRequest = 0; if($result->repairRequest){ $countRepairRequest = $result->repairRequest ->where('current_status', '!=', \Modules\SmartSupport\Entities\RepairRequest::STATUS_REQUEST_CLOSED) ->where('current_status', '!=', \Modules\SmartSupport\Entities\RepairRequest::STATUS_CANCEL) ->count(); } @endphp {{ $countRepairRequest }}件 @php $countToBeReplacedOwnOsadaConsumable = 0; if($result->ownOsadaConsumable){ $countToBeReplacedOwnOsadaConsumable = $result->ownOsadaConsumable ->where('next_replacement_at', '<', $twoMonthLater) ->count(); } @endphp {{ $countToBeReplacedOwnOsadaConsumable }}件 @php $countConsumablePurchaseRequest = 0; if($result->ownOsadaConsumable){ $countConsumablePurchaseRequest = $result->ownOsadaConsumable ->where('is_applying_purchase', 1) ->count(); } @endphp {{ $countConsumablePurchaseRequest }}件 {{ $result->unread_chat_message_count }}件
登録されていません。
@if ($results->count() > 0)
{{ $results->appends(request()->query())->links() }}
@endif
@stop @section('css') @stop @section('js') @stop