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:
+15
-6
@@ -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 (m²)",
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user