MinBZK / amt

Algorithm Management Toolkit (AMT)
European Union Public License 1.2
1 stars 0 forks source link

Add organisations + link people & projects to organisations #311

Open anneschuth opened 2 days ago

anneschuth commented 2 days ago

This is the first part of a series of tasks where we start implementing features related to organizations, teams, and roles related to working on algorithm systems and permissions that roles can have. In this first part, we introduce organizations in AMT.

We will:

  1. Create a new model containing information about organizations. Initially, we will create this model with the fields:
    1. uuid
    2. name
    3. slug (unique value)
    4. created_by
    5. created_at
    6. modified_at
    7. deleted_at
  2. Create a model where we link user accounts (people) to organizations
  3. Extend algorithm-system model with a linked field to an organization
  4. For the migration:
    • Create an organization "Demo AMT"
    • Link all existing user accounts to the default organization
    • Link all existing algorithm systems to the default organization

Organization overview

Inspired by the overview of algorithm systems, we will also introduce an overview of organizations. The route for this is /organizations/ Image

On this overview you can:

  1. Search for organizations
  2. Filter on "All organizations" (default) or "My organizations" (which means organizations you are linked to)
  3. Create a new organization (route /organizations/new)
  4. See a table of active organizations (deleted_at is null) with the following columns and if you click on a row the organization page (see below) will open. The table contains the following info:
    1. Organization name
    2. People (f.e. avatar of first five people and a "+ xx more" avatar to show how many people are linked to the organzation)
    3. Last modified

Create a new organization form

A form to created a new organization with the following fields:

  1. Name (required)
  2. Slug (required, and ideally pre-filled after entering the name)
  3. People (default the user account that opens the form, but with the option to add more (active) accounts)

For the people part, it would be nice if we could have a type of field where you can "just start typing" and where a list of matching accounts appears. In this field, you can select multiple people. An example: Image

Change create a new algorithm system form

We will also add a search type of field with my active organizations on the algorithm system create form.

Change algorithm system info section

Add a row to the algorithm system info section table that shows the organization. This field can be edited. In that case, a "search drop-down field" will show the list of "my active organizations."

Organization page

To decide: route for an organization. F.e. /{slug}/ or /organization/{slug}. I would prefer the first, but it will mean we should block some slugs.

Image

On the organization page you will find two tabs:

  1. Info
  2. Algorithm systems
  3. People

On the info section the following info is found:

  1. Name (editable)
  2. Slug (editable)
  3. UUID
  4. Created by
  5. Created at
  6. Modified at
  7. Number of algorithm systems
  8. People (with the first 5 avatars and a + more counter)

On the algorithm systems tab, the same table as on algorithm systems, but in this case, the table is filtered by the organization. It will also be possible to create a new algorithm system from this tab, in that scenario the organziation field on the form is already set to this organization.

On the people tab we will have:

  1. Search people
  2. Add more people
  3. A table/list of avatar + account name of people linked to the organization

When we click on add more, we open a modal where you can search for active accounts that can be linked to the organization. On the modal you get the search type of field + buttons "cancel" & "add people".

Out of scope

  1. Roles and permissions are out of scope. We assume every person linked to an organization has "all" the permissions.
  2. Inviting people. We assume that everyone we want to link to an organization already have a user account in AMT
anneschuth commented 2 days ago

@robbertbos should we also have an https://oinregister.logius.nl/oin-register field?