<?php $__env->startSection('contents'); ?>

<div class="mt5 p-rains">
    <div class="d-flex justify-content-between">
        <div class="d-flex">
            <p><span class="p-rains__count">該当件数<?php echo e($article->total()); ?></span>件中 <?php echo e($first); ?>〜<?php echo e($last); ?>件表示</p>
        </div>
        <div class="p-rains__pager"><?php echo e($article->appends($pager_params)->links()); ?></div>
    </div>
    <?php echo $__env->make('admin.objects.components.regist-band-provisional', ['title' => '仮登録物件'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

    <div>
        <div class="p-rains__duplicate">
            <p class="p-rains__duplicate__schedule">登録予定物件</p>
<?php $__currentLoopData = $article; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
            $url = '';
            if($row['property'] == null && !empty($row['mansion_info'])) {
                /*if($row['mansion_info']->provisional == 1) {
                    $url = '/admin/editMansion/'.$row['mansion_info']->building_id;
                } else {*/
                    $url = '/admin/editRoom/'.$row['mansion_info']->building_id.'/'.$row['building_id'];
                //}
            } elseif($row['property'] < 4) {
                $url = '/admin/editLand/'.$row['building_id'];
            } elseif($row['property'] < 6) {
                $url = '/admin/editHouse/'.$row['building_id'];
            } elseif($row['property'] < 8) {
                $url = '/admin/editMansion/'.$row['building_id'];
            } elseif($row['property'] == 99) {
                $url = '/admin/editLot/'.$row['building_id'];
            }
            $url .= '?provisional=1';
?>
            <div class="mb10">
                <table border="1" class="w-100">
                    <tr>
                        <td rowspan="2" class="w100 bg-white">
                            物件番号<br>
                            <?php echo e($row['rains_no']); ?>

                            物件登録日
                            <?php echo e($row['created_at']->format('Y/m/d')); ?>

                            <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'duplicate_id', 'value' => $row['id']], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </td>
                        <th>物件名</th>
                        <td colspan="3" class="w250 bg-white"><?php echo e($row['article_name']); ?></td>
                        <th>所在地</th>
                        <td colspan="3" class="w250 bg-white"><?php echo e($row['pref_name']); ?><?php echo e($row['city_name']); ?><?php echo e($row['town_name']); ?><?php echo e($row['address']); ?></td>
<?php if($row['property'] != null): ?>
                        <th>価格</th>
                        <td class="w80 bg-white"><?php echo e($row['price']); ?>万円</td>
                        <th>土地</th>
                        <td class="w80 bg-white"><?php echo e($row['land_area_val']?? '-'); ?>m&sup2;</td>
                        <th>校区</th>
                        <td class="w80 bg-white"><?php echo e($row['school']?? '-'); ?></td>
<?php else: ?>
                        <th>部屋</th>
                        <td class="w80 bg-white"><?php echo e($row['room_num']?? '-'); ?></td>
                        <th>価格</th>
                        <td class="w80 bg-white"><?php echo e($row['price']); ?>万円</td>
                        <th>土地</th>
                        <td class="w80 bg-white"><?php echo e($row['land_area_val']?? '-'); ?>m&sup2;</td>
<?php endif; ?>
                    </tr>
                    <tr>
                        <th>種別</th>
                        <td class="w120 bg-white">
                        <?php if($row['property'] == 1): ?>
						    土地
                        <?php elseif($row['property'] == 2): ?>
                            土地（借地権）
                        <?php elseif($row['property'] == 3): ?>
                            土地（底地権）
                        <?php elseif($row['property'] == 4): ?>
                            <?php if($row['property_sub'] == 1): ?>
                                新築
                            <?php else: ?>
                                中古
                            <?php endif; ?>
                            戸建
                        <?php elseif($row['property'] == 5): ?>
                            <?php if($row['property_sub'] == 1): ?>
                                新築
                            <?php else: ?>
                                中古
                            <?php endif; ?>
                            テラスハウス
                        <?php elseif($row['property'] == 6): ?>
                            <?php if($row['property_sub'] == 1): ?>
                                新築
                            <?php else: ?>
                                中古
                            <?php endif; ?>
                            マンション
                        <?php elseif($row['property'] == 7): ?>
                            <?php if($row['property_sub'] == 1): ?>
                                新築
                            <?php else: ?>
                                中古
                            <?php endif; ?>
                            タウンハウス
                        <?php else: ?>
                            マンション
                        <?php endif; ?>



                        </td>
                        <th>間取り</th>
                        <td class="w80 bg-white"><?php echo e($row['floor_plan']?? '-'); ?><?php echo e($row['floor_type_text']?? '-'); ?></td>
                        <th>交通</th>
                        <td colspan="3" class="bg-white"><?php echo e($row['main_traffic_line']?? '-'); ?>&nbsp;「<?php echo e($row['main_traffic_station']?? '-'); ?>」駅&nbsp;
                        <?php if($row['main_traffic'] == 2): ?>
                                バス<?php echo e($row['main_traffic_bus_time']?? '-'); ?>分乗車 バス停<?php echo e($row['main_traffic_bus']?? '-'); ?>停 停歩<?php echo e($row['main_traffic_bus_walk']?? '-'); ?>分
                        <?php else: ?>
                                徒歩<?php echo e($row['main_traffic_time']?? '-'); ?>分
                        <?php endif; ?>
                        </td>
                        <th>築年月</th>
                        <td class="bg-white"><?php echo e($row['age_year']?? '-'); ?>/<?php echo e($row['age_month']?? '-'); ?></td>

<?php if($row['property'] != null): ?>
                        <th>延床</th>
                        <td class="bg-white"><?php echo e($row['total_area_val']?? '-'); ?>m&sup2;</td>
                        <th>階数</th>
                        <td class="bg-white"><?php echo e($row['floor']?? '-'); ?></td>
<?php else: ?>
                        <th>階数</th>
                        <td class="bg-white"><?php echo e($row['whereabouts']?? '-'); ?></td>
                        <th>延床</th>
                        <td class="bg-white"><?php echo e($row['total_area_val']?? '-'); ?>m&sup2;</td>

<?php endif; ?>
                    </tr>
                    <tr class="p-rains__duplicate__vendor">
                        <th>業者名</th>
                        <td colspan="3"><?php echo e($row['vendor_name']); ?></td>
                        <th>担当</th>
                        <td class="w100" colspan="2"><span id="vendor_charge"><?php echo e($row['vendor_charge']); ?></span></td>
                        <th>電話</th>
                        <td colspan="2"><?php echo e($row['vendor_tel1']); ?></td>
                        <th>備考1</th>
                        <td colspan="2"><?php echo e($row['memo1']?? ''); ?></td>
                        <td colspan="2" rowspan="2" class="p-rains__duplicate__btnarea">
                            <div class="">
                                <div class="p-rains__duplicate__btnarea-choice">
                                <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'del_id', 'value' => $row['building_id']], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                <?php echo $__env->make('admin.objects.components.selectbox', ['name' => 'target', 'class' => ' mr10', 'options' => [['code' => 1, 'name' => '仮登録'],['code' => 2, 'name' => '削除']], 'default' => 0], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                </div>
                                <div class="p-rains__duplicate__btnarea-next">
                                <?php echo $__env->make('admin.objects.components.link-btn', ['url' => $url, 'class' => 'c-registbtn d-block mt-1 provisional_btn', 'title' => '反映して次へ'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                </div>
                            </div>


                        </td>
                    </tr>
                    <tr class="p-rains__duplicate__vendor">
                        <th>業者ID</th>
                        <td colspan="3"><span id="vendor_id"><?php echo e($row['vendor_id']?? '-'); ?></span></td>
                        <th>態様</th>
                        <td colspan="2"><?php echo e($row['manner_name']?? '-'); ?></td>
                        <th>FAX</th>
                        <td colspan="2"><?php echo e($row['vendor_fax']?? '-'); ?></td>
                        <th>備考2</th>
                        <td colspan="2"><?php echo e($row['memo2']?? ''); ?></td>
                    </tr>
                </table>
            </div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.base', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>