Skip to content

Commit

Permalink
Merge pull request #238 from intuitem/CA-363-Improve-user-detail-view…
Browse files Browse the repository at this point in the history
…-and-edit-view-breadcrumb

Improve user detail view and edit view breadcrumbs
  • Loading branch information
Mohamed-Hacene authored Apr 15, 2024
2 parents 41e98dc + dc5b6f8 commit baa0dbb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@
crumbs = tokens.map((t) => {
tokenPath += '/' + t;
if (t === $breadcrumbObject.id) {
if ($breadcrumbObject.name) t = $breadcrumbObject.name;
else t = $breadcrumbObject.email;
if ($breadcrumbObject.name) {
t = $breadcrumbObject.name;
} else if ($breadcrumbObject.first_name && $breadcrumbObject.last_name) {
t = `${$breadcrumbObject.first_name} ${$breadcrumbObject.last_name}`;
} else {
t = $breadcrumbObject.email;
}
} else if (t === 'folders') {
t = 'domains';
}
Expand Down

0 comments on commit baa0dbb

Please sign in to comment.