3.1.1 • Published 3 days ago

@bigbinary/neeto-team-members-frontend v3.1.1

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
3 days ago

neeto-team-members-nano

The neeto-team-members-nano facilitates the administration of team members within neeto applications. The nano exports the @bigbinary/neeto-team-members-frontend NPM package and neeto-team-members-engine Rails engine for development.

Contents

  1. Development with Host Application
  2. Instructions for Publishing

Development with Host Application

Engine

The engine is used to seed the roles and permissions for the organization. It also provides concerns to handle common logic related to User model.

Installation

  1. Add this line to your application's Gemfile:

     source "NEETO_GEM_SERVER_URL" do
       # ..existing gems
    
       gem 'neeto-team-members-engine'
     end
  2. And then execute:

    bundle install
  3. Add this line to your application's config/routes.rb file:

     mount NeetoTeamMembersEngine::Engine => "/neeto_team_members_engine"
  4. Run the command to bring in all migrations required from the engine to the host application:

    bundle exec rails neeto_team_members_engine:install:migrations
  5. Add the migrations to the database:

    bundle exec rails db:migrate
  6. Now, run the generator which will copy the required files.

    bundle exec rails g neeto_team_members_engine:install

    This command will try to inject the engine's route as well as create a config/permissions.yml file to add the permissions required.

Usage

You can learn more about the setup and usage here:

  1. Permissions
  2. Roles
  3. Concerns
  4. Member Limit

Frontend package

The package exports the four components: Roles, TeamMembers, Permissions, and ManageRole.

Installation

Install the latest NeetoTeamMembersNano package using the below command:

yarn add @bigbinary/neeto-team-members-frontend

Instructions for development

Check the Frontend package development guide for step-by-step instructions to develop the frontend package.

Components

Roles

Roles page

This component manages team roles. It includes functionalities such as adding roles and allowing updates to roles with associated permissions.

Props
  • config: Configuration object that includes mandatory specifications for header breadcrumbs and role permissions. It also allows optional configurations for help articles and permission hierarchy.
Configuration

Refer to the Roles section for detailed information on the available configurations for the Roles component.

Usage
import React from "react";

import { Roles } from "@bigbinary/neeto-team-members-frontend";
import { BrowserRouter, Redirect, Route, Switch } from "react-router-dom";
import { ToastContainer } from "react-toastify";

import SideBar from "./components/Common/SideBar";

const App = () => (
  <BrowserRouter>
    <div className="flex">
      <SideBar />
      <Switch>
        <Route exact path="/roles">
          <Roles config={ROLES_CONFIG} />
        </Route>
      </Switch>
    </div>
    <ToastContainer />
  </BrowserRouter>
);

export default App;
TeamMembers

Team members page

The component offers functionalities for adding, updating and viewing team members and their roles in a tabular format. Additionally, it provides filtering options based on email, name, and role.

Props
  • config: Configuration object that allows customization of role management, member operation permissions, UI elements like buttons and headers, callback functions, table structure, dropdown actions, and various display aspects.
Configuration

Refer to the TeamMembers section for detailed information on the available configurations for the TeamMembers component.

Usage
import React from "react";

import { TeamMembers } from "@bigbinary/neeto-team-members-frontend";
import { BrowserRouter, Redirect, Route, Switch } from "react-router-dom";
import { ToastContainer } from "react-toastify";

import SideBar from "./components/Common/SideBar";

const App = () => (
  <BrowserRouter>
    <div className="flex">
      <SideBar />
      <Switch>
        <Route exact path="/members">
          <TeamMembers config={MEMBERS_CONFIG} />
        </Route>
      </Switch>
    </div>
    <ToastContainer />
  </BrowserRouter>
);

export default App;
Permissions

Permissions component

The component handles the rendering and management of permissions for team members. It organizes permissions into categories, provides checkboxes for selection, and supports hierarchical structures with parent-child relationships.

Props
  • permissions: An array of permissions.
  • isDisabled: A boolean indicating whether the component is disabled. By default, it is false.
  • permissionRelationConfig: Configuration for managing parent-child relationships and unchecking permissions on select.
Configuration

Refer to the Permissions section for detailed information on the available configurations for the TeamMembers component.

Usage
import React from "react";

