fix(dashboard): campaign fixes (#9082)
**What** - fix campaign dropdown placeholder - fix create campaign broken modal ---  --- FIXES CC-112
This commit is contained in:
@@ -1714,7 +1714,11 @@
|
||||
"campaign": {
|
||||
"existing": {
|
||||
"title": "Existing Campaign",
|
||||
"description": "Add promotion to an existing campaign."
|
||||
"description": "Add promotion to an existing campaign.",
|
||||
"placeholder": {
|
||||
"title": "No existing campaigns",
|
||||
"desc": "You can create one to track multiple promotions and set budget limits."
|
||||
}
|
||||
},
|
||||
"new": {
|
||||
"title": "New Campaign",
|
||||
|
||||
@@ -78,7 +78,10 @@ export const CreateCampaignForm = () => {
|
||||
|
||||
return (
|
||||
<RouteFocusModal.Form form={form}>
|
||||
<form onSubmit={handleSubmit} className="flex flex-col overflow-hidden">
|
||||
<form
|
||||
onSubmit={handleSubmit}
|
||||
className="flex size-full flex-col overflow-hidden"
|
||||
>
|
||||
<RouteFocusModal.Header />
|
||||
<RouteFocusModal.Body className="flex size-full flex-col items-center overflow-auto py-16">
|
||||
<CreateCampaignFormFields form={form} />
|
||||
|
||||
@@ -110,6 +110,20 @@ export const AddCampaignPromotionFields = ({
|
||||
</Select.Trigger>
|
||||
|
||||
<Select.Content>
|
||||
{!campaigns.length && (
|
||||
<div className="flex h-[120px] flex-col items-center justify-center gap-2 p-2">
|
||||
<span className="txt-small text-ui-fg-subtle font-medium">
|
||||
{t(
|
||||
"promotions.form.campaign.existing.placeholder.title"
|
||||
)}
|
||||
</span>
|
||||
<span className="txt-small text-ui-fg-muted">
|
||||
{t(
|
||||
"promotions.form.campaign.existing.placeholder.desc"
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{campaigns.map((c) => (
|
||||
<Select.Item key={c.id} value={c.id}>
|
||||
{c.name?.toUpperCase()}
|
||||
|
||||
Reference in New Issue
Block a user