@open-tender/utils 0.4.47 → 0.4.49
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,6 +6,7 @@ export declare const useSignUpGuestForm: (email: string, guest: CheckoutFormCust
|
|
|
6
6
|
fields: import("@open-tender/types").FormFieldType[];
|
|
7
7
|
notificationFields: import("./useSignUpForm").NotificationCheckbox[];
|
|
8
8
|
data: CustomerCreate;
|
|
9
|
+
comms: NotificationChannel[];
|
|
9
10
|
errors: Record<string, string>;
|
|
10
11
|
disabled: boolean;
|
|
11
12
|
guestDisabled: boolean;
|
|
@@ -83,7 +83,7 @@ const useSignUpGuestForm = (email, guest, loading, error, guestErrors, signUp, s
|
|
|
83
83
|
if (!disabled) {
|
|
84
84
|
setErrors({});
|
|
85
85
|
setSubmitting(true);
|
|
86
|
-
const values = Object.assign(Object.assign({}, data), { email });
|
|
86
|
+
const values = Object.assign(Object.assign({}, data), { email, communications: comms });
|
|
87
87
|
if (values.birth_date) {
|
|
88
88
|
values.birth_date = (0, utils_1.slashesToDashes)(values.birth_date);
|
|
89
89
|
}
|
|
@@ -132,6 +132,7 @@ const useSignUpGuestForm = (email, guest, loading, error, guestErrors, signUp, s
|
|
|
132
132
|
fields,
|
|
133
133
|
notificationFields,
|
|
134
134
|
data,
|
|
135
|
+
comms,
|
|
135
136
|
errors,
|
|
136
137
|
disabled,
|
|
137
138
|
guestDisabled,
|
|
@@ -6,6 +6,7 @@ export declare const useSignUpGuestForm: (email: string, guest: CheckoutFormCust
|
|
|
6
6
|
fields: import("@open-tender/types").FormFieldType[];
|
|
7
7
|
notificationFields: import("./useSignUpForm").NotificationCheckbox[];
|
|
8
8
|
data: CustomerCreate;
|
|
9
|
+
comms: NotificationChannel[];
|
|
9
10
|
errors: Record<string, string>;
|
|
10
11
|
disabled: boolean;
|
|
11
12
|
guestDisabled: boolean;
|
|
@@ -80,7 +80,7 @@ export const useSignUpGuestForm = (email, guest, loading, error, guestErrors, si
|
|
|
80
80
|
if (!disabled) {
|
|
81
81
|
setErrors({});
|
|
82
82
|
setSubmitting(true);
|
|
83
|
-
const values = Object.assign(Object.assign({}, data), { email });
|
|
83
|
+
const values = Object.assign(Object.assign({}, data), { email, communications: comms });
|
|
84
84
|
if (values.birth_date) {
|
|
85
85
|
values.birth_date = slashesToDashes(values.birth_date);
|
|
86
86
|
}
|
|
@@ -129,6 +129,7 @@ export const useSignUpGuestForm = (email, guest, loading, error, guestErrors, si
|
|
|
129
129
|
fields,
|
|
130
130
|
notificationFields,
|
|
131
131
|
data,
|
|
132
|
+
comms,
|
|
132
133
|
errors,
|
|
133
134
|
disabled,
|
|
134
135
|
guestDisabled,
|
package/package.json
CHANGED