<%- include("partials/header", { title: "Select Operation" , user }) %>

    <h1>Select Operation</h1>

    <% if (!presets || presets.length===0) { %>
        <p><b>No active operations right now.</b></p>
        <p>Come back when an operation has been enabled.</p>
        <% } else { %>
            <p>Select which operation you’re submitting an entry for:</p>

            <div class="ops-grid">
                <% presets.forEach(p=> { %>
                    <a class="op-card" href="/entry?preset=<%= p.id %>">

                        <!-- Start / End -->
                        <div class="op-time">
                            <%= fmtMelbourne(p.start_at) %> → <%= fmtMelbourne(p.end_at) %>
                        </div>

                        <!-- Title -->
                        <div class="op-title">
                            <%= p.title %>
                        </div>

                        <!-- Topic -->
                        <div class="op-sub">
                            <%= p.topic %>
                        </div>

                    </a>
                    <% }) %>
            </div>

            <% } %>

                <%- include("partials/footer") %>