@using TravelCompanyContracts.ViewModels.OperatorViewModels

@model List<GuideViewModel>

@{
    ViewData["Title"] = "Home Page";
}

<div class="text-center">
    <h1 class="display-4">Гиды</h1>
</div>


<div class="text-center">
    @{
        if (Model == null)
        {
                    <h3 class="display-4">Авторизируйтесь как оператор</h3>
            return;
        }

            <p>
                <a asp-action="CreateTGuide">Создать гида</a>
            </p>
            <table class="table">
                <thead>
                    <tr>
                        <th>
                            Фамилия
                        </th>
                        <th>
                            Имя
                        </th>
                        <th>
                            Отчество
                        </th>
                        <th>
                            Логин оператора
                        </th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                @foreach (var item in Model)
                {
                            <tr>
                                <td>
                            @Html.DisplayFor(modelItem => item.Id)
                                </td>
                                <td>
                            @Html.DisplayFor(modelItem => item.Surname)
                                </td>
                                <td>
                            @Html.DisplayFor(modelItem => item.Name)
                                </td>
                                <td>
                            @Html.DisplayFor(modelItem => item.Patronymic)
                                </td>
                                <td>
                            @Html.DisplayFor(modelItem => item.OperatorLogin)
                                </td>
                                 <td>
                                <p>
                                    <a asp-action="DeleteExcursion">Удалить </a>
                                </p>
                                </td>
                            </tr>
                }
                </tbody>
            </table>
    }
</div>