-
- {group.events.map((event) => {
- const state = genState[event.slug] || 'idle';
- const eventVariants = variants[event.slug] || [];
- const templateStatus = templateStatusBySlug[event.slug] || 'unselected';
- const statusConfig = EVENT_TEMPLATE_STATUS_CONFIG[templateStatus] || EVENT_TEMPLATE_STATUS_CONFIG.unselected;
- const selectedTemplatePreview = selectedTemplateBySlug[event.slug] || null;
- const hasSelectedTemplate = !!selectedTemplatePreview;
- const hasDraftWorkspace = eventVariants.length > 0;
- const canOpenGenerationWorkspace = hasDraftWorkspace;
- const hasExistingWorkspace = hasSelectedTemplate || canOpenGenerationWorkspace;
+
+ {section.events.map((event) => {
+ const state = genState[event.slug] || 'idle';
+ const eventVariants = variants[event.slug] || [];
+ const templateStatus = templateStatusBySlug[event.slug] || 'unselected';
+ const statusConfig = EVENT_TEMPLATE_STATUS_CONFIG[templateStatus] || EVENT_TEMPLATE_STATUS_CONFIG.unselected;
+ const selectedTemplatePreview = selectedTemplateBySlug[event.slug] || null;
+ const hasSelectedTemplate = !!selectedTemplatePreview;
+ const hasDraftWorkspace = eventVariants.length > 0;
+ const canOpenGenerationWorkspace = hasDraftWorkspace;
+ const hasExistingWorkspace = hasSelectedTemplate || canOpenGenerationWorkspace;
- return (
-
-
-
- {event.isDefault ? (
-
- ) : (
-
- )}
-
-
{event.label}
-
-
-
-
-
-
- {statusConfig.label}
-
-
-
+ return (
+
+
+
+ {event.isDefault ? (
+
+ ) : (
+
+ )}
+
+
{event.label}
- );
- })}
+
+
+
+
+ {statusConfig.label}
+
+
+
+
-
- )}
-
- );
- })}
+ );
+ })}
+
+
+ ))}
)}
diff --git a/client/src/pages/Providers.jsx b/client/src/pages/Providers.jsx
index 0bb1072..d97c440 100644
--- a/client/src/pages/Providers.jsx
+++ b/client/src/pages/Providers.jsx
@@ -3,16 +3,6 @@ import { useNavigate, useParams } from 'react-router-dom';
import apiClient from '../api/client';
import { useBusiness } from '../context/BusinessContext';
-const DESKTOP_SPLIT_QUERY = '(min-width: 1100px)';
-const DEFAULT_LIST_PANE_WIDTH = 340;
-const MIN_LIST_PANE_WIDTH = 280;
-const MAX_LIST_PANE_WIDTH = 420;
-const MIN_DETAIL_PANE_WIDTH = 440;
-
-function clamp(value, min, max) {
- return Math.min(Math.max(value, min), max);
-}
-
function getMissingProviderFields(profile) {
const provider = profile?.provider || {};
const missing = [];
@@ -52,10 +42,11 @@ function buildProviderSummary(profile) {
function ProfileStatusPill({ complete }) {
return (
{complete ? 'Complete' : 'Missing Fields'}
@@ -80,9 +71,6 @@ export default function Providers() {
const [error, setError] = useState('');
const [success, setSuccess] = useState('');
const [copiedProfileId, setCopiedProfileId] = useState('');
- const [isDesktopSplit, setIsDesktopSplit] = useState(false);
- const [listPaneWidth, setListPaneWidth] = useState(DEFAULT_LIST_PANE_WIDTH);
- const layoutRef = useRef(null);
const copyTimeoutRef = useRef(null);
const globalSmsPath = `/${businessId}/global-sms`;
@@ -112,21 +100,6 @@ export default function Providers() {
loadProfiles();
}, [loadProfiles]);
- useEffect(() => {
- const mediaQuery = window.matchMedia(DESKTOP_SPLIT_QUERY);
- const syncLayoutMode = (event) => setIsDesktopSplit(event.matches);
-
- setIsDesktopSplit(mediaQuery.matches);
-
- if (typeof mediaQuery.addEventListener === 'function') {
- mediaQuery.addEventListener('change', syncLayoutMode);
- return () => mediaQuery.removeEventListener('change', syncLayoutMode);
- }
-
- mediaQuery.addListener(syncLayoutMode);
- return () => mediaQuery.removeListener(syncLayoutMode);
- }, []);
-
useEffect(() => () => {
if (copyTimeoutRef.current) {
clearTimeout(copyTimeoutRef.current);
@@ -165,37 +138,10 @@ export default function Providers() {
setSuccess('');
}
- function handleResizeStart(event) {
- if (!isDesktopSplit) return;
-
- event.preventDefault();
- const containerBounds = layoutRef.current?.getBoundingClientRect();
- if (!containerBounds) return;
-
- const maxAllowedWidth = clamp(
- containerBounds.width - MIN_DETAIL_PANE_WIDTH,
- MIN_LIST_PANE_WIDTH,
- MAX_LIST_PANE_WIDTH,
- );
-
- function handlePointerMove(moveEvent) {
- const nextWidth = clamp(
- moveEvent.clientX - containerBounds.left,
- MIN_LIST_PANE_WIDTH,
- maxAllowedWidth,
- );
- setListPaneWidth(nextWidth);
- }
-
- function handlePointerUp() {
- document.body.style.userSelect = '';
- window.removeEventListener('mousemove', handlePointerMove);
- window.removeEventListener('mouseup', handlePointerUp);
- }
-
- document.body.style.userSelect = 'none';
- window.addEventListener('mousemove', handlePointerMove);
- window.addEventListener('mouseup', handlePointerUp);
+ function handleReturnToList() {
+ setSelectedProfileId('');
+ setError('');
+ setSuccess('');
}
async function handleActivate(profile) {
@@ -274,19 +220,19 @@ export default function Providers() {
if (loading) {
return (
-
-
+
);
}
return (
-
+
Provider Configuration
- Pick a saved profile to review its complete request and manage the provider details stored against it.
+ Review the provider details stored against each saved cURL profile.