Skip to content

Commit

Permalink
[CHG] b_w_status: state colors
Browse files Browse the repository at this point in the history
  • Loading branch information
remytms committed Aug 18, 2020
1 parent d7a8433 commit 1403f23
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions beesdoo_worker_status/models/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,28 @@ def _get_selection_status(self):
]

def _get_color_mapping(self, state):
"""
Set of colors:
0: none,
1: dark orange,
2: orange,
3: yellow,
4: light blue,
5: dark purple,
6: light red (pink),
7: cyan,
8: dark blue,
9: magenta (red),
10: green,
11: purple
"""
return {
"draft": 0,
"open": 1,
"done": 5,
"absent_2": 2,
"absent_1": 7,
"open": 0,
"done": 10,
"absent_2": 9,
"absent_1": 2,
"absent_0": 3,
"cancel": 9,
"cancel": 5,
}[state]

def _get_final_state(self):
Expand Down

0 comments on commit 1403f23

Please sign in to comment.