@extends('views.layouts.master')
<link rel="stylesheet" href="{{ csset('/themes/point2u/pro/resources/css/blog-standard.css') }}">
@section('content')

<div class="sub qna">
	<div class="container">
		<div class="navi">
			<a href="/"><i class="fa-solid fa-house"></i> 홈</a> > 커뮤니티 > Q&A
		</div>
		<div class="title">
			<h2>Q&A</h2>
		</div>
	</div>
	<!--=====================================
	BANNER PART START
	=======================================-->
	<!--필요없음 지움
	<section class="inner-section single-banner">
		<div class="container">
			<h2>1:1 상담</h2>
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a href="index.html">Home</a></li>
				<li class="breadcrumb-item active" aria-current="page">1:1 상담</li>
			</ol>
		</div>
	</section>
	-->
	<!--=====================================
	BANNER PART END
	=======================================-->


	<!--=====================================
	BLOG STANDARD PART START
	=======================================-->
	<section class="inner-section blog-standard qna-list">
		<div class="container">
			<div class="row justify-content-center">
				<div class="col-lg-12">
					<div class="row">
						<div class="col-lg-12">
							@component('views.partial.table-options')
								<div class="filter-btn mb-0">
									<button type="button" class="btn btn_primary" onclick="location.href='{{ route('1to1.form') }}'">문의하기</button>
								</div>
							@endcomponent
						</div>
						<div class="col-lg-12 list">
							@php
								$no = $oneToOnePage['PageVars']['QueryCnt'];
							@endphp
							@forelse($oneToOnePage['Page'] ?? [] as $oneToOne)
								<div class="blog-card">
									<div class="qna-num">{{ $no-- }}</div>
									<h4 class="blog-title">
										<a href="{{ route('1to1.show', $oneToOne['Id']) }}">{{ $oneToOne['C6'] }}</a>
									</h4>
									<div class="qna-date">{{ $oneToOne['C4'] }}</div>
									@if ($oneToOne['C8'] === '1')
										<div class="qna-status"><span class="done">답변완료</span></div>
									@else
										<div class="qna-status"><span class="ing">미답변</span></div>
									@endif
								</div>
							@empty
							@endforelse
							<!-- <div class="blog-card">
							<div class="qna-num">000</div>
								<h4 class="blog-title">
									<a href="/1to1-details">문의 사항 제목이 들어갑니다.여자의 근로는 특별한 보호를 받으며, 고용·임금 및 근로조건에 있어서 부당한 차별을...</a>
								</h4>
								<div class="qna-date">2022-00-00</div>
							<div class="qna-status"><span class="ing">미답변</span></div>
							</div> -->
						</div>

                        <!-- 페이지네이션 -->
						<div class="col-lg-12">
							<div class="bottom-paginate d-flex justify-content-end">
								{{ $oneToOnePage['Page']->appends(['limit' => request('limit'), 'sort' => request('sort')])->links() }}
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
	</section>
	<!--=====================================
	BLOG STANDARD PART END
	=======================================-->
</div>
@endsection
