{% extends "base.html" %}
{% block title %}Nouvel horaire — GMAO{% endblock %}
{% block content %}
<div class="container-fluid">
    <h2 class="h4 mb-3"><i class="bi bi-clock"></i> Nouvel horaire de travail</h2>
    <form method="POST">
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
        <div class="row">
            <div class="col-md-6">
                <div class="mb-3">
                    <label class="form-label">Jour de la semaine *</label>
                    <select name="day_of_week" class="form-select" required>
                        <option value="0">Dimanche</option>
                        <option value="1">Lundi</option>
                        <option value="2">Mardi</option>
                        <option value="3">Mercredi</option>
                        <option value="4">Jeudi</option>
                        <option value="5">Vendredi</option>
                        <option value="6">Samedi</option>
                    </select>
                </div>
            </div>
            <div class="col-md-6">
                <div class="mb-3"><label class="form-label">Utilisateur (optionnel)</label><input type="number" name="user_id" class="form-control" placeholder="ID utilisateur"></div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-3"><div class="mb-3"><label class="form-label">Heure debut *</label><input type="time" name="start_time" class="form-control" required></div></div>
            <div class="col-md-3"><div class="mb-3"><label class="form-label">Heure fin *</label><input type="time" name="end_time" class="form-control" required></div></div>
            <div class="col-md-3"><div class="mb-3"><label class="form-label">Pause dejeuner debut</label><input type="time" name="lunch_start" class="form-control"></div></div>
            <div class="col-md-3"><div class="mb-3"><label class="form-label">Pause dejeuner fin</label><input type="time" name="lunch_end" class="form-control"></div></div>
        </div>
        <button type="submit" class="btn btn-primary"><i class="bi bi-save"></i> Creer</button>
    </form>
</div>
{% endblock %}