@extends('layouts.app') @section('title', '[東京都|〇〇駐輪場] デバイス管理マスタ') @section('content')

{{ __('デバイス管理マスタ') }}

{{-- ソート用フォーム --}}
@csrf
{{ $list->appends(['sort'=>$sort,'sort_type'=>$sort_type])->links('pagination') }}
{{-- フラッシュ --}}
@if(Session::has('success')) @elseif(Session::has('error'))

{{ __('誤差') }}:

{!! Session::get('error') !!}
@elseif(isset($errorMsg))

{{ __('誤差') }}:

{!! $errorMsg !!}
@endif
{{-- 左:チェック列+編集ボタン --}}
@csrf @foreach($list as $item) @endforeach
@csrf
{{-- 右:本体 --}}
@php $TYPE = [1=>'サーバー',2=>'プリンタ',3=>'その他']; $WORK = ['1'=>'稼働','0'=>'停止',1=>'稼働',0=>'停止']; @endphp {{-- 1 デバイスID--}} {{-- 2 駐輪場ID --}} {{-- 3 デバイス種別--}} {{-- 4 デバイス名 --}} {{-- 5 識別子 --}} {{-- 6 稼働/停止 --}} {{-- 7 稼働開始日--}} {{-- 8 リプレース予約日 --}} {{-- 9 備考 --}} @foreach($list as $item) {{-- 1 デバイスID) --}} {{-- 2 駐輪場ID:駐輪場名 --}} {{-- 3 デバイス種別 --}} {{-- 4 デバイス名 --}} {{-- 5 識別子--}} {{-- 6 稼働/停止--}} {{-- 7 稼働開始日 --}} {{-- 8 リプレース予約日) --}} {{-- 9 備考 --}} @endforeach
{{ __('デバイスID') }}{{ __('駐輪場ID') }}{{ __('デバイス種別') }}{{ __('デバイス名') }}{{ __('識別子') }}{{ __('稼働/停止') }}{{ __('稼働開始日') }}{{ __('リプレース予約日') }}{{ __('備考') }}
{{ mb_substr($item->device_id, 0, 10) }} {{ mb_substr($item->park_id, 0, 10) }} @if($item->relationLoaded('park') && $item->park) : {{ mb_substr($item->park->park_name ?? '', 0, 10) }} @endif {{ mb_substr($TYPE[$item->device_type] ?? (string)$item->device_type, 0, 10) }} {{ mb_substr($item->device_subject, 0, 10) }} {{ mb_substr($item->device_identifier, 0, 10) }} {{ $WORK[$item->device_work] ?? $item->device_work }} @php $ws = $item->device_workstart instanceof \Carbon\Carbon ? $item->device_workstart->format('Y/m/d') : ($item->device_workstart ? \Carbon\Carbon::parse($item->device_workstart)->format('Y/m/d') : ''); @endphp {{ $ws }} @php $rp = $item->device_replace instanceof \Carbon\Carbon ? $item->device_replace->format('Y/m/d') : ($item->device_replace ? \Carbon\Carbon::parse($item->device_replace)->format('Y/m/d') : ''); @endphp {{ $rp }} {{ mb_substr($item->device_remarks, 0, 10) }}
@push('scripts') @endpush @endsection