Skip to content

Commit

Permalink
Add "KYC Status" and "Last Verified" columns
Browse files Browse the repository at this point in the history
  • Loading branch information
kaapstorm committed Feb 18, 2025
1 parent 72c9ed6 commit 8d27b75
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions corehq/apps/integration/kyc/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ class Meta(BaseHtmxTable.Meta):
country = columns.Column(
verbose_name=_('Country'),
)
kyc_is_verified = columns.TemplateColumn(
template_name='kyc/partials/kyc_verify_status.html',
verbose_name=_('KYC Status'),
)
kyc_last_verified_at = columns.DateTimeColumn(
verbose_name=_('Last Verified'),
)
verify_btn = columns.TemplateColumn(
template_name='kyc/partials/kyc_verify_button.html',
verbose_name=_('Verify'),
Expand Down
2 changes: 2 additions & 0 deletions corehq/apps/integration/kyc/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def _parse_row(self, row_obj, config):
'city',
'post_code',
'country',
'kyc_is_verified',
'kyc_last_verified_at',
]
for field in user_fields:
if field not in user_data:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if record.kyc_is_verified is True %}
<span class="badge bg-success">Pass</span>
{% elif record.kyc_is_verified is False %}
<span class="badge bg-danger">Fail</span>
{% else %}
<span class="badge bg-secondary">Not Checked</span>
{% endif %}

0 comments on commit 8d27b75

Please sign in to comment.