Skip to content

Commit

Permalink
feat: added assign logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas H. Kelch committed Sep 19, 2024
1 parent 9049652 commit 0af90d7
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion deploy/modules/todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@ class Todo(List):
"lastname",
"firstname",
"subject",
)
),
"actions":["assign"],

Check failure on line 16 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E231: missing whitespace after ':'
"customActions":{

Check failure on line 17 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E231: missing whitespace after ':'
"assign": {
"name": "Zuweisen", # button name
"access": ["todo-edit", "root"], # wer darf triggern
"icon": "person-plus-fill", # button icon

Check failure on line 21 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E261: at least two spaces before inline comment
"variant":"success", # button color

Check failure on line 22 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E231: missing whitespace after ':'

Check failure on line 22 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E261: at least two spaces before inline comment
"outline":True, # button outline style

Check failure on line 23 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E231: missing whitespace after ':'

Check failure on line 23 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E261: at least two spaces before inline comment
"action": "action",
"url": "/todo/assign", # actionSkel initial url
"enabled": 'True', # regel wann button aktiv "TRUE" === immer
"show_label":True, # button ohne label

Check failure on line 27 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E231: missing whitespace after ':'

Check failure on line 27 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E261: at least two spaces before inline comment
"target":"popup" # popup, tab

Check failure on line 28 in deploy/modules/todo.py

View workflow job for this annotation

GitHub Actions / linter (3.12)

E231: missing whitespace after ':'
},
}
}

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

# TODO: Add program logic here
for todo in action_skel["todo"]:
skel = self.editSkel()
skel.fromDB(todo["dest"]["key"])
skel.setBoneValue("user", action_skel["user"]["dest"]["key"])
skel.toDB()

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

0 comments on commit 0af90d7

Please sign in to comment.