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

{{__('texte.producer_users_arr.history.show_user_history')}}

@foreach($userHistory as $history) @if($history->key == 'created_at' && !$history->old_value) @elseif($history->key == 'deleted_at' && !$history->old_value) @else @endif @endforeach
{{ __('texte.producer_users_arr.history.user_created')}} {{__('texte.producer_users_arr.history.by')}} {{$history->userResponsible()->name }} {{__('texte.producer_users_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.producer_users_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ __('texte.producer_users_arr.history.user_deleted')}} {{ __('texte.producer_users_arr.history.by')}} {{ $history->userResponsible()->name }} {{ __('texte.producer_users_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.producer_users_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ $history->userResponsible()->name }} {{__('texte.producer_users_arr.history.changed_field')}} @switch($history->fieldName()) @case('name') {{__('texte.producer_users_arr.history.name')}} {{__('texte.producer_users_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.producer_users_arr.history.to')}} {{ $history->newValue() }} @break @case('email') {{__('texte.producer_users_arr.history.email')}} {{__('texte.producer_users_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.producer_users_arr.history.to')}} {{ $history->newValue() }} @break @case('password') {{__('texte.producer_users_arr.history.password')}} @break @case('active') {{__('texte.producer_users_arr.history.active')}} {{__('texte.producer_users_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.producer_users_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('userable_type') {{__('texte.producer_users_arr.history.userable_type')}} {{__('texte.producer_users_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.producer_users_arr.history.to')}} {{ $history->newValue()=='App\Producer' ? __('texte.producer_users_arr.history.producer') : '' }} @break @case('userable') {{__('texte.producer_users_arr.history.userable')}} {{__('texte.producer_users_arr.history.from')}} {{ $history->oldValue()=='nothing' ? '" "' : $producers[$history->oldValue()]->name}} {{__('texte.producer_users_arr.history.to')}} {{ $producers[$history->newValue()]->name }} @break @default {{$history->fieldName()}} {{__('texte.producer_users_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.producer_users_arr.history.to')}} {{ $history->newValue() }} @break @endswitch {{__('texte.producer_users_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.producer_users_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
@endsection