feat: add Create Selection tool for building MP selections#53
Open
wantmoore wants to merge 7 commits intoMinistryPlatform-Community:mainfrom
Open
feat: add Create Selection tool for building MP selections#53wantmoore wants to merge 7 commits intoMinistryPlatform-Community:mainfrom
wantmoore wants to merge 7 commits intoMinistryPlatform-Community:mainfrom
Conversation
… filtered record sets Adds a reusable component that POSTs filtered record IDs to MinistryPlatform as a permanent named selection (dp_Selections + dp_Selected_Records) and returns a deep-link URL for opening the selection directly in the MP web app. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a reusable dialog component that saves record IDs as named MP Selections via custom stored procedures, replacing direct dp_* table access which is blocked by API permissions. Key changes: - CreateMpSelection component with page picker, auto-timestamped names, copy-to-clipboard, and deep-link to MP - SelectionService using api_custom_CreateSelection and api_custom_GetPages stored procedures - Demo page at /create-mp-selection with contact list and page mapping - HttpClient POST error handling now includes response body - New env vars: MINISTRY_PLATFORM_DOMAIN_ID, updated NEXT_PUBLIC_MINISTRY_PLATFORM_URL docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document the new CreateMpSelection component, its usage, required stored procedures (api_custom_CreateSelection, api_custom_GetPages), environment variables, and demo page in the project README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Create Selection to sidebar navigation, include stored procedure SQL install scripts, and document installation steps in README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update selectionService tests to mock executeProcedureWithBody instead of createTableRecords (matching the stored procedure implementation) - Add missing text() mock to http-client error response test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SelectionServicewith full test coverage, DTO layer, and server actionsapi_Custom_CreateSelection,api_custom_GetPages)New Files
src/components/create-mp-selection/— feature componentsrc/app/(web)/create-mp-selection/— page route and actionssrc/services/selectionService.ts— service layer with testssrc/lib/dto/selections.ts— selection DTOsscripts/— SQL stored procedure install scriptsPrerequisites
The following stored procedures must be installed in the Ministry Platform database before using this feature:
api_Custom_CreateSelectionapi_custom_GetPagesInstall scripts are provided in
scripts/and are self-contained (create procedure, register indp_API_Procedures, grant permissions).Test Plan
npm run test:run)npm run build)🤖 Generated with Claude Code