+
+
+ Create MP Selection
+
+
+ Select contacts below, choose a target page, and save them as a named
+ Selection in Ministry Platform.
+
+
+
+ {/* Contact list */}
+
+
+
+ Contacts
+
+
+
+ {/* Header row */}
+
+
+ Contact ID
+ Name
+ Email
+
+
+ {loading ? (
+
+ Loading contacts...
+
+ ) : contacts.length === 0 ? (
+
+ No contacts found.
+
+ ) : (
+ contacts.map((contact, i) => (
+ toggleId(contact.contactId)}
+ >
+ toggleId(contact.contactId)}
+ aria-label={`Select ${contact.name}`}
+ onClick={(e) => e.stopPropagation()}
+ />
+
+ {contact.contactId}
+
+ {contact.name}
+
+ {contact.email}
+
+
+ ))
+ )}
+
+
+
+ {/* Action bar */}
+
+
+ {selectedIds.size === 0
+ ? "Select records above to enable the button"
+ : `${selectedIds.size} contact${selectedIds.size !== 1 ? "s" : ""} selected → ${recordIdsForPage.length} record ID${recordIdsForPage.length !== 1 ? "s" : ""} for selection`}
+
+
+ setLastResult(
+ `Selection #${result.selectionId} created — ${result.selectionUrl}`
+ )
+ }
+ />
+
+
+ {/* Success feedback */}
+ {lastResult && (
+
+ Last result:
+ {lastResult}
+
+ )}
+
+ );
+}
diff --git a/src/app/(web)/page.tsx b/src/app/(web)/page.tsx
index 96a5fa2..2945b9c 100644
--- a/src/app/(web)/page.tsx
+++ b/src/app/(web)/page.tsx
@@ -38,6 +38,20 @@ export default function Home() {
+
+