Added Workflow entry selector
This commit is contained in:
15
src/components/entryselector/commands.py
Normal file
15
src/components/entryselector/commands.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from components.BaseCommandManager import BaseCommandManager
|
||||
from components.entryselector.constants import Routes, ROUTE_ROOT
|
||||
|
||||
|
||||
class EntrySelectorCommandManager(BaseCommandManager):
|
||||
def __init__(self, owner):
|
||||
super().__init__(owner)
|
||||
|
||||
def select_entry(self, entry):
|
||||
return {
|
||||
"hx-get": f"{ROUTE_ROOT}{Routes.Select}",
|
||||
"hx-target": f"#{self._owner.content_id}",
|
||||
"hx-swap": "innerHTML",
|
||||
"hx-vals": f'{{"_id": "{self._id}", "entry": "{entry}"}}',
|
||||
}
|
||||
Reference in New Issue
Block a user