import { Permissions } from "@bigbinary/neeto-team-members-frontend";
import { BrowserRouter, Redirect, Route, Switch } from "react-router-dom";
import { ToastContainer } from "react-toastify";

import SideBar from "./components/Common/SideBar";

const App = () => (
  <BrowserRouter>
    <div className="flex">
      <SideBar />
      <Switch>
        <Route exact path="/permissions">
          <Permissions
            permissionRelationConfig={PERMISSION_RELATION_CONFIG}
            permissions={PERMISSIONS}
          />
        </Route>
      </Switch>
    </div>
    <ToastContainer />
  </BrowserRouter>
);

export default App;
ManageMembers

Manage members pane component

The component is a form-based interface for adding or editing team members.

Props
  • config: Configuration object with various options for customizing the behavior of the component.
  • onComplete: Callback function to be executed when the component is closed or the form is submitted.
  • roles: An array of roles available for team members.
  • selectedMember: The team member object being edited, if applicable.
  • componentConfig: Configuration specific to the component, including the type of pane, initial focus reference, etc.
Configuration

Refer to the ManageMembers section for detailed information on the available configurations for the ManageMembers component.

Usage
import React from "react";

import { ManageMembers } from "@bigbinary/neeto-team-members-frontend";
import { BrowserRouter, Redirect, Route, Switch } from "react-router-dom";
import { ToastContainer } from "react-toastify";

import SideBar from "./components/Common/SideBar";

const App = () => (
  <BrowserRouter>
    <div className="flex">
      <SideBar />
      <Switch>
        <Route exact path="/permissions">
          <ManageMembers
            componentConfig={COMPONENT_CONFIG}
            config={CONFIG}
            onComplete={() => void}
          />
        </Route>
      </Switch>
    </div>
    <ToastContainer />
  </BrowserRouter>
);

export default App;
Profile

The Profile component encapsulates the user profile functionality, integrating a Pane component for displaying profile details and a usePaneState hook to efficiently manage the state associated with the Pane.

  1. Profile.Pane: The component is a pane-based interface for viewing and editing the user's profile details.

    Profile pane component

  2. Profile.usePaneState: A hook to manage the state of the profile pane.

    Usage
    import { Profile } from "@bigbinary/neeto-team-members-frontend";
    
    const [isOpen, setIsOpen] = Profile.usePaneState();
    
    return (
      <>
        <button onClick={() => setIsOpen(true)}> Open profile pane</button>
        <button onClick={() => setIsOpen(prevIsOpen => !prevIsOpen)}>
          Toggle Profile pane
        </button>
      </>
    );

Instructions for Publishing

Consult the building and releasing packages guide for details on how to publish.

Integrations

ProjectsTeamMembersRolesPermissions
neetoAuth:white_check_mark::white_check_mark:-
neetoCal:white_check_mark::white_check_mark:-
neetoChangelog:white_check_mark::white_check_mark:-
neetoChat:white_check_mark::white_check_mark:-
neetoChatify:white_check_mark::white_check_mark:-
neetoCI:white_check_mark::white_check_mark:-
neetoCourse:white_check_mark::white_check_mark:-
neetoCRM:white_check_mark::white_check_mark:-
neetoDeploy:white_check_mark::white_check_mark::white_check_mark:
neetoDesk:white_check_mark::white_check_mark:-
neetoForm:white_check_mark::white_check_mark:-
neetoGit:white_check_mark::white_check_mark:-
neetoInvisible:white_check_mark::white_check_mark:-
neetoInvoice:white_check_mark::white_check_mark:-
neetoKB:white_check_mark::white_check_mark:-
neetoMonitor:white_check_mark::white_check_mark:-
neetoPlanner:white_check_mark::white_check_mark:-
neetoQuiz:white_check_mark::white_check_mark:-
neetoRecord:white_check_mark::white_check_mark:-
neetoReplay:white_check_mark::white_check_mark:-
neetoRunner:white_check_mark::white_check_mark:-
neetoSign:white_check_mark::white_check_mark:-
neetoSite:white_check_mark::white_check_mark:-
neetoTestify:white_check_mark::white_check_mark:-
neetoTower:white_check_mark::white_check_mark:-
neetoTrail:white_check_mark::white_check_mark:-
neetoWheel:white_check_mark::white_check_mark:-
neetoWireframe:white_check_mark::white_check_mark:-
3.1.1

3 days ago

3.0.4

