@extends('layouts.app') @section('content')
@include('shared.messages')

{{__('texte.loans_arr.history.show_loan_history')}}

@foreach($loanHistory as $history) @if($history->key == 'created_at' && !$history->old_value) @elseif($history->key == 'deleted_at' && !$history->old_value) @else @endif @endforeach
{{ __('texte.loans_arr.history.loan_created')}} {{__('texte.loans_arr.history.by')}} {{$history->userResponsible()->name }} {{__('texte.loans_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.loans_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ __('texte.loans_arr.history.loan_deleted')}} {{ __('texte.loans_arr.history.by')}} {{ $history->userResponsible()->name }} {{ __('texte.loans_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.loans_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ $history->userResponsible()->name }} {{__('texte.loans_arr.history.changed_field')}} @switch($history->fieldName()) @case('status') {{__('texte.loans_arr.history.status')}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @case('paid') {{__('texte.loans_arr.history.paid')}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @case('case_effect') {{__('texte.loans_arr.history.case_effect')}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @case('documentable') {{__('texte.loans_arr.history.documentable')}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @case('date') {{__('texte.loans_arr.history.date')}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @case('payment_date') {{__('texte.loans_arr.history.payment_date')}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @case('amount') {{__('texte.loans_arr.history.amount')}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @case('note') {{__('texte.loans_arr.history.note')}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @default {{$history->fieldName()}} {{__('texte.loans_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.loans_arr.history.to')}} {{ $history->newValue() }} @break @endswitch {{__('texte.loans_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.loans_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
@endsection