refactor: unified maint modal with pre-step support, OTP-gated campaign clear

- Extended MaintAction with needsPreStep + clientSideHandler
- MaintOtpModal supports pre-step content before OTP (campaign selection)
- Removed standalone ClearCampaignLeadsModal — all maint actions go through one modal
- 4-step import wizard with Untitled UI Select for mapping
- DynamicTable className passthrough

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 14:24:44 +05:30
parent 0295790c9a
commit 33fedf7082
5 changed files with 156 additions and 166 deletions

View File

@@ -4,6 +4,8 @@ export type MaintAction = {
endpoint: string;
label: string;
description: string;
needsPreStep?: boolean;
clientSideHandler?: (payload: any) => Promise<{ status: string; message: string }>;
};
const MAINT_ACTIONS: Record<string, MaintAction> = {
@@ -28,9 +30,10 @@ const MAINT_ACTIONS: Record<string, MaintAction> = {
description: 'Correct call timestamps that were stored with IST double-offset.',
},
clearCampaignLeads: {
endpoint: '__client__clear-campaign-leads',
endpoint: 'clear-campaign-leads',
label: 'Clear Campaign Leads',
description: 'Delete all imported leads from a selected campaign. For testing only.',
needsPreStep: true,
},
};