fix(dashboard): campaign fixes (#9082)
**What** - fix campaign dropdown placeholder - fix create campaign broken modal ---  --- FIXES CC-112
This commit is contained in:
1 parent
3593bdfebe
commit
3e7d4ddcd5
3 files changed
+23
-2
No files matched your search
@@ -1714,7 +1714,11 @@
|
|||||||
"campaign": {
|
"campaign": {
|
||||||
"existing": {
|
"existing": {
|
||||||
"title": "Existing Campaign",
|
"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": {
|
"new": {
|
||||||
"title": "New Campaign",
|
"title": "New Campaign",
|
||||||
|
|||||||
+4
-1
@@ -78,7 +78,10 @@ export const CreateCampaignForm = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<RouteFocusModal.Form form={form}>
|
<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.Header />
|
||||||
<RouteFocusModal.Body className="flex size-full flex-col items-center overflow-auto py-16">
|
<RouteFocusModal.Body className="flex size-full flex-col items-center overflow-auto py-16">
|
||||||
<CreateCampaignFormFields form={form} />
|
<CreateCampaignFormFields form={form} />
|
||||||
|
|||||||
+14
@@ -110,6 +110,20 @@ export const AddCampaignPromotionFields = ({
|
|||||||
</Select.Trigger>
|
</Select.Trigger>
|
||||||
|
|
||||||
<Select.Content>
|
<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) => (
|
{campaigns.map((c) => (
|
||||||
<Select.Item key={c.id} value={c.id}>
|
<Select.Item key={c.id} value={c.id}>
|
||||||
{c.name?.toUpperCase()}
|
{c.name?.toUpperCase()}
|
||||||
|
|||||||
Reference in new issue
Block a user