mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Remove ajax_select from accounting
This commit is contained in:
45
accounting/widgets/select.py
Normal file
45
accounting/widgets/select.py
Normal file
@ -0,0 +1,45 @@
|
||||
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",
|
||||
]
|
Reference in New Issue
Block a user