diff --git a/scm-ui/public/locales/de/users.json b/scm-ui/public/locales/de/users.json index 96d632e55d..05b5cf142f 100644 --- a/scm-ui/public/locales/de/users.json +++ b/scm-ui/public/locales/de/users.json @@ -24,6 +24,7 @@ "users": { "title": "Benutzer", "subtitle": "Verwaltung der Benutzer", + "noUsers": "Keine Benutzer gefunden.", "createButton": "Benutzer erstellen" }, "singleUser": { diff --git a/scm-ui/public/locales/en/users.json b/scm-ui/public/locales/en/users.json index 91e4efe87f..e6fd822ead 100644 --- a/scm-ui/public/locales/en/users.json +++ b/scm-ui/public/locales/en/users.json @@ -24,6 +24,7 @@ "users": { "title": "Users", "subtitle": "Create, read, update and delete users", + "noUsers": "No users found.", "createButton": "Create User" }, "singleUser": { diff --git a/scm-ui/src/users/containers/Users.js b/scm-ui/src/users/containers/Users.js index 3d88523479..66a4102fa8 100644 --- a/scm-ui/src/users/containers/Users.js +++ b/scm-ui/src/users/containers/Users.js @@ -19,7 +19,8 @@ import { PageActions, Button, CreateButton, - Paginator + Paginator, + Notification } from "@scm-manager/ui-components"; import { UserTable } from "./../components/table"; import type { User, PagedCollection } from "@scm-manager/ui-types"; @@ -75,14 +76,26 @@ class Users extends React.Component { loading={loading || !users} error={error} > - - {this.renderPaginator()} + {this.renderUserTable()} {this.renderCreateButton()} {this.renderPageActionCreateButton()} ); } + renderUserTable() { + const { users, t } = this.props; + if (users && users.length > 0) { + return ( + <> + + {this.renderPaginator()} + + ); + } + return {t("users.noUsers")}; + } + renderPaginator() { const { list } = this.props; if (list) {