Skip to content

Commit

Permalink
fixes #20
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Jan 17, 2024
1 parent 0474791 commit c94ef14
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defined competence aspects.
* [API documentation](http://dcm.bitplan.com/docs)

### Model
![Class Diagram](http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/WolfgangFahl/dcm/main/dcm.puml?fmt=svg&version=4)
![Class Diagram](http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/WolfgangFahl/dcm/main/dcm.puml?fmt=svg&version=5)

## Authors
* [Wolfgang Fahl](http://www.bitplan.com/Wolfgang_Fahl)
Expand Down
1 change: 1 addition & 0 deletions dcm.puml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class dcm.dcm_core.CompetenceFacet {
class dcm.dcm_core.CompetenceLevel {
level: int
icon: str
utf8_icon: str
}

class dcm.dcm_core.CompetenceTree {
Expand Down
6 changes: 5 additions & 1 deletion dcm/dcm_assessment.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ def setup_buttons(self):
self.buttons = {}
with ui.row() as self.row:
for level in self.competence_tree.levels:
# generate a button to represent the level
button_label=level.name
if level.utf8_icon:
button_label=f"{level.utf8_icon} {level.name}"
button = ui.button(
level.name,
button_label,
icon=level.icon,
color=level.color_code,
on_click=lambda _args, l=level.level: self.handle_selection(l),
Expand Down

0 comments on commit c94ef14

Please sign in to comment.