feat: add shared scouting notes mvp

This commit is contained in:
bisco
2026-04-07 17:41:53 +02:00
parent 4f869c1c02
commit 4651746427
9 changed files with 176 additions and 5 deletions

View File

@ -16,6 +16,7 @@
<li>
<a href="{% url 'scouting:player_detail' entry.player.id %}">{{ entry.player.full_name }}</a>
({{ entry.player.position }})
| Notes: {{ entry.note_count }}
<form method="post" action="{% url 'scouting:remove_favorite' entry.player.id %}">
{% csrf_token %}
<input type="hidden" name="next" value="{{ request.get_full_path }}">

View File

@ -51,6 +51,32 @@
{% endfor %}
</p>
<h2>Scouting Notes</h2>
<p>Notes are shared across the local development shortlist workflow in this MVP.</p>
<form method="post" action="{% url 'scouting:add_note' player.id %}">
{% csrf_token %}
<input type="hidden" name="next" value="{{ request.get_full_path }}">
<label for="id_body">Add note</label>
<textarea id="id_body" name="body" rows="4" cols="60"></textarea>
<button type="submit">Save note</button>
</form>
<ul>
{% for note in notes %}
<li>
<div>{{ note.body|linebreaksbr }}</div>
<small>Created: {{ note.created_at }}</small>
<form method="post" action="{% url 'scouting:delete_note' player.id note.id %}">
{% csrf_token %}
<input type="hidden" name="next" value="{{ request.get_full_path }}">
<button type="submit">Delete note</button>
</form>
</li>
{% empty %}
<li>No notes yet.</li>
{% endfor %}
</ul>
<h2>Season Contexts</h2>
<ul>
{% for context in contexts %}