mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-26 18:37:12 +00:00
Merge branch 'beta' into 'master'
Highlight users that created a bank account See merge request bde/nk20!134
This commit is contained in:
commit
ceccba0d71
@ -4,6 +4,8 @@
|
|||||||
import django_tables2 as tables
|
import django_tables2 as tables
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
|
from treasury.models import SogeCredit
|
||||||
|
|
||||||
|
|
||||||
class FutureUserTable(tables.Table):
|
class FutureUserTable(tables.Table):
|
||||||
"""
|
"""
|
||||||
@ -21,6 +23,7 @@ class FutureUserTable(tables.Table):
|
|||||||
fields = ('last_name', 'first_name', 'username', 'email', )
|
fields = ('last_name', 'first_name', 'username', 'email', )
|
||||||
model = User
|
model = User
|
||||||
row_attrs = {
|
row_attrs = {
|
||||||
'class': 'table-row',
|
'class': lambda record: 'table-row'
|
||||||
|
+ (' bg-warning' if SogeCredit.objects.filter(user=record).exists() else ''),
|
||||||
'data-href': lambda record: record.pk
|
'data-href': lambda record: record.pk
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin,
|
|||||||
fee += 8000
|
fee += 8000
|
||||||
ctx["total_fee"] = "{:.02f}".format(fee / 100, )
|
ctx["total_fee"] = "{:.02f}".format(fee / 100, )
|
||||||
|
|
||||||
ctx["declare_soge_account"] = True
|
ctx["declare_soge_account"] = SogeCredit.objects.filter(user=user).exists()
|
||||||
|
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user