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:
mipel
2021-08-03 17:22:41 +02:00
parent 816600535a
commit cd5b2e264b
17 changed files with 215 additions and 164 deletions
+2 -5
View File
@@ -14,11 +14,10 @@ from django.utils.timezone import now
from compensation.settings import COMPENSATION_IDENTIFIER_LENGTH, COMPENSATION_IDENTIFIER_TEMPLATE
from intervention.models import Intervention, ResponsibilityData
from konova.enums import UserActionLogEntryEnum
from konova.models import BaseObject, BaseResource, Geometry, UuidModel
from konova.utils.generators import generate_random_string
from organisation.models import Organisation
from user.models import UserActionLogEntry
from user.models import UserActionLogEntry, UserAction
class Payment(BaseResource):
@@ -156,11 +155,9 @@ class Compensation(AbstractCompensation):
action = UserActionLogEntry.objects.create(
user=_user,
timestamp=_now,
action=UserActionLogEntryEnum.DELETED.value
action=UserAction.DELETED
)
self.deleted = action
#self.deleted_on = _now
#self.deleted_by = _user
self.save()
def save(self, *args, **kwargs):