first wokring prototype
This commit is contained in:
22
src/features/campaigns/wizard/steps/AttachmentsStep.tsx
Normal file
22
src/features/campaigns/wizard/steps/AttachmentsStep.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import FormField from "../../../../components/FormField";
|
||||
import Button from "../../../../components/Button";
|
||||
import AttachmentRuleCard from "../../components/AttachmentRuleCard";
|
||||
|
||||
export default function AttachmentsStep() {
|
||||
return (
|
||||
<div>
|
||||
<div className="step-intro">
|
||||
<h2>Attachments</h2>
|
||||
<p>Configure the campaign base path and one or more attachment matching rules.</p>
|
||||
</div>
|
||||
<FormField label="Campaign attachment base path">
|
||||
<input placeholder="./data/attachments" />
|
||||
</FormField>
|
||||
<AttachmentRuleCard />
|
||||
<div className="button-row">
|
||||
<Button>Add attachment rule</Button>
|
||||
<Button variant="primary">Resolve attachments</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
24
src/features/campaigns/wizard/steps/BasicsStep.tsx
Normal file
24
src/features/campaigns/wizard/steps/BasicsStep.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import FormField from "../../../../components/FormField";
|
||||
|
||||
export default function BasicsStep() {
|
||||
return (
|
||||
<div className="form-grid">
|
||||
<FormField label="Campaign name" help="A human-readable name shown in lists and reports.">
|
||||
<input placeholder="Rechnungslegung 2026-05" />
|
||||
</FormField>
|
||||
<FormField label="Campaign ID" help="Stable technical identifier.">
|
||||
<input placeholder="rechnungslegung-2026-05" />
|
||||
</FormField>
|
||||
<FormField label="Scenario">
|
||||
<select>
|
||||
<option>Personalized documents with attachments</option>
|
||||
<option>Simple bulk message</option>
|
||||
<option>Recurring monthly campaign</option>
|
||||
</select>
|
||||
</FormField>
|
||||
<FormField label="Description">
|
||||
<textarea rows={5} placeholder="Describe the purpose of this campaign…" />
|
||||
</FormField>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
18
src/features/campaigns/wizard/steps/FieldsStep.tsx
Normal file
18
src/features/campaigns/wizard/steps/FieldsStep.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import FieldMappingTable from "../../components/FieldMappingTable";
|
||||
import Button from "../../../../components/Button";
|
||||
|
||||
export default function FieldsStep() {
|
||||
return (
|
||||
<div>
|
||||
<div className="step-intro">
|
||||
<h2>Campaign fields</h2>
|
||||
<p>Define reusable fields for templates, attachment rules, ZIP passwords and recipient data.</p>
|
||||
</div>
|
||||
<div className="button-row">
|
||||
<Button variant="primary">Add field wizard</Button>
|
||||
<Button>Add manually</Button>
|
||||
</div>
|
||||
<FieldMappingTable />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
29
src/features/campaigns/wizard/steps/RecipientsStep.tsx
Normal file
29
src/features/campaigns/wizard/steps/RecipientsStep.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import FieldMappingTable from "../../components/FieldMappingTable";
|
||||
import Button from "../../../../components/Button";
|
||||
import FormField from "../../../../components/FormField";
|
||||
|
||||
export default function RecipientsStep() {
|
||||
return (
|
||||
<div>
|
||||
<div className="step-intro">
|
||||
<h2>Recipients</h2>
|
||||
<p>Upload or reference a recipient source, then map source columns to campaign fields.</p>
|
||||
</div>
|
||||
<div className="form-grid compact">
|
||||
<FormField label="Source type">
|
||||
<select>
|
||||
<option>CSV file</option>
|
||||
<option>Inline recipients</option>
|
||||
<option>JSON file</option>
|
||||
</select>
|
||||
</FormField>
|
||||
<FormField label="Source path"><input placeholder="./data/recipients.csv" /></FormField>
|
||||
</div>
|
||||
<div className="button-row">
|
||||
<Button>Preview source</Button>
|
||||
<Button variant="primary">Auto-map columns</Button>
|
||||
</div>
|
||||
<FieldMappingTable />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
19
src/features/campaigns/wizard/steps/ReviewStep.tsx
Normal file
19
src/features/campaigns/wizard/steps/ReviewStep.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import MetricCard from "../../../../components/MetricCard";
|
||||
import Button from "../../../../components/Button";
|
||||
|
||||
export default function ReviewStep() {
|
||||
return (
|
||||
<div>
|
||||
<div className="step-intro">
|
||||
<h2>Review setup</h2>
|
||||
<p>Validate the campaign definition before building message drafts.</p>
|
||||
</div>
|
||||
<div className="metric-grid inside">
|
||||
<MetricCard label="Ready" value="—" tone="good" />
|
||||
<MetricCard label="Warnings" value="—" tone="warning" />
|
||||
<MetricCard label="Needs review" value="—" tone="info" />
|
||||
</div>
|
||||
<Button variant="primary">Validate campaign</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
22
src/features/campaigns/wizard/steps/SendStep.tsx
Normal file
22
src/features/campaigns/wizard/steps/SendStep.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import FormField from "../../../../components/FormField";
|
||||
import Button from "../../../../components/Button";
|
||||
|
||||
export default function SendStep() {
|
||||
return (
|
||||
<div>
|
||||
<div className="step-intro">
|
||||
<h2>Send preparation</h2>
|
||||
<p>Configure rate limits and prepare the final send workflow.</p>
|
||||
</div>
|
||||
<div className="form-grid compact">
|
||||
<FormField label="Messages per minute"><input type="number" defaultValue={5} min={1} /></FormField>
|
||||
<FormField label="Concurrency"><input type="number" defaultValue={1} min={1} /></FormField>
|
||||
</div>
|
||||
<div className="button-row">
|
||||
<Button>Send test</Button>
|
||||
<Button>Queue dry run</Button>
|
||||
<Button variant="primary">Open Send Wizard</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
18
src/features/campaigns/wizard/steps/SenderStep.tsx
Normal file
18
src/features/campaigns/wizard/steps/SenderStep.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import FormField from "../../../../components/FormField";
|
||||
|
||||
export default function SenderStep() {
|
||||
return (
|
||||
<div className="form-grid">
|
||||
<FormField label="From name"><input placeholder="Office" /></FormField>
|
||||
<FormField label="From email"><input placeholder="office@example.org" /></FormField>
|
||||
<FormField label="Reply-To"><input placeholder="reply@example.org" /></FormField>
|
||||
<FormField label="IMAP append to Sent">
|
||||
<select>
|
||||
<option>Enabled, auto-detect Sent folder</option>
|
||||
<option>Disabled</option>
|
||||
<option>Enabled, manual folder</option>
|
||||
</select>
|
||||
</FormField>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
21
src/features/campaigns/wizard/steps/TemplateStep.tsx
Normal file
21
src/features/campaigns/wizard/steps/TemplateStep.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import FormField from "../../../../components/FormField";
|
||||
import Button from "../../../../components/Button";
|
||||
|
||||
export default function TemplateStep() {
|
||||
return (
|
||||
<div>
|
||||
<div className="step-intro">
|
||||
<h2>Template</h2>
|
||||
<p>Compose the subject and body. Merge fields can be inserted from the field picker.</p>
|
||||
</div>
|
||||
<div className="button-row">
|
||||
<Button>Insert merge field</Button>
|
||||
<Button>Preview recipient</Button>
|
||||
</div>
|
||||
<div className="form-grid">
|
||||
<FormField label="Subject"><input placeholder="Ihre Unterlagen für ${global::monthyear}" /></FormField>
|
||||
<FormField label="Plain text body"><textarea rows={12} placeholder="Sehr geehrte/r ${local::name}, …" /></FormField>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user