@extends('backend.layouts.main') @section('content')

{{$subtitle}}

{{ Breadcrumbs::render('backend.products.request.update.detail') }}
@include('backend.partials.msg') @include('backend.partials.errors')
@foreach($request_updates as $k=> $product_update)
@csrf
@php $img = $product->images->pluck('id')->toArray(); $img_new = $product_update->images->pluck('id')->toArray(); @endphp @if(!empty(array_diff($img,$img_new))||!empty(array_diff($img_new,$img))) @endif @php $img = $product->images_extra->pluck('id')->toArray(); $img_new = $product_update->images_extra->pluck('id')->toArray(); @endphp @if(!empty(array_diff($img,$img_new))||!empty(array_diff($img_new,$img))) @endif @if((string)$product->location_long!=(string)$product_update->location_long||(string)$product->location_lat!=(string)$product_update->location_lat) @endif @if($product->price!=$product_update->price||$product->status!=$product_update->status||$product->price_type!=$product_update->price_type) @endif @php $purpose = $product->purpose->pluck('id')->toArray(); $purpose_new = $product_update->purpose->pluck('id')->toArray(); $show1 = !empty(array_diff($purpose,$purpose_new))||!empty(array_diff($purpose_new,$purpose)); $show2 = floatval($product->horizontal)!=floatval($product_update->horizontal); $show3 = floatval($product->vertical)!=floatval($product_update->vertical); $show4 = floatval($product->area)!=floatval($product_update->area); $show5 = floatval($product->land_area)!=floatval($product_update->land_area); $show6 = floatval($product->floor_area)!=floatval($product_update->floor_area); $show7 = floatval($product->home_structure)!=floatval($product_update->home_structure); @endphp @if($show1||$show2||$show3||$show4||$show5||$show6||$show7) @endif @if($product->description!=$product_update->description) @endif @php $show1 = (int)$product->home_facade!=(int)$product_update->home_facade; $show2 = floatval($product->road_width)!=floatval($product_update->road_width); $show3 = (int)$product->home_direction!=(int)$product_update->home_direction; $show4 = (int)$product->legal_status!=(int)$product_update->legal_status; $show5 = (int)$product->monthly_price!=(int)$product_update->monthly_price; $show6 = (int)$product->monthly_price_unit!=(int)$product_update->monthly_price_unit; @endphp @if($show1||$show2||$show3||$show4||$show5||$show6) @endif @php $show1 = (int)$product->bedroom_number!=(int)$product_update->bedroom_number; $show2 = (int)$product->room_number!=(int)$product_update->room_number; $show3 = (int)$product->bathroom_number!=(int)$product_update->bathroom_number; $show4 = (int)$product->kitchen_number!=(int)$product_update->kitchen_number; $show5 = !empty($product->balcony_number)!= !empty($product_update->balcony_number); $show6 = !empty($product->elevator)!=!empty($product_update->elevator); @endphp @if($show1||$show2||$show3||$show4||$show5||$show6) @endif @php $convenience = $product->convenience->pluck('id')->toArray(); $convenience_new = $product_update->convenience->pluck('id')->toArray(); $show = !empty(array_diff($convenience,$convenience_new))||!empty(array_diff($convenience_new,$convenience)); @endphp @if($show) @endif @php $exterior = $product->exterior->pluck('id')->toArray(); $exterior_new = $product_update->exterior->pluck('id')->toArray(); $show = !empty(array_diff($exterior,$exterior_new))||!empty(array_diff($exterior_new,$exterior)); @endphp @if($show) @endif
  Giá trị cũ Giá trị mới
Ảnh hiện trạng
Ảnh giấy tờ chủ quyền
Địa chỉ
Số cũ
{{$product->address}}
{{$product->home_number_note?$product->home_number_note:''}} {{$product->old_street?' - '. $product->old_street->name:''}}
{{$product_update->address}}
{{$product_update->home_number_note?$product_update->home_number_note:''}} {{$product_update->old_street?' - '. $product_update->old_street->name:''}}
@if($product->address!=$product_update->address||$product->old_address!=$product_update->old_address) @endif
Vị trí trên bản đồ @if($product->location_long&&$product->location_lat)
@endif
Giá bán {{number_format($product->price).' '.$product->price_type_name}} {{number_format($product_update->price).' '.$product_update->price_type_name}}
Hiện trạng {{$product->status_name()}} {{$product_update->status_name()}}
Ngang {{(float)($product->horizontal)}} {{(float)($product_update->horizontal)}}
Dài {{(float)($product->vertical)}} {{(float)($product_update->vertical)}}
DT công nhận {{(float)($product->area)}} {{(float)($product_update->area)}}
DT đất XD {{(float)($product->land_area)}} {{(float)($product_update->land_area)}}
DT sàn XD {{(float)($product->floor_area)}} {{(float)($product_update->floor_area)}}
Kết cấu {{$product->home_structure_text}} {{$product_update->home_structure_text}}
Phù hợp khai thác @foreach($product->purpose as $v)

{{$v->name}}

@endforeach
@foreach($product_update->purpose as $v)

{{$v->name}}

@endforeach
Mô tả {{$product->description}} {{$product_update->description}}
Loại đường {{$product->home_facade_text}} {{$product_update->home_facade_text}}
Chiều rộng đường {{$product->road_width}} {{$product_update->road_width}}
Hướng {{$product->home_direction_name()}} {{$product_update->home_direction_name()}}
Tình trạng pháp lý {{$product->legal_status_name()}} {{$product_update->legal_status_name()}}
Giá thuê {{number_format($product->monthly_price)}} {{$product->monthly_price_unit}} {{number_format($product_update->monthly_price)}} {{$product_update->monthly_price_unit}}
Phòng ngủ {{$product->bedroom_number}} {{$product_update->bedroom_number}}
Phòng khách {{$product->room_number}} {{$product_update->room_number}}
Toilet {{$product->bathroom_number}} {{$product_update->bathroom_number}}
Bếp {{$product->kitchen_number}} {{$product_update->kitchen_number}}
Ban công {{$product->balcony_number?'Có':'-'}} {{$product_update->balcony_number?'Có':'-'}}
Thang máy {{$product->elevator?'Có':'-'}} {{$product_update->elevator?'Có':'-'}}
Tiện nghi trong nhà @foreach($product->convenience as $v)

{{$v->name}}

@endforeach
@foreach($product_update->convenience as $v)

{{$v->name}}

@endforeach
Tiện nghi xung quanh @foreach($product->exterior as $v)

{{$v->name}}

@endforeach
@foreach($product_update->exterior as $v)

{{$v->name}}

@endforeach
Thông tin liên hệ @foreach($product->contact_info as $contact)

{{$contact->name}} - {{$contact->phone}} - {{$contact->type_name}} - {{$contact->status_name}}

@endforeach
@foreach($product_update->contact_info as $contact)

{{$contact->name}} - {{$contact->phone}} - {{$contact->type_name}} - {{$contact->status_name}}

@endforeach
@foreach($product_update->contact_info as $contact)

@endforeach
Người gửi: {{'(MS '.$product_update->user_id.') '.$product_update->owner->fullname}}
@endforeach
@endsection @section('script') @stop