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