#249 Created as modified
* fills modified attribute on new entries with created value automatically * adds default ordering by last modified on table overviews
This commit is contained in:
@@ -156,6 +156,7 @@ class NewCompensationForm(AbstractCompensationForm,
|
||||
title=title,
|
||||
intervention=intervention,
|
||||
created=action,
|
||||
modified=action,
|
||||
is_cef=is_cef,
|
||||
is_coherence_keeping=is_coherence_keeping,
|
||||
is_pik=is_pik,
|
||||
|
||||
@@ -117,6 +117,7 @@ class NewEcoAccountForm(AbstractCompensationForm, CompensationResponsibleFormMix
|
||||
responsible=responsible,
|
||||
deductable_surface=surface,
|
||||
created=action,
|
||||
modified=action,
|
||||
comment=comment,
|
||||
is_pik=is_pik,
|
||||
legal=legal
|
||||
|
||||
@@ -46,6 +46,8 @@ def index_view(request: HttpRequest):
|
||||
compensations = Compensation.objects.filter(
|
||||
deleted=None, # only show those which are not deleted individually
|
||||
intervention__deleted=None, # and don't show the ones whose intervention has been deleted
|
||||
).order_by(
|
||||
"-modified__timestamp"
|
||||
)
|
||||
table = CompensationTable(
|
||||
request=request,
|
||||
|
||||
@@ -41,6 +41,8 @@ def index_view(request: HttpRequest):
|
||||
template = "generic_index.html"
|
||||
eco_accounts = EcoAccount.objects.filter(
|
||||
deleted=None,
|
||||
).order_by(
|
||||
"-modified__timestamp"
|
||||
)
|
||||
table = EcoAccountTable(
|
||||
request=request,
|
||||
|
||||
Reference in New Issue
Block a user