Skip to content

Commit

Permalink
Merge branch '354-generic-resource-list' of github.com:beda-software/…
Browse files Browse the repository at this point in the history
…fhir-emr into update-app-layout
  • Loading branch information
vesnushka committed Dec 5, 2024
2 parents b1b0390 + e2f9537 commit 332c15d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/uberComponents/ResourceListPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ import { SearchBarColumn } from '../../components/SearchBar/types';

type RecordType<R extends Resource> = { resource: R; bundle: Bundle };

interface ActionManager {
reload: () => void;
}

interface ResourceListPageProps<R extends Resource> {
/* Page header title (for example, Organizations) */
headerTitle: string;
Expand Down Expand Up @@ -65,6 +69,7 @@ interface ResourceListPageProps<R extends Resource> {
*/
getRecordActions?: (
record: RecordType<R>,
manager: ActionManager,
) => Array<QuestionnaireActionType | NavigationActionType | CustomActionType>;

/**
Expand Down Expand Up @@ -219,6 +224,7 @@ function getRecordActionsColumn<R extends Resource>({
}: {
getRecordActions: (
record: RecordType<R>,
manager: ActionManager,
) => Array<QuestionnaireActionType | NavigationActionType | CustomActionType>;
defaultLaunchContext?: ParametersParameter[];
reload: () => void;
Expand All @@ -230,7 +236,7 @@ function getRecordActionsColumn<R extends Resource>({
render: (_text: any, record: { resource: R; bundle: Bundle }) => {
return (
<Row wrap={false}>
{getRecordActions(record).map((action, index) => (
{getRecordActions(record, { reload }).map((action, index) => (
<Col key={index}>
{isQuestionnaireAction(action) ? (
<RecordQuestionnaireAction
Expand Down

0 comments on commit 332c15d

Please sign in to comment.