@page
@model TaxBaik.Web.Pages.Admin.Companies.IndexModel
@{ ViewData["Title"] = "회사"; }

<section class="admin-page-shell">
    @await Html.PartialAsync("_AdminPageHeader", new TaxBaik.Web.Models.AdminPageHeaderModel("CRM", "회사 관리", "고객사 회사를 관리합니다.", null, null))
    @if (Model.Items.Count == 0)
    {
        <div class="card">
            <div class="card-body">
                @await Html.PartialAsync("_EmptyState", "회사가 없습니다.")
            </div>
        </div>
    }
    else
    {
        <div class="card">
            <div class="table-responsive">
                <table class="table table-vcenter card-table">
                    <thead>
                        <tr><th>코드</th><th>회사명</th><th>담당자</th><th>활성</th></tr>
                    </thead>
                    <tbody>
                    @foreach (var item in Model.Items)
                    {
                        <tr>
                            <td>@item.CompanyCode</td>
                            <td>@item.CompanyName</td>
                            <td>@item.ContactPerson</td>
                            <td>@await Html.PartialAsync("_StatusBadge", item.IsActive ? "active" : "inactive")</td>
                        </tr>
                    }
                    </tbody>
                </table>
            </div>
        </div>
    }
</section>









