Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "KYC Status" and "Last Verified" columns #35797

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think it might be good to add translations for these status texts.

{% elif record.kyc_is_verified is False %}
<span class="badge bg-danger">Fail</span>
{% else %}
<span class="badge bg-secondary">Not Checked</span>
{% endif %}
Loading