Browse Source

[CHG] b_w_status: state colors

pull/154/merge 12.0-2020-08-19.00
Rémy Taymans 4 years ago
parent
commit
1403f2353d
  1. 26
      beesdoo_worker_status/models/task.py

26
beesdoo_worker_status/models/task.py

@ -19,14 +19,28 @@ class Task(models.Model):
] ]
def _get_color_mapping(self, state): 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 { 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, "absent_0": 3,
"cancel": 9,
"cancel": 5,
}[state] }[state]
def _get_final_state(self): def _get_final_state(self):

Loading…
Cancel
Save