@axos-web-dev/shared-components 0.0.52 → 0.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,5 +6,7 @@ export type ApplicationStartInputs = {
|
|
|
6
6
|
email: string;
|
|
7
7
|
phone: string;
|
|
8
8
|
checkbox__c: string;
|
|
9
|
+
Send_SMS__c: boolean;
|
|
10
|
+
DoNotCall: boolean;
|
|
9
11
|
};
|
|
10
12
|
export declare const ApplicationStart: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -57,7 +57,7 @@ const ApplicationStart = ({
|
|
|
57
57
|
}
|
|
58
58
|
return removeDashes;
|
|
59
59
|
}),
|
|
60
|
-
checkbox__c: z.boolean()
|
|
60
|
+
checkbox__c: z.boolean()
|
|
61
61
|
});
|
|
62
62
|
const methods = useForm({
|
|
63
63
|
resolver: zodResolver(schema.merge(SalesforceSchema), {
|
|
@@ -74,7 +74,12 @@ const ApplicationStart = ({
|
|
|
74
74
|
formState: { errors, isValid, isSubmitting }
|
|
75
75
|
} = methods;
|
|
76
76
|
const submitForm = async (data) => {
|
|
77
|
-
|
|
77
|
+
const processData = {
|
|
78
|
+
...data,
|
|
79
|
+
Send_SMS__c: data.checkbox__c ? true : false,
|
|
80
|
+
DoNotCall: data.checkbox__c ? false : true
|
|
81
|
+
};
|
|
82
|
+
await onSubmit(processData);
|
|
78
83
|
};
|
|
79
84
|
const variant = getVariant(fullVariant);
|
|
80
85
|
return /* @__PURE__ */ jsx(
|
|
@@ -155,12 +160,8 @@ const ApplicationStart = ({
|
|
|
155
160
|
Checkbox,
|
|
156
161
|
{
|
|
157
162
|
id: "checkbox__c",
|
|
158
|
-
...register("checkbox__c",
|
|
159
|
-
required: true,
|
|
160
|
-
maxLength: 12
|
|
161
|
-
}),
|
|
163
|
+
...register("checkbox__c"),
|
|
162
164
|
sizes: "medium",
|
|
163
|
-
required: true,
|
|
164
165
|
error: !!errors.checkbox__c,
|
|
165
166
|
helperText: errors.checkbox__c?.message,
|
|
166
167
|
variant,
|