Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Add ResourceList component. Refs #354 #384

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

ruscoder
Copy link
Member

I created a basic implementation that is named as ResourceList

It accepts:

  • title - the page title
  • resourceType
  • searchParams - default searchParams
  • searchBarColumns - where id of the column is used as search param key
  • tableColumns - andt Table columns
  • getRecordActions - function that accepts table records and returns actions for record
    • QuestionnaireAction
    • NavigationAction
    • CustomAction
  • getHeaderColumns - function that accepts nothing and returns actions for Header
    • QuestionnaireAction
  • getBatchColumns - function that accepts nothing and returns actions for selected items
    • QuestionnaireAction

The table record is presented as {resource: R, bundle: Bundle}.
The QuestionnaireAction is generic action that accepts title of the button/link and questionnaire id. The launch context is:

  • for Header - no
  • for Batch - List
  • for Record - ResourceType (for Patient it will be Patient)

@ruscoder ruscoder requested review from ir4y and vesnushka November 25, 2024 19:34
@ruscoder
Copy link
Member Author

Example of the PatientList rewritten using ResourceTable - src/containers/PatientResourceListExample/index.tsx.

@ruscoder
Copy link
Member Author

@ir4y @vesnushka, it turns out that the List does not contain the resources themselves; it is just a reference. But it makes sense to pass whole resources, so I've replaced it with a bundle.
It's similar to the record questionnaires where we have a whole Resource.

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.

4 participants