diff --git a/i18n/en.pot b/i18n/en.pot index 832ecd33b3..72621600da 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-10-22T14:40:35.028Z\n" -"PO-Revision-Date: 2024-10-22T14:40:35.028Z\n" +"POT-Creation-Date: 2024-10-28T13:13:50.133Z\n" +"PO-Revision-Date: 2024-10-28T13:13:50.133Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -1690,6 +1690,9 @@ msgstr[1] "{{count}} enrollments already marked as completed will not be changed msgid "Mark all events within enrollments as complete" msgstr "Mark all events within enrollments as complete" +msgid "You do not have access to bulk complete enrollments" +msgstr "You do not have access to bulk complete enrollments" + msgid "Complete enrollments" msgstr "Complete enrollments" @@ -1710,6 +1713,9 @@ msgstr "An error occurred when completing the enrollments" msgid "An unknown error occurred when completing enrollments" msgstr "An unknown error occurred when completing enrollments" +msgid "You do not have access to delete enrollments" +msgstr "You do not have access to delete enrollments" + msgid "Delete enrollments" msgstr "Delete enrollments" diff --git a/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/Actions/CompleteAction/CompleteAction.js b/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/Actions/CompleteAction/CompleteAction.js index 37046030ad..73543ad15a 100644 --- a/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/Actions/CompleteAction/CompleteAction.js +++ b/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/Actions/CompleteAction/CompleteAction.js @@ -23,6 +23,7 @@ type Props = { selectedRows: { [id: string]: any }, programId: string, stages: Map, + programDataWriteAccess: boolean, onUpdateList: (disableClearSelections?: boolean) => void, removeRowsFromSelection: (rows: Array) => void, }; @@ -50,6 +51,7 @@ const CompleteActionPlain = ({ selectedRows, programId, stages, + programDataWriteAccess, onUpdateList, removeRowsFromSelection, classes, @@ -170,12 +172,18 @@ const CompleteActionPlain = ({ return ( <> - + + {modalIsOpen && ( void, } @@ -17,6 +17,7 @@ const CASCADE_DELETE_TEI_AUTHORITY = 'F_ENROLLMENT_CASCADE_DELETE'; export const DeleteEnrollmentsAction = ({ selectedRows, + programDataWriteAccess, programId, onUpdateList, }: Props) => { @@ -29,12 +30,18 @@ export const DeleteEnrollmentsAction = ({ return ( <> - + + {isDeleteDialogOpen && ( diff --git a/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/TrackedEntityBulkActions.container.js b/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/TrackedEntityBulkActions.container.js index 4c7e61233a..3cd769eb56 100644 --- a/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/TrackedEntityBulkActions.container.js +++ b/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/TrackedEntityBulkActions.container.js @@ -6,7 +6,13 @@ import { TrackedEntityBulkActionsComponent } from './TrackedEntityBulkActions.co import type { ContainerProps } from './TrackedEntityBulkActions.types'; import { errorCreator } from '../../../../../capture-core-utils'; -export const TrackedEntityBulkActions = ({ programStageId, stages, programId, ...passOnProps }: ContainerProps) => { +export const TrackedEntityBulkActions = ({ + programStageId, + stages, + programDataWriteAccess, + programId, + ...passOnProps +}: ContainerProps) => { if (programStageId) { const stage = stages.get(programStageId); @@ -27,6 +33,7 @@ export const TrackedEntityBulkActions = ({ programStageId, stages, programId, .. ); diff --git a/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/TrackedEntityBulkActions.types.js b/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/TrackedEntityBulkActions.types.js index afd970090c..37f18324fa 100644 --- a/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/TrackedEntityBulkActions.types.js +++ b/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/TrackedEntityBulkActions/TrackedEntityBulkActions.types.js @@ -6,6 +6,7 @@ export type Props = {| programId: string, stages: Map, onClearSelection: () => void, + programDataWriteAccess: boolean, onUpdateList: () => void, removeRowsFromSelection: (rows: Array) => void, |} diff --git a/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/ViewMenuSetup/TrackerWorkingListsViewMenuSetup.component.js b/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/ViewMenuSetup/TrackerWorkingListsViewMenuSetup.component.js index da69b3a100..ca74b7a97c 100644 --- a/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/ViewMenuSetup/TrackerWorkingListsViewMenuSetup.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/TeiWorkingLists/ViewMenuSetup/TrackerWorkingListsViewMenuSetup.component.js @@ -111,6 +111,7 @@ export const TrackerWorkingListsViewMenuSetup = ({ const TrackedEntityBulkActionsComponent = useMemo(() => (