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

{{__('texte.brochures_arr.history.show_brochure_history')}}

{{__('texte.brochures_arr.history.brochure_history')}}

@foreach($brochureHistory as $history) @if($history->key == 'created_at' && !$history->old_value) @elseif($history->key == 'deleted_at' && !$history->old_value) @else @endif @endforeach
{{ __('texte.brochures_arr.history.brochure_created')}} {{__('texte.brochures_arr.history.by')}} {{$history->userResponsible()->name }} {{__('texte.brochures_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.brochures_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ __('texte.brochures_arr.history.brochure_deleted')}} {{ __('texte.brochures_arr.history.by')}} {{ $history->userResponsible()->name }} {{ __('texte.brochures_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.brochures_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ $history->userResponsible()->name }} {{__('texte.brochures_arr.history.changed_field')}} @switch($history->fieldName()) @case('active') {{__('texte.brochures_arr.history.active')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.brochures_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('date_from') {{__('texte.brochures_arr.history.date_from')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : date_format(new DateTime($history->oldValue()), 'd.m.Y H:i')}} {{__('texte.brochures_arr.history.to')}} {{ date_format(new DateTime($history->newValue()), 'd.m.Y H:i') }} @break @case('date_to') {{__('texte.brochures_arr.history.date_to')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : date_format(new DateTime($history->oldValue()), 'd.m.Y H:i')}} {{__('texte.brochures_arr.history.to')}} {{ date_format(new DateTime($history->newValue()), 'd.m.Y H:i') }} @break @case('active') {{__('texte.brochures_arr.history.active')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.brochures_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('validity') {{__('texte.brochures_arr.history.validity')}} {{__('texte.brochures_arr.history.from')}} @if ($history->oldValue()!=null) @foreach(explode(',',$history->oldValue()) as $index=>$item) @switch($item) @case('repr') {{__('texte.brochures_arr.history.repr')}}{{$indexoldValue()))-1 ? ',': ''}} @break @case('ext_repr') {{__('texte.brochures_arr.history.ext_repr')}}{{$indexoldValue()))-1 ? ',': ''}} @break @case('clients') {{__('texte.brochures_arr.history.clients')}}{{$indexoldValue()))-1 ? ',': ''}} @break @default {{$storages[$item]->name}}{{$indexoldValue()))-1 ? ',': ''}} @break @endswitch @endforeach @endif {{__('texte.brochures_arr.history.to')}} @if ($history->newValue()!=null) @foreach(explode(',',$history->newValue()) as $index=>$item) @switch($item) @case('repr') {{__('texte.brochures_arr.history.repr')}}{{$indexnewValue()))-1 ? ',': ''}} @break @case('ext_repr') {{__('texte.brochures_arr.history.ext_repr')}}{{$indexnewValue()))-1 ? ',': ''}} @break @case('clients') {{__('texte.brochures_arr.history.clients')}}{{$indexnewValue()))-1 ? ',': ''}} @break @default {{$storages[$item]->name}} {{$indexnewValue()))-1 ? ',': ''}} @break @endswitch @endforeach @endif @break @default {{__('texte.brochures_arr.history.'.$history->fieldName())}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.brochures_arr.history.to')}} {{ $history->newValue() }} @break @endswitch {{__('texte.brochures_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.brochures_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}

{{__('texte.brochures_arr.history.brochure_products_history')}}

@foreach($childrenHistory as $childHistory) @foreach($childHistory as $history) @if($history->key == 'created_at' && !$history->old_value) @elseif($history->key == 'deleted_at' && !$history->old_value) @else @endif @endforeach @endforeach
{{ __('texte.brochures_arr.history.brochure_product_created')}} {{$history->revisionable_id}} {{ __('texte.brochures_arr.history.is_created')}} {{__('texte.brochures_arr.history.by')}} {{$history->userResponsible()->name }} {{__('texte.brochures_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.brochures_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ __('texte.brochures_arr.history.brochure_condition_deleted')}} {{ __('texte.brochures_arr.history.by')}} {{ $history->userResponsible()->name }} {{ __('texte.brochures_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.brochures_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ $history->userResponsible()->name }} {{__('texte.brochures_arr.history.changed_field')}} @switch($history->fieldName()) @case('category') {{__('texte.brochures_arr.history.category')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==0 ? '" "' : $categories[$history->oldValue()]->name}} {{__('texte.brochures_arr.history.to')}} {{$history->newValue()==0 ? '" "' : $categories[$history->newValue()]->name }} @break @case('producer') {{__('texte.brochures_arr.history.producer')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==0 ? '" "' : $producers[$history->oldValue()]->name}} {{__('texte.brochures_arr.history.to')}} {{$history->newValue()==0 ? '" "' : $producers[$history->newValue()]->name }} @break @case('mark') {{__('texte.brochures_arr.history.mark')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==0 ? '" "' : $marks[$history->oldValue()]->name}} {{__('texte.brochures_arr.history.to')}} {{$history->newValue()==0 ? '" "' : $marks[$history->newValue()]->name }} @break @case('package') {{__('texte.brochures_arr.history.package')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==0 ? '" "' : $packages[$history->oldValue()]->name}} {{__('texte.brochures_arr.history.to')}} {{$history->newValue()==0 ? '" "' : $packages[$history->newValue()]->name }} @break @case('product') {{__('texte.brochures_arr.history.product')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==0 ? '" "' : $products[$history->oldValue()]->name}} {{__('texte.brochures_arr.history.to')}} {{$history->newValue()==0 ? '" "' : $products[$history->newValue()]->name }} @break @case('material') {{__('texte.brochures_arr.history.material')}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==0 ? '" "' : $materials[$history->oldValue()]->name}} {{__('texte.brochures_arr.history.to')}} {{$history->newValue()==0 ? '" "' : $materials[$history->newValue()]->name }} @break @default {{__('texte.brochures_arr.history.'.$history->fieldName())}} {{__('texte.brochures_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.brochures_arr.history.to')}} {{ $history->newValue()==null ? '" "' : $history->newValue() }} @break @endswitch {{__('texte.brochures_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.brochures_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
@endsection