mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-15 10:43:22 +00:00
34 lines
939 B
Python
34 lines
939 B
Python
from core.views.widgets.select import AutoCompleteSelect, AutoCompleteSelectMultiple
|
|
from counter.models import Counter, Product
|
|
from counter.schemas import ProductSchema, SimplifiedCounterSchema
|
|
|
|
_js = ["webpack/counter/components/ajax-select-index.ts"]
|
|
|
|
|
|
class AutoCompleteSelectCounter(AutoCompleteSelect):
|
|
component_name = "counter-ajax-select"
|
|
model = Counter
|
|
schema = SimplifiedCounterSchema
|
|
js = _js
|
|
|
|
|
|
class AutoCompleteSelectMultipleCounter(AutoCompleteSelectMultiple):
|
|
component_name = "counter-ajax-select"
|
|
model = Counter
|
|
schema = SimplifiedCounterSchema
|
|
js = _js
|
|
|
|
|
|
class AutoCompleteSelectProduct(AutoCompleteSelect):
|
|
component_name = "product-ajax-select"
|
|
model = Product
|
|
schema = ProductSchema
|
|
js = _js
|
|
|
|
|
|
class AutoCompleteSelectMultipleProduct(AutoCompleteSelectMultiple):
|
|
component_name = "product-ajax-select"
|
|
model = Product
|
|
schema = ProductSchema
|
|
js = _js
|