diff --git a/src/app/marketing/_components/ContactsStep.tsx b/src/app/marketing/_components/ContactsStep.tsx index b5da004..eedf84c 100644 --- a/src/app/marketing/_components/ContactsStep.tsx +++ b/src/app/marketing/_components/ContactsStep.tsx @@ -45,14 +45,12 @@ const ContactsStep = forwardRef( label="Description" {...register("description")} name="description" - placeholder="Enter Description" /> @@ -67,7 +65,6 @@ const ContactsStep = forwardRef( label="Field Name" name={`fields.${index}.name`} type="text" - placeholder="Field Name" disabled /> ( label="Label" name={`fields.${index}.label`} type="text" - placeholder="Enter Label" /> ( label="Phone Number" name="phone" type="text" - placeholder="Enter Phone Number" /> diff --git a/src/app/marketing/_components/HeroStep.tsx b/src/app/marketing/_components/HeroStep.tsx index 243b7dd..7df278b 100644 --- a/src/app/marketing/_components/HeroStep.tsx +++ b/src/app/marketing/_components/HeroStep.tsx @@ -61,7 +61,6 @@ const HeroStep = forwardRef(({ initialData }, ref) => { }, })} name="description" - placeholder="Enter Description" /> {errors.description && (

diff --git a/src/app/marketing/_components/MarketingForm.tsx b/src/app/marketing/_components/MarketingForm.tsx index 83dce9d..b3a9ae8 100644 --- a/src/app/marketing/_components/MarketingForm.tsx +++ b/src/app/marketing/_components/MarketingForm.tsx @@ -40,6 +40,7 @@ const MarketingForm = ({ handleStepChange, handleSubmitAll, registerPageType, + watchPageType, pageTypeErrors, isCompany, setValue, @@ -55,106 +56,123 @@ const MarketingForm = ({ <> -

+

Page Configuration

- +
- } - disabled={!isCompany} - required={isCompany} - placeholder="Please select country" - onClear={() => setValue("country", undefined)} - /> - {pageTypeErrors.country && ( -

- {pageTypeErrors.country.message} -

- )} - - {pageTypeErrors.key && ( -

- {pageTypeErrors.key.message} -

- )} +
+ + !isCompany || + (typeof v === "string" && v.length > 0) || + FormErrorMessages.required, + })} + errors={pageTypeErrors} + name="country" + label="Country" + items={Countries} + defaultValue="USA" + value={watchPageType("country")} + clearable + prefixIcon={} + disabled={!isCompany} + required={isCompany} + placeholder={isCompany ? "Please select country" : undefined} + onClear={() => setValue("country", "")} + /> +
+
+ + {pageTypeErrors.key && ( +

+ {pageTypeErrors.key.message} +

+ )} +
diff --git a/src/app/marketing/_components/SectionStep.tsx b/src/app/marketing/_components/SectionStep.tsx index 087794a..f5d59b1 100644 --- a/src/app/marketing/_components/SectionStep.tsx +++ b/src/app/marketing/_components/SectionStep.tsx @@ -71,7 +71,6 @@ const SectionStep = ({ label="Section Description" {...register("description" as Path)} name="description" - placeholder="Enter Section Description" /> ({ {...register(`cards.${index}.description` as Path)} label="Description" name={`cards.${index}.description`} - placeholder="Enter Description" className="sm:col-span-2" />