2024-10-28 17:08:13 +00:00
|
|
|
from pydantic import TypeAdapter
|
|
|
|
|
2024-10-20 18:55:05 +00:00
|
|
|
from club.models import Club
|
|
|
|
from club.schemas import ClubSchema
|
2024-10-21 14:14:00 +00:00
|
|
|
from core.views.widgets.select import AutoCompleteSelect, AutoCompleteSelectMultiple
|
|
|
|
|
2024-11-18 14:36:05 +00:00
|
|
|
_js = ["bundled/club/components/ajax-select-index.ts"]
|
2024-10-20 18:55:05 +00:00
|
|
|
|
|
|
|
|
2024-10-21 14:14:00 +00:00
|
|
|
class AutoCompleteSelectClub(AutoCompleteSelect):
|
2024-10-20 18:55:05 +00:00
|
|
|
component_name = "club-ajax-select"
|
|
|
|
model = Club
|
2024-10-28 17:08:13 +00:00
|
|
|
adapter = TypeAdapter(list[ClubSchema])
|
2024-10-20 18:55:05 +00:00
|
|
|
|
2024-10-21 14:14:00 +00:00
|
|
|
js = _js
|
2024-10-20 18:55:05 +00:00
|
|
|
|
|
|
|
|
2024-10-21 14:14:00 +00:00
|
|
|
class AutoCompleteSelectMultipleClub(AutoCompleteSelectMultiple):
|
2024-10-20 18:55:05 +00:00
|
|
|
component_name = "club-ajax-select"
|
|
|
|
model = Club
|
2024-10-28 17:08:13 +00:00
|
|
|
adapter = TypeAdapter(list[ClubSchema])
|
2024-10-20 18:55:05 +00:00
|
|
|
|
2024-10-21 14:14:00 +00:00
|
|
|
js = _js
|