<div class="c-band d-flex justify-content-between">
    <p class="c-band__title">{{$title}}</p>
    @if(isset($save_lot))
        @if(is_null($article->sale_no))
    <!--<div class="">
        <a href="javascript:void(0);" class="c-band__lot__btn">この物件を分譲地登録する</a>
    </div>-->
        @endif
    @endif
    @if(isset($conf_url) && $conf_url != "")
    <!--<div class="">
        <a href="http://micnavi.jp{{ $conf_url }}" class="site_reference" target="_blank">サイトを確認</a>
    </div>-->
    @endif
    @if(strstr($_SERVER["REQUEST_URI"],'registImage') and isset($article->building_id))
    @if($disp_flag == 1)
    <a href="/business/for-sale/detail/{{$article->building_id}}" class="band__link" target="_blank">住まいの情報DB「物件詳細ページ」を見る</a>
    @elseif($disp_flag == 2)
    <a href="/business/mansion/parentDetail/{{$article->building_id}}" class="band__link" target="_blank">住まいの情報DB「マンション建物ページ」を見る</a>
    @elseif($disp_flag == 3)
    <a href="/business/lot/parentDetail/{{$article->building_id}}" class="band__link" target="_blank">住まいの情報DB「分譲地ページ」を見る</a>
    @endif
    @endif
    @if(!empty($public_portal[0]))
        <div class="portal-public-info d-flex float-right justify-content-center mr-1">
            <label class="label-public">ポータル（{{ $public_portal[0]->created_at ? date( 'Y.m.d/H:i', strtotime($public_portal[0]->created_at)) : '' }}）</label>
            <ul>
                @php
                    $pl_suumo = $pl_homes = $pl_athome = '';
                    foreach($public_portal as $pl){
                        if($pl->type == 1){
                            $pl_suumo = $pl;
                        }
                        if($pl->type == 2){
                            $pl_homes = $pl;
                        }
                        if($pl->type == 3){
                            $pl_athome = $pl;
                        }
                    }
                    $suumo_text = $homes_text = $athome_text = '';
                    if(!empty($pl_suumo)){
                        $suumo_text = '非掲載';
                        if($pl_suumo->status == 1){
                            $suumo_text = 'ネットコマ';
                        }
                        if($pl_suumo->status == 2){
                            $suumo_text = 'レポート';
                        }
                    }
                    if(!empty($pl_homes)){
                        $homes_text = "非掲載";
                        if($pl_homes->status == 1){
                            $homes_text = "掲載";
                        }
                    }
                    if(!empty($pl_athome)){
                        $athome_text = '非公開';
                        if($pl_athome->status == 1){
                            $athome_text = '会員間';
                        }
                        if($pl_athome->status == 2){
                            $athome_text = '会員一般向';
                        }
                        if($pl_athome->status == 3){
                            $athome_text = '一般向';
                        }
                    }
                @endphp
                @if(!empty($store_user->suumo_id) && !empty($store_user->suumo_pw))
                    <li class="suumo_color">@if($suumo_text != '')
                            @if(!empty($pl_suumo) && $pl_suumo->status == 0)
                                <img src="/admin/img/suumo-icon-o8.png" width="18" alt="">
                            @else
                                <img src="/admin/img/suumo-icon.png" width="18" alt="">
                            @endif @php echo $suumo_text == '非掲載' ? '<span class="text-white">'.$suumo_text.'</span>' : $suumo_text @endphp @endif</li>
                @endif
                @if(!empty($store_user->homes_id) && !empty($store_user->homes_pw))
                    <li class="homes_color">@if($homes_text != '')
                            @if(!empty($pl_homes) && $pl_homes->status == 0)
                                <img src="/admin/img/homes-icon-o8.png" width="18" alt="">
                            @else
                                <img src="/admin/img/homes-icon.png" width="18" alt="">
                            @endif @php echo $homes_text == '非掲載' ? '<span class="text-white">'.$homes_text.'</span>' : $homes_text @endphp @endif</li>
                @endif
                @if(!empty($store_user->athome_id) && !empty($store_user->athome_pw))
                    <li class="athome_color">@if($athome_text != '')
                            @if(!empty($pl_athome) && $pl_athome->status == 0)
                                <img src="/admin/img/athome-icon-o8.png" width="18" alt="">
                            @else
                                <img src="/admin/img/athome-icon.png" width="18" alt="">
                            @endif @php echo $athome_text == '非公開' ? '<span class="text-white">'.$athome_text.'</span>' : $athome_text @endphp @endif</li>
                @endif
            </ul>
        </div>
    @endif
</div>
<script>
    $(document).ready(function () {

        $(".cal_picker").datepicker({
            format: "yyyy/mm/dd",
            locale: 'ja',
            language: 'ja',
            weekStart: 1,
            todayHighlight: true,
            autoclose: true,
        });

    })
</script>
