import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import { createSubscribedElement } from '../../UnstatedUtils'; import AppContainer from '../../../services/AppContainer'; class UserMenu extends React.Component { activateUser() {} susupendUser() {} removeUser() {} removeFromAdmin() {} giveAdminAccess() {} render() { const { t } = this.props; // const users = this.props.users; let contentOfStatus; // let adminMenu; // {this.props.users.forEach((user) => { // if (user.status === 1) { // contentOfStatus = ( // // { t('user_management.accept') } // // ); // if (user.status === 2) { // contentOfStatus = ( //
  • // { username !== user.username // ? ( //
  • // // { t('user_management.deactivate_account') } // //
  • // ) // : ( //
  • // // { t('user_management.deactivate_account') } // //

    { t('user_management.your_own') }

    //
  • // ) // } // // ); // if (user.status === 3) { // contentOfStatus = ( // // { t('Undo') } // // ); // if (user.status === 1 || user.status === 5) { // contentOfStatus = ( //
  • // // { t('Delete') } // //
  • // ); // } // if (user.admin === true) { // adminMenu = ( //
  • // { username !== user.username // ? ( //
  • // // { t('user_management.remove_admin_access') } // //
  • // ) // : ( //
  • // // { t('user_management.remove_admin_access') } // //

    { t('user_management.cannot_remove') }

    //
  • // ) // } // // ); // } // else { // adminMenu = ( //
  • // // { t('user_management.give_admin_access') } // //
  • // ); // } // }} return (
    {/* password reset modal */}
    { t('user_management.reset_password')}

    { t('user_management.password_never_seen') }
    { t('user_management.send_new_password') }

    { t('user_management.target_user') }:

    { t('user_management.reset_password') }

    Let the user know the new password below and strongly recommend to change another one immediately.

    Reset user:

    New password:

    ); } } const UserMenuWrapper = (props) => { return createSubscribedElement(UserMenu, props, [AppContainer]); }; UserMenu.propTypes = { t: PropTypes.func.isRequired, // i18next users: PropTypes.array, }; export default withTranslation()(UserMenuWrapper);