mirror of
https://github.com/System-End/identity-vault.git
synced 2026-04-19 16:28:21 +00:00
add badge for verif needed
This commit is contained in:
parent
b5a293454a
commit
77fcd6a2a1
1 changed files with 12 additions and 7 deletions
|
|
@ -38,13 +38,18 @@ class Components::Sidebar < Components::Base
|
|||
# Add verification link if user needs to submit or resubmit
|
||||
if current_identity.present?
|
||||
status = current_identity.verification_status
|
||||
if status == "needs_submission" || status == "pending"
|
||||
items << {
|
||||
label: t("sidebar.verification"),
|
||||
path: new_verifications_path,
|
||||
icon: status == "pending" ? "clock" : "card-id"
|
||||
}
|
||||
end
|
||||
|
||||
# Show a small badge when the user needs to take a verification action.
|
||||
# We use a numeric badge so the rendering helper can decide whether to display it.
|
||||
badge_count = 0
|
||||
badge_count = 1 if status == "needs_submission" || status == "pending"
|
||||
|
||||
items << {
|
||||
label: t("sidebar.verification"),
|
||||
path: new_verifications_path,
|
||||
icon: status == "pending" ? "clock" : "card-id",
|
||||
badge: badge_count
|
||||
}
|
||||
end
|
||||
|
||||
items << { label: t("sidebar.addresses"), path: addresses_path, icon: "email" }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue