diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json
index 6a60dbc9..248574e1 100644
--- a/apps/permission/fixtures/initial.json
+++ b/apps/permission/fixtures/initial.json
@@ -4401,6 +4401,22 @@
{
"model": "permission.permission",
"pk": 296,
+ "fields": {
+ "model": [
+ "wei",
+ "weimembership"
+ ],
+ "query": "{\"club__weiclub__year\": [\"today\", \"year\"]}",
+ "type": "view",
+ "mask": 2,
+ "field": "",
+ "permanent": false,
+ "description": "Voir toutes les adhésions au WEI courant"
+ }
+ },
+ {
+ "model": "permission.permission",
+ "pk": 297,
"fields": {
"model": [
"wei",
@@ -4509,7 +4525,7 @@
160,
212,
222,
- 296
+ 297
]
}
},
@@ -4698,7 +4714,8 @@
178,
183,
294,
- 295
+ 295,
+ 296
]
}
},
diff --git a/apps/wei/tables.py b/apps/wei/tables.py
index 7dc0d531..362bdf9c 100644
--- a/apps/wei/tables.py
+++ b/apps/wei/tables.py
@@ -187,6 +187,35 @@ class WEIMembershipTable(tables.Table):
def render_year(self, record):
return str(record.user.profile.ens_year) + "A"
+ def render_registration__deposit_type(self, record):
+ if record.registration.first_year:
+ return format_html("∅")
+ if record.registration.deposit_type == 'check':
+ # TODO Install Font Awesome 6 to acces more icons (and keep compaibility with current used v4)
+ return format_html("""
+
+ """)
+ if record.registration.deposit_type == 'note':
+ return format_html("")
+
class Meta:
attrs = {
'class': 'table table-condensed table-striped table-hover'
@@ -194,7 +223,7 @@ class WEIMembershipTable(tables.Table):
model = WEIMembership
template_name = 'django_tables2/bootstrap4.html'
fields = ('user', 'user__last_name', 'user__first_name', 'registration__gender', 'user__profile__department',
- 'year', 'bus', 'team', 'registration__deposit_given', )
+ 'year', 'bus', 'team', 'registration__deposit_given', 'registration__deposit_type')
row_attrs = {
'class': 'table-row',
'id': lambda record: "row-" + str(record.pk),