2018-09-14 15:52:07 +00:00
|
|
|
@if ($item->used_by == \Auth::id())
|
2018-09-20 23:37:21 +00:00
|
|
|
<form action="/take" method="POST" class="form-inline">
|
2022-11-18 00:30:43 +00:00
|
|
|
<em id="itemPassedTime_{{$item->id}}" class="pr-sm-2 ml-auto">{{\Carbon\Carbon::parse($item->updated_at)->diffForHumans()}}</em>
|
|
|
|
<div hidden class="takenItemDate" id="{{$item->id}}">{{\Carbon\Carbon::parse($item->updated_at)->format('Y-m-d\TH:i:s.uP')}}</div>
|
2018-09-20 23:37:21 +00:00
|
|
|
<div class="w-100 d-xm-block d-sm-none"></div>
|
|
|
|
{{ csrf_field() }}
|
|
|
|
@method('DELETE')
|
|
|
|
<input type="hidden" name="item" value="{{$item->id}}">
|
2018-09-27 01:52:43 +00:00
|
|
|
<button type="submit" class="btn btn-sm btn-danger ml-auto">@lang('home.return')</button>
|
2018-09-20 23:37:21 +00:00
|
|
|
</form>
|
2018-09-15 03:22:57 +00:00
|
|
|
|
|
|
|
|
2018-09-14 15:52:07 +00:00
|
|
|
@else
|
2018-09-20 23:37:21 +00:00
|
|
|
<form action="/alert" method="POST" class="form-inline">
|
|
|
|
<em class="pr-sm-2 ml-auto">
|
|
|
|
{{str_limit($users[$item->used_by], 15, '...')}}
|
|
|
|
@if ($item->waiting_user_id && $item->waiting_user_id != \Auth::id())
|
|
|
|
<strong>> {{str_limit($users[$item->waiting_user_id], 15, '...')}}</strong>
|
|
|
|
@endif
|
2022-11-18 00:30:43 +00:00
|
|
|
<small id="itemPassedTime_{{$item->id}}">({{$item->updated_at->diffForHumans()}})</small>
|
2018-09-20 23:37:21 +00:00
|
|
|
</em>
|
2022-11-18 00:30:43 +00:00
|
|
|
<div hidden class="takenItemDate" id="{{$item->id}}">{{$item->updated_at->format('Y-m-d\TH:i:s.uP')}}</div>
|
2018-09-20 23:37:21 +00:00
|
|
|
<div class="w-100 d-xm-block d-sm-none"></div>
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<input type="hidden" name="item" value="{{$item->id}}">
|
|
|
|
@if ($item->waiting_user_id == \Auth::id())
|
|
|
|
@method('DELETE')
|
2018-09-27 01:52:43 +00:00
|
|
|
<button type="submit" class="btn btn-sm btn-outline-danger ml-auto">@lang('home.cancel_alert')</button>
|
2018-09-20 23:37:21 +00:00
|
|
|
@elseif (!$item->waiting_user_id)
|
2018-09-27 01:52:43 +00:00
|
|
|
<button type="submit" class="btn btn-sm btn-outline-secondary ml-auto">@lang('home.alert_me')</button>
|
2018-09-20 23:37:21 +00:00
|
|
|
@endif
|
|
|
|
</form>
|
2022-11-18 00:30:43 +00:00
|
|
|
@endif
|