mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +00:00
Sli
7b41051d0d
* Don't tie the output name to webpack itself * Don't call js bundling webpack in python code * Make the doc more generic about js bundling
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
from pydantic import TypeAdapter
|
|
|
|
from accounting.models import ClubAccount, Company
|
|
from accounting.schemas import ClubAccountSchema, CompanySchema
|
|
from core.views.widgets.select import AutoCompleteSelect, AutoCompleteSelectMultiple
|
|
|
|
_js = ["bundled/accounting/components/ajax-select-index.ts"]
|
|
|
|
|
|
class AutoCompleteSelectClubAccount(AutoCompleteSelect):
|
|
component_name = "club-account-ajax-select"
|
|
model = ClubAccount
|
|
adapter = TypeAdapter(list[ClubAccountSchema])
|
|
|
|
js = _js
|
|
|
|
|
|
class AutoCompleteSelectMultipleClubAccount(AutoCompleteSelectMultiple):
|
|
component_name = "club-account-ajax-select"
|
|
model = ClubAccount
|
|
adapter = TypeAdapter(list[ClubAccountSchema])
|
|
|
|
js = _js
|
|
|
|
|
|
class AutoCompleteSelectCompany(AutoCompleteSelect):
|
|
component_name = "company-ajax-select"
|
|
model = Company
|
|
adapter = TypeAdapter(list[CompanySchema])
|
|
|
|
js = _js
|
|
|
|
|
|
class AutoCompleteSelectMultipleCompany(AutoCompleteSelectMultiple):
|
|
component_name = "company-ajax-select"
|
|
model = Company
|
|
adapter = TypeAdapter(list[CompanySchema])
|
|
|
|
js = _js
|