Fixes and improvements
* moves diff_states message back to table top for direct presentation in compensation/detail/view.html * removes diff_states rendering in deadline card in compensation/detail/view.html * fixes before_state adding based on GET parameter * refactors UserActionlogEntryEnum into a UserAction TextChoice (Django 3.x) * adds ordering of compensation states depending on surface value * refactors ServerMessageImportance from enum into TextChoice (Django 3.x) * adds/updates translations
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from konova.enums import ServerMessageImportance
|
||||
from konova.models import BaseResource
|
||||
|
||||
|
||||
class ServerMessageImportance(models.TextChoices):
|
||||
"""
|
||||
Defines importance levels for server messages
|
||||
"""
|
||||
DEFAULT = "default", _("Default")
|
||||
INFO = "info", _("Info")
|
||||
WARNING = "warning", _("Warning")
|
||||
|
||||
|
||||
class ServerMessage(BaseResource):
|
||||
"""
|
||||
Holds messages, which can be displayed on the user's dashboard
|
||||
@@ -13,4 +22,4 @@ class ServerMessage(BaseResource):
|
||||
is_active = models.BooleanField(default=True)
|
||||
publish_on = models.DateTimeField()
|
||||
unpublish_on = models.DateTimeField()
|
||||
importance = models.CharField(max_length=100, choices=ServerMessageImportance.as_choices(drop_empty_choice=True))
|
||||
importance = models.CharField(max_length=100, choices=ServerMessageImportance.choices)
|
||||
|
||||
Reference in New Issue
Block a user