EcoAccount index

* renames eco_withdraws to withdraws
* adds EcoAccountTableFilter
* changes percentage withdraw to surface withdraw --> renames amount to surface
* updates EcoAccountTable
  * adds column for rendering rest of available account using a progress bar
* adds progressbar.html to konova/custom_widgets
* adds/updates translations
This commit is contained in:
mipel
2021-08-09 14:16:54 +02:00
parent c016ab2e76
commit 3dc2af4b7c
9 changed files with 279 additions and 112 deletions
+15 -6
View File
@@ -175,6 +175,16 @@ class EcoAccount(AbstractCompensation):
help_text="Users having access (shared with)"
)
# Refers to "verzeichnen"
recorded = models.OneToOneField(
UserActionLogEntry,
on_delete=models.SET_NULL,
null=True,
blank=True,
help_text="Holds data on user and timestamp of this action",
related_name="+"
)
def __str__(self):
return "{}".format(self.identifier)
@@ -189,15 +199,14 @@ class EcoAccountWithdraw(BaseResource):
null=True,
blank=True,
help_text="Withdrawn from",
related_name="eco_withdraws",
related_name="withdraws",
)
amount = models.FloatField(
surface = models.FloatField(
null=True,
blank=True,
help_text="Amount withdrawn (percentage)",
help_text="Amount withdrawn ()",
validators=[
MinValueValidator(limit_value=0.00),
MaxValueValidator(limit_value=100),
]
)
intervention = models.ForeignKey(
@@ -206,8 +215,8 @@ class EcoAccountWithdraw(BaseResource):
null=True,
blank=True,
help_text="Withdrawn for",
related_name="eco_withdraws",
related_name="withdraws",
)
def __str__(self):
return "{} of {}".format(self.amount, self.account)
return "{} of {}".format(self.surface, self.account)