Skip to content

Commit 0af90d7

Browse files
author
Andreas H. Kelch
committed
feat: added assign logic
1 parent 9049652 commit 0af90d7

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

deploy/modules/todo.py

+21-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,22 @@ class Todo(List):
1212
"lastname",
1313
"firstname",
1414
"subject",
15-
)
15+
),
16+
"actions":["assign"],
17+
"customActions":{
18+
"assign": {
19+
"name": "Zuweisen", # button name
20+
"access": ["todo-edit", "root"], # wer darf triggern
21+
"icon": "person-plus-fill", # button icon
22+
"variant":"success", # button color
23+
"outline":True, # button outline style
24+
"action": "action",
25+
"url": "/todo/assign", # actionSkel initial url
26+
"enabled": 'True', # regel wann button aktiv "TRUE" === immer
27+
"show_label":True, # button ohne label
28+
"target":"popup" # popup, tab
29+
},
30+
}
1631
}
1732

1833
default_order = {
@@ -58,6 +73,11 @@ class TodoAssignSkel(ActionSkel):
5873
return self.render.edit(action_skel, "assign")
5974

6075
# TODO: Add program logic here
76+
for todo in action_skel["todo"]:
77+
skel = self.editSkel()
78+
skel.fromDB(todo["dest"]["key"])
79+
skel.setBoneValue("user", action_skel["user"]["dest"]["key"])
80+
skel.toDB()
6181

6282
# TODO: Provide generic render action success
6383
return self.render.editSuccess(action_skel, "assignSuccess")

0 commit comments

Comments
 (0)