Build out Positions CRUD and rework the Roles page
Positions had list/create/edit already stubbed as list-only; give it real forms, with a check mirroring the management_position_implies_staff_position constraint so a bad combination reads as a form error, not a 500. Roles now groups by role (excluding the MEMBER everyone holds automatically, which was just noise), grants via a modal instead of a separate page, and its member picker is a small typeahead combobox instead of a long native <select>.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 6.0.6 on 2026-08-03 15:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams', '0004_position_created_position_modified_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='position',
|
||||
name='management_position',
|
||||
field=models.BooleanField(default=False, help_text='A staff position with management authority over the team (e.g. head coach) -- requires staff position to also be checked.', verbose_name='management position'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='position',
|
||||
name='staff_position',
|
||||
field=models.BooleanField(default=False, help_text='Coach, manager, physio, ... -- assignable via a StaffAssignment rather than a team roster spot.', verbose_name='staff position'),
|
||||
),
|
||||
]
|
||||
18
teams/migrations/0006_alter_position_ordering.py
Normal file
18
teams/migrations/0006_alter_position_ordering.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 6.0.6 on 2026-08-03 15:58
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams', '0005_alter_position_management_position_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='position',
|
||||
name='ordering',
|
||||
field=models.PositiveSmallIntegerField(default=0, help_text="Lower numbers are listed first (e.g. on a team's roster). Positions with the same number are ordered by name.", verbose_name='ordering'),
|
||||
),
|
||||
]
|
||||
@@ -25,10 +25,10 @@ class Team(ClubScopedModel):
|
||||
class Position(ClubScopedModel):
|
||||
name = models.CharField(_("name"), max_length=255)
|
||||
short_name = models.CharField(_("short name"), max_length=255)
|
||||
ordering = models.PositiveSmallIntegerField(_("ordering"), default=0)
|
||||
ordering = models.PositiveSmallIntegerField(_("ordering"), default=0, help_text=_("Lower numbers are listed first (e.g. on a team's roster). Positions with the same number are ordered by name."))
|
||||
|
||||
staff_position = models.BooleanField(_("staff position"), default=False)
|
||||
management_position = models.BooleanField(_("management position"), default=False)
|
||||
staff_position = models.BooleanField(_("staff position"), default=False, help_text=_("Coach, manager, physio, ... -- assignable via a StaffAssignment rather than a team roster spot."))
|
||||
management_position = models.BooleanField(_("management position"), default=False, help_text=_("A staff position with management authority over the team (e.g. head coach) -- requires staff position to also be checked."))
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("position")
|
||||
|
||||
Reference in New Issue
Block a user