<div class="mt-3">
    <strong class="mb-2">اطلاعات وضعیت ها:</strong>
    <table class="step-table">
        @if (is_array($RequestInfo->step_info))
            @foreach ($RequestInfo->step_info as $step_info)
                <tr>
                    <th>{{$step_info['action']}}</th>
                    <td>{{$step_info['date']}}</td>
                </tr>
            @endforeach
        @endif
    </table>
</div>

<div class="mt-3">
    <strong class="mb-2">اطلاعات قرارداد:</strong>
    <table class="step-table">
        @if (is_array($RequestInfo->contract) && $RequestInfo->contract['isAccepted'])
            <tr>
                <th>توسط کشاورز تایید شد</th>
                <td>{{$RequestInfo->contract['acceptedDate']}}</td>
            </tr>
        @endif
        @if (is_array($RequestInfo->contract) && isset($RequestInfo->contract['priceperunit']))
            <tr>
                <th>قیمت واحد</th>
                <td>{{$RequestInfo->contract['priceperunit']}}</td>
            </tr>
        @endif
        @if (is_array($RequestInfo->contract) && isset($RequestInfo->contract['pricetotal']))
            <tr>
                <th>قیمت کل</th>
                <td>{{$RequestInfo->contract['pricetotal']}}</td>
            </tr>
        @endif
        @if (is_array($RequestInfo->transportation) && isset($RequestInfo->transportation['price']) && $RequestInfo->transportation['price'] != '')
            <tr>
                <th>هزینه حمل و نقل</th>
                <td>{{$RequestInfo->transportation['pricetotal']}}</td>
            </tr>
        @endif
    </table>
</div>

<div class="mt-3">
    <strong class="mb-2">اطلاعات وزن ها:</strong>
    <table class="step-table">
        @if (isset($weightInfo['farmer']))
        <tr>
            <th>کشاورز</th>
            <td>{{$weightInfo['farmer']}}</td>
        </tr>
        @endif
        @if (isset($weightInfo['transporter']))
        <tr>
            <th>راننده</th>
            <td>{{$weightInfo['transporter']}}</td>
        </tr>
        @endif
        @if (isset($weightInfo['chief']))
        @foreach ($weightInfo['chief'] as $weight)
        <tr>
            <th>سرتیم: {{$weight['name']}}</th>
            <td>کلاله تر {{$weight['کلاله']}} گرم - ریشه {{$weight['ریشه']}}گرم - گل {{$weight['گل']}} گرم</td>
        </tr>
        @endforeach
        @endif
        @if (isset($weightInfo['dryer']))
        @if (isset($weightInfo['dryer']['کلاله']))
        <tr>
            <th>واحد خشک کن</th>
            <td>کلاله تر {{$weightInfo['dryer']['کلاله']}} گرم</td>
        </tr>
        @endif
        @if (isset($weightInfo['dryer']['زعفران']))
        <tr>
            <th>واحد خشک کن</th>
            <td>کلاله خشک {{$weightInfo['dryer']['زعفران']}} گرم</td>
        </tr>
        @endif
        @endif
    </table>
</div>