@extends('layouts.app') @section('content')
{{ __('texte.objects_arr.history.object_created')}} {{__('texte.objects_arr.history.by')}} {{$history->userResponsible()->name }} | {{__('texte.objects_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.objects_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }} |
{{ __('texte.objects_arr.history.object_deleted')}} {{ __('texte.objects_arr.history.by')}} {{ $history->userResponsible()->name }} | {{ __('texte.objects_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.objects_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }} |
{{ $history->userResponsible()->name }} {{__('texte.objects_arr.history.changed_field')}} @switch($history->fieldName()) @case('promotions') {{__('texte.objects_arr.history.promotions')}} {{__('texte.objects_arr.history.from')}} @if($history->oldValue()==null || $history->oldValue()=='') {{" "}} @else @foreach(explode(',',trim($history->oldValue(),',')) as $promotion) {{isset($promotions[$promotion]) ? '"'.$promotions[$promotion]->title.'", ' : $promotion}} @endforeach @endif {{__('texte.objects_arr.history.to')}} @if($history->newValue()==null || $history->newValue()=='') {{" "}} @else @foreach(explode(',',trim($history->newValue(),',')) as $promotion) {{isset($promotions[$promotion]) ? '"'.$promotions[$promotion]->title.'", ' : $promotion}} @endforeach @endif @break @case('price_list') {{__('texte.objects_arr.history.price_list')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null || $history->oldValue()==0 ? '" "' : $priceLists[$history->oldValue()]->title}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue()==null || $history->newValue()==0 ? '" "' : $priceLists[$history->newValue()]->title}} @break @case('brochures') {{__('texte.objects_arr.history.brochures')}} {{__('texte.objects_arr.history.from')}} @if($history->oldValue()==null || $history->oldValue()=='') {{" "}} @else @foreach(explode(',',trim($history->oldValue(),',')) as $promotion) {{isset($promotions[$promotion]) ? '"'.$promotions[$promotion]->title.'", ' : $promotion}} @endforeach @endif {{__('texte.objects_arr.history.to')}} @if($history->newValue()==null || $history->newValue()=='') {{" "}} @else @foreach(explode(',',trim($history->newValue(),',')) as $promotion) {{isset($promotions[$promotion]) ? '"'.$promotions[$promotion]->title.'", ' : $promotion}} @endforeach @endif @break @case('price_list_priority') {{__('texte.objects_arr.history.price_list_priority')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue() }} @break @case('spokesman') {{__('texte.objects_arr.history.spokesman')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $spokesmen[$history->oldValue()]->name}} {{__('texte.objects_arr.history.to')}} {{ $spokesmen[$history->newValue()]->name }} @break @case('contragent') {{__('texte.objects_arr.history.contragent')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : ($contragents[$history->oldValue()]->company_name!=null ? $contragents[$history->oldValue()]->company_name : $contragents[$history->oldValue()]->user->name )}} {{__('texte.objects_arr.history.to')}} {{ $contragents[$history->newValue()]->company_name }} @break @case('location') {{__('texte.objects_arr.history.location')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $locations[$history->oldValue()]->name}} {{__('texte.objects_arr.history.to')}} {{ $locations[$history->newValue()]->name }} @break @case('subregion') {{__('texte.objects_arr.history.subregion')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $sub_regions[$history->oldValue()]->name}} {{__('texte.objects_arr.history.to')}} {{ $sub_regions[$history->newValue()]->name }} @break @case('subtype') {{__('texte.objects_arr.history.subtype')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $sub_types[$history->oldValue()]->name}} {{__('texte.objects_arr.history.to')}} {{ $sub_types[$history->newValue()]->name }} @break @case('contact_person') {{__('texte.objects_arr.history.contact_person')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue() }} @break @case('delivery_address') {{__('texte.objects_arr.history.delivery_address')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue() }} @break @case('notify_email') {{__('texte.objects_arr.history.notify_email')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.objects_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('notify_sms') {{__('texte.objects_arr.history.notify_sms')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.objects_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('partida_not_older') {{__('texte.objects_arr.history.partida_not_older')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue() }} @break @case('working_time') {{__('texte.objects_arr.history.working_time')}} {{__('texte.objects_arr.history.from')}} @if($history->oldValue()!=null) @foreach(explode('}, {',$history->oldValue()) as $index=>$working_day) {{__('texte.weekdays_arr')[$index+1]}} @if(strpos($working_day,'"isActive": true')!==false) @if(preg_match('/"timeFrom": "([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]/',$working_day,$matches)) {{str_replace('"timeFrom": "','',$matches[0])}} @endif {{' - '}} @if(preg_match('/"timeTill": "([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]/',$working_day,$matches)) {{str_replace('"timeTill": "','',$matches[0])}} @endif @else {{__('texte.objects_arr.history.day_off')}} @endif {{','}} @endforeach @else {{''}} @endif {{__('texte.objects_arr.history.to')}} @if($history->newValue()!=null) @foreach(explode('},{',$history->newValue()) as $index=>$working_day) {{__('texte.weekdays_arr')[$index+1]}} @if(strpos($working_day,'"isActive":true')!==false) @if(preg_match('/"timeFrom":"([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]/',$working_day,$matches)) {{str_replace('"timeFrom":"','',$matches[0])}} @endif {{' - '}} @if(preg_match('/"timeTill":"([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]/',$working_day,$matches)) {{str_replace('"timeTill":"','',$matches[0])}} @endif @else {{__('texte.objects_arr.history.day_off')}} @endif {{','}} @endforeach @else {{''}} @endif @break @case('visit_days') {{__('texte.objects_arr.history.visit_days')}} {{__('texte.objects_arr.history.from')}} @if($history->oldValue()!=null) @foreach(explode('}, {',$history->oldValue()) as $index=>$working_day) @if(strpos($working_day,'"isActive": true')!==false) {{__('texte.weekdays_arr')[$index+1]}}{{','}} @endif @endforeach @endif {{__('texte.objects_arr.history.to')}} @if($history->newValue()!=null) @foreach(explode('},{',$history->newValue()) as $index=>$working_day) @if(strpos($working_day,'"isActive":true')!==false) {{__('texte.weekdays_arr')[$index+1]}}{{','}} @endif @endforeach @endif @break @case('filters') {{__('texte.objects_arr.history.filters')}} @break @case('export_for_producers') {{__('texte.objects_arr.history.export_for_producers')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.objects_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('active') {{__('texte.objects_arr.history.active')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.objects_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('plus_wrappage') {{__('texte.objects_arr.history.plus_wrappage')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.objects_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('limit') {{__('texte.objects_arr.history.partida_not_older')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue() }} @break @case('delayed_days') {{__('texte.objects_arr.history.delayed_days')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue() }} @break @case('expired_days') {{__('texte.objects_arr.history.expired_days')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue() }} @break @case('payment_from') {{__('texte.objects_arr.history.payment_from')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()==0 ? __('texte.objects_arr.history.contragent_lvl') : __('texte.objects_arr.history.object_lvl') }} {{__('texte.objects_arr.history.to')}} {{ $history->newValue()==0 ? __('texte.objects_arr.history.contragent_lvl') : __('texte.objects_arr.history.object_lvl') }} @break @case('payment_type') {{__('texte.objects_arr.history.payment_type')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()==0 ? __('texte.objects_arr.history.cash') : __('texte.objects_arr.history.bank_transfer') }} {{__('texte.objects_arr.history.to')}} {{ $history->newValue()==0 ? __('texte.objects_arr.history.cash') : __('texte.objects_arr.history.bank_transfer') }} @break @case('time_of_payment') {{__('texte.objects_arr.history.time_of_payment')}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()==0 ? __('texte.objects_arr.history.delayed_payment') : __('texte.objects_arr.history.immediate_payment') }} {{__('texte.objects_arr.history.to')}} {{ $history->newValue()==0 ? __('texte.objects_arr.history.delayed_payment') : __('texte.objects_arr.history.immediate_payment') }} @break @default {{$history->fieldName()}} {{__('texte.objects_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.objects_arr.history.to')}} {{ $history->newValue() }} @break @endswitch | {{__('texte.objects_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.objects_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }} |