Add bank fetch to balances page

This commit is contained in:
Mark Veidemanis 2023-03-09 18:55:39 +00:00
parent 8632d2a190
commit 0deab28320
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 13 additions and 0 deletions

View File

@ -66,6 +66,19 @@ class BanksBalances(LoginRequiredMixin, OTPRequiredMixin, ObjectList):
list_url_name = "balances"
list_url_args = ["type"]
def get_context_data(self):
context = super().get_context_data()
self.extra_buttons = [
{
"url": reverse("bank_fetch"),
"action": "refresh",
"method": "get",
"label": "Fetch account details",
"icon": "fa-solid fa-refresh",
},
]
return context
def get_queryset(self, **kwargs):
aggregators = Aggregator.objects.filter(user=self.request.user, enabled=True)
account_balances = {}