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:
@@ -15,13 +15,12 @@ from django.urls import reverse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from intervention.models import Intervention
|
||||
from konova.enums import UserActionLogEntryEnum
|
||||
from konova.forms import BaseForm, BaseModalForm
|
||||
from konova.models import Document
|
||||
from konova.settings import DEFAULT_LAT, DEFAULT_LON, DEFAULT_ZOOM, ZB_GROUP, ETS_GROUP
|
||||
from konova.utils.user_checks import in_group
|
||||
from organisation.models import Organisation
|
||||
from user.models import UserActionLogEntry
|
||||
from user.models import UserActionLogEntry, UserAction
|
||||
|
||||
|
||||
class NewInterventionForm(BaseForm):
|
||||
@@ -120,7 +119,7 @@ class NewInterventionForm(BaseForm):
|
||||
|
||||
action = UserActionLogEntry.objects.create(
|
||||
user=user,
|
||||
action=UserActionLogEntryEnum.CREATED.value,
|
||||
action=UserAction.CREATED,
|
||||
)
|
||||
intervention = Intervention(
|
||||
identifier=identifier,
|
||||
|
||||
@@ -12,12 +12,11 @@ from django.utils import timezone
|
||||
from django.utils.timezone import now
|
||||
|
||||
from intervention.settings import INTERVENTION_IDENTIFIER_LENGTH, INTERVENTION_IDENTIFIER_TEMPLATE
|
||||
from konova.enums import UserActionLogEntryEnum
|
||||
from konova.models import BaseObject, Geometry, UuidModel
|
||||
from konova.utils import generators
|
||||
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 ResponsibilityData(UuidModel):
|
||||
@@ -139,7 +138,7 @@ class Intervention(BaseObject):
|
||||
action = UserActionLogEntry.objects.create(
|
||||
user=_user,
|
||||
timestamp=_now,
|
||||
action=UserActionLogEntryEnum.DELETED.value
|
||||
action=UserAction.DELETED
|
||||
)
|
||||
for com in coms:
|
||||
com.deleted = action
|
||||
|
||||
Reference in New Issue
Block a user