MinBZK / amt

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

Add organisations + link people & algorithms to organisations #311

Open anneschuth opened 4 weeks ago

anneschuth commented 4 weeks 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 algorithms 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 algorithms model with a linked field to an organization
  4. For the migration:
    1. Create an organization "Demo AMT"
    2. Link all existing user accounts to the default organization
    3. 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 which will search in the name field
  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"-form

We will also add a search type of field with my active organizations on the algorithm system create form. If we add a new algorithm, the relevant info from the organization will be added to the algorithm system card.

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 4 weeks ago

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

robbertbos commented 2 weeks ago

@anneschuth I think this is a good idea. We have one challenge, and that's what we need to support "one of" the supported IDs. Do you have an idea how we can fix this? See also this comment where they suggest to use not only the OIN number but the URI: https://digilab.overheid.nl/chat/verwerkingenlogging/pl/hxynwcket7biugmb5wx53388wy

anneschuth commented 2 weeks ago

Thanks for the link to that thread! I was hoping we'd get away with OIN but that's clearly not the case. We could go Gideon's route of dealing with URIs (for which there is no convention yet). Or we could choose a data format that would in principle support all types (OIN-RSIN, OIN-KvKnr, RSIN, KvKnr, ...), and still start with just one type of OINs (those that we get from their API, for instance) and expand when needed.

That dataformat could be something like this:

"org-identifiers": [
  {"type": "OIN-RSIN", "id": "00000002003214394003"}
]

This would mean we'd have to adapt our system cards here: https://github.com/MinBZK/ai-validation/blob/main/docs/projects/amt/reporting-standard/0.1a10.md?plain=1#L90

robbertbos commented 2 weeks ago

@anneschuth I guess that would mean that in the create form, we give a dropdown with the available types, and on the right side we add a text field where you can add the ID. Is that correct?

robbertbos commented 2 weeks ago

Because it requires some additional work on the system card, I propose making this a separate ticket. @anneschuth do you agree?

anneschuth commented 2 weeks ago

I'd start with a simpler setup where you'd have a single dropdown (with search) field that just searches in OINs, similar to the search here: https://oinregister.logius.nl/oin-register. Fine with a separate ticket of course!