Skip to content

Affiliation-extras plugin: add Affiliation Catalogs#6

Draft
duartegalvao wants to merge 38 commits into
indico:masterfrom
duartegalvao:affiliation-schemas
Draft

Affiliation-extras plugin: add Affiliation Catalogs#6
duartegalvao wants to merge 38 commits into
indico:masterfrom
duartegalvao:affiliation-schemas

Conversation

@duartegalvao
Copy link
Copy Markdown
Member

This PR contains a second version of the affiliation-extras plugin.
Changelog:

  • Affiliation Catalogs: events can have set lists of affiliations categorized by type (e.g. Organizations, Institutes, etc.). Each list filters affiliations based on a list of groups, tags and ad-hoc affiliations. Catalogs can be set at category-level and inherited.
  • Representation Field: new field type for registration forms, which requests participants to select a representation type (linked to the event's Affiliation Catalog) before selecting an affiliation.

Depends on:

@duartegalvao duartegalvao force-pushed the affiliation-schemas branch 4 times, most recently from e974458 to 7bcee8e Compare May 12, 2026 18:41
@duartegalvao duartegalvao force-pushed the affiliation-schemas branch from 7bcee8e to cb3c6f2 Compare May 12, 2026 18:46
@duartegalvao duartegalvao force-pushed the affiliation-schemas branch from 3a9c0ea to d3959e6 Compare May 14, 2026 09:17
jbtwist and others added 4 commits May 14, 2026 17:01
* Add invite affiliations tab

Move AffiliationInvitations definition to another file

Improve AddItemsModal UI

Migrate invite dialog to use AffiliationListField

Replaces the regform-endpoint-based AffiliationsTab with AffiliationInvitations,
which delegates affiliation selection to the existing AffiliationListField component.
AddItemsModal is refactored from a generic data-URL modal to an affiliation-specific
search modal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Show user count per affiliation in AddItemsModal search results

Extends the affiliations search API to include user_count per affiliation.
AddItemsModal gains a showInviteCount prop that, when enabled, displays
the registration count per result item and a running total of registrations
for newly added affiliations in the footer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Fix send button to show correct invitation count

Adds a backend endpoint that counts unique users across the selected
affiliations, groups, and tags (deduplicating users who belong to
multiple entries). AffiliationListField fetches this count asynchronously
and stores it in _userCount so the synchronous getCount callback in
AffiliationInvitations can return the accurate value for the send
confirmation dialog.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Improve ui

Self review minor improvements

Turn the results column in a ternary expression

Decouple userCount from AffiliationListField and AddItemsModal

Disable search button if no search input

Change UserBasicSchema for BasicUserSchema

Remove comments

Use resolve_affiliations when necessary

Rename affiliationInvitations

Move AddItemsModal.jsx

Fix rebase problems

Convert AddItemsModal from JS to TS

Remove email attachments comments

Improve CSS for AddItemsModal.tsx

Small refactor

Self review fixes

* Small refactor to follow indico patterns

* Improve tags

* Refactor useEffect and variable names

* Add AddAffiliationsModal scss module

* Add AffiliationListField scss module

* Improve css styles

* Run biomejs

* Fix affiliation invitation schema import

* Fix conditional hook

* Add compatibility shim

* Apply code style improvements

---------

Co-authored-by: Duarte Galvão <duarte.galvao@unconventional.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants