mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-15 02:33:22 +00:00
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
from django.forms import Select, SelectMultiple
|
|
|
|
from accounting.models import ClubAccount, Company
|
|
from accounting.schemas import ClubAccountSchema, CompanySchema
|
|
from core.views.widgets.select import AutoCompleteSelectMixin
|
|
|
|
|
|
class AutoCompleteSelectClubAccount(AutoCompleteSelectMixin, Select):
|
|
component_name = "club-account-ajax-select"
|
|
model = ClubAccount
|
|
schema = ClubAccountSchema
|
|
|
|
js = [
|
|
"webpack/accounting/components/ajax-select-index.ts",
|
|
]
|
|
|
|
|
|
class AutoCompleteSelectMultipleClubAccount(AutoCompleteSelectMixin, SelectMultiple):
|
|
component_name = "club-account-ajax-select"
|
|
model = ClubAccount
|
|
schema = ClubAccountSchema
|
|
|
|
js = [
|
|
"webpack/accounting/components/ajax-select-index.ts",
|
|
]
|
|
|
|
|
|
class AutoCompleteSelectCompany(AutoCompleteSelectMixin, Select):
|
|
component_name = "company-ajax-select"
|
|
model = Company
|
|
schema = CompanySchema
|
|
|
|
js = [
|
|
"webpack/accounting/components/ajax-select-index.ts",
|
|
]
|
|
|
|
|
|
class AutoCompleteSelectMultipleCompany(AutoCompleteSelectMixin, SelectMultiple):
|
|
component_name = "company-ajax-select"
|
|
model = Company
|
|
schema = CompanySchema
|
|
|
|
js = [
|
|
"webpack/accounting/components/ajax-select-index.ts",
|
|
]
|