12 days ago

3.0.3

17 days ago

3.0.2

23 days ago

3.0.1

1 month ago

3.0.0

2 months ago

2.14.0

2 months ago

2.13.9

2 months ago

2.13.8

2 months ago

2.13.6

2 months ago

2.13.7

2 months ago

2.13.5

2 months ago

2.13.4

3 months ago

2.13.3

3 months ago

2.13.2

3 months ago

2.13.1

3 months ago

2.13.0

3 months ago

2.12.0

3 months ago

2.12.1

3 months ago

2.11.5

3 months ago

2.11.4

3 months ago

2.11.3

3 months ago

2.11.2

4 months ago

2.11.1

4 months ago

2.11.0

4 months ago

2.10.13

4 months ago

2.10.12

4 months ago

2.10.10

4 months ago

2.10.11

4 months ago

2.10.9

5 months ago

2.10.8

5 months ago

2.10.7

5 months ago

2.10.6

5 months ago

2.10.5

5 months ago

2.10.4

5 months ago

2.9.2

6 months ago

2.9.1

6 months ago

2.10.1

6 months ago

2.10.2

6 months ago

2.10.0

6 months ago

2.10.3

6 months ago

2.8.9

10 months ago

2.8.8

10 months ago

2.8.19

8 months ago

2.8.18

8 months ago

2.8.17

8 months ago

2.9.0

7 months ago

2.8.12

10 months ago

2.8.11

10 months ago

2.8.10

10 months ago

2.8.16

8 months ago

2.8.15

9 months ago

2.8.14

9 months ago

2.8.13

9 months ago

2.8.23

7 months ago

2.8.22

7 months ago

2.8.21

8 months ago

2.8.20

8 months ago

2.8.26

7 months ago

2.8.25

7 months ago

2.8.24

7 months ago

2.8.5

11 months ago

2.8.4

11 months ago

2.8.7

11 months ago

2.8.6

11 months ago

2.8.1

12 months ago

2.8.0

12 months ago

2.7.3

12 months ago

2.7.0

1 year ago

2.7.2

1 year ago

2.7.1

1 year ago

2.8.3

11 months ago

2.8.2

12 months ago

2.6.15

1 year ago

2.6.16

1 year ago

2.6.17

1 year ago

2.6.11

1 year ago

2.6.12

1 year ago

2.6.13

1 year ago

2.6.14

1 year ago

2.6.10

1 year ago

2.6.9

1 year ago

2.6.8

1 year ago

2.6.1

1 year ago

2.6.0

1 year ago

2.6.3

1 year ago

2.6.2

1 year ago

2.5.18

1 year ago

2.5.19

1 year ago

2.5.14

1 year ago

2.5.15

1 year ago

2.5.16

1 year ago

2.5.17

1 year ago

2.5.13

1 year ago

2.5.21

1 year ago

2.5.22

1 year ago

2.5.23

1 year ago

2.5.20

1 year ago

2.6.5

1 year ago

2.6.4

1 year ago

2.6.7

1 year ago

2.6.6

1 year ago

2.5.6

1 year ago

2.5.5

1 year ago

2.5.8

1 year ago

2.5.7

1 year ago

2.5.9

1 year ago

2.5.10

1 year ago

2.5.11

1 year ago

2.5.12

1 year ago

2.5.0

1 year ago

2.5.2

1 year ago

2.5.1

1 year ago

2.5.4

1 year ago

2.5.3

1 year ago

2.4.18

1 year ago

2.4.17

1 year ago

2.4.14

1 year ago

2.4.3

2 years ago

2.4.13

1 year ago

2.4.16

1 year ago

2.4.5

2 years ago

2.4.15

1 year ago

2.4.4

2 years ago

2.4.10

2 years ago

2.4.12

1 year ago

2.4.11

1 year ago

2.4.7

2 years ago

2.4.6

2 years ago

2.4.9

2 years ago

2.4.8

2 years ago

2.4.1

2 years ago

2.4.2

2 years ago

2.2.9

2 years ago

2.2.8

2 years ago

2.3.0

2 years ago

2.3.2

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.3.4

2 years ago

2.3.3

2 years ago

2.3.6

2 years ago

2.2.11

2 years ago

2.2.7

2 years ago

2.3.5

2 years ago

2.2.6

2 years ago

2.2.10

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago