summit-registration-lite 7.0.2 → 7.0.3
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.
- package/dist/components/index.js +22 -21
- package/dist/components/index.js.map +1 -1
- package/dist/components/registration-form.js +22 -21
- package/dist/components/registration-form.js.map +1 -1
- package/dist/components/registration-modal.js +22 -21
- package/dist/components/registration-modal.js.map +1 -1
- package/dist/index.js +22 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/.claude/rules/summit-registration-lite-component-props.md +0 -95
- package/.claude/rules/summit-registration-lite-i18n.md +0 -62
- package/.claude/rules/summit-registration-lite-payment-providers.md +0 -69
- package/.claude/rules/summit-registration-lite-project.md +0 -80
- package/.claude/rules/summit-registration-lite-redux-actions.md +0 -65
- package/.claude/rules/summit-registration-lite-step-flow.md +0 -77
- package/.claude/rules/summit-registration-lite-testing.md +0 -97
- package/.claude/rules/summit-registration-lite-utils.md +0 -71
- package/.claude/skills/summit-registration-lite-add-provider/SKILL.md +0 -155
- package/.claude/skills/summit-registration-lite-dev-setup/SKILL.md +0 -67
- package/.claude/skills/summit-registration-lite-publish/SKILL.md +0 -64
- package/.claude/skills/summit-registration-lite-scaffold-component/SKILL.md +0 -152
- package/.codegraph/config.json +0 -141
|
@@ -3864,9 +3864,12 @@ const RegistrationFormContent = _ref => {
|
|
|
3864
3864
|
},
|
|
3865
3865
|
errors: []
|
|
3866
3866
|
});
|
|
3867
|
+
const [hasTicketData, setHasTicketData] = (0,external_react_.useState)(false);
|
|
3867
3868
|
const [ticketDataError, setTicketDataError] = (0,external_react_.useState)(false);
|
|
3868
|
-
const [ticketDataLoaded, setTicketDataLoaded] = (0,external_react_.useState)(false);
|
|
3869
3869
|
const [unappliedCodeWarning, setUnappliedCodeWarning] = (0,external_react_.useState)(null);
|
|
3870
|
+
const isAuthenticated = !!profileData;
|
|
3871
|
+
const summitId = summitData?.id;
|
|
3872
|
+
const userId = profileData?.id;
|
|
3870
3873
|
const {
|
|
3871
3874
|
values: formValues,
|
|
3872
3875
|
errors: formErrors
|
|
@@ -3881,12 +3884,12 @@ const RegistrationFormContent = _ref => {
|
|
|
3881
3884
|
publicKey,
|
|
3882
3885
|
provider
|
|
3883
3886
|
} = (0,utils/* getCurrentProvider */.U5)(summitData);
|
|
3884
|
-
const allowedTicketTypes =
|
|
3885
|
-
const noAvailableTickets = (0,external_react_.useMemo)(() =>
|
|
3886
|
-
const alreadyOwnedTickets = (0,external_react_.useMemo)(() =>
|
|
3887
|
+
const allowedTicketTypes = (0,external_react_.useMemo)(() => hasTicketData ? ticketTypes.filter(tt => tt.sub_type === constants.TICKET_TYPE_SUBTYPE_PREPAID || tt.sales_start_date === null && tt.sales_end_date === null || nowUtc >= tt.sales_start_date && nowUtc <= tt.sales_end_date) : [], [hasTicketData, ticketTypes, nowUtc]);
|
|
3888
|
+
const noAvailableTickets = (0,external_react_.useMemo)(() => isAuthenticated && hasTicketData && !ticketDataError && allowedTicketTypes.length === 0 && step !== constants.STEP_COMPLETE, [isAuthenticated, hasTicketData, ticketDataError, allowedTicketTypes, step]);
|
|
3889
|
+
const alreadyOwnedTickets = (0,external_react_.useMemo)(() => isAuthenticated && hasTicketData && !ticketDataError && allowedTicketTypes.length > 0 && ownedTickets.length > 0, [isAuthenticated, hasTicketData, ticketDataError, allowedTicketTypes, ownedTickets]);
|
|
3887
3890
|
(0,external_react_.useEffect)(() => {
|
|
3888
3891
|
if (profileData) loadProfileData(profileData);
|
|
3889
|
-
}, [
|
|
3892
|
+
}, [userId]);
|
|
3890
3893
|
(0,external_react_.useEffect)(() => {
|
|
3891
3894
|
loadSession(registration_form_objectSpread(registration_form_objectSpread({}, rest), {}, {
|
|
3892
3895
|
summitData,
|
|
@@ -3898,12 +3901,12 @@ const RegistrationFormContent = _ref => {
|
|
|
3898
3901
|
}
|
|
3899
3902
|
}, []);
|
|
3900
3903
|
(0,external_react_.useEffect)(() => {
|
|
3901
|
-
if (
|
|
3902
|
-
const ensureInvitation = () => summitData.invite_only_registration ? getMyInvitation(
|
|
3904
|
+
if (summitId && isAuthenticated) {
|
|
3905
|
+
const ensureInvitation = () => summitData.invite_only_registration ? getMyInvitation(summitId) : Promise.resolve();
|
|
3903
3906
|
|
|
3904
|
-
ensureInvitation().catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(
|
|
3907
|
+
ensureInvitation().catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(summitId));
|
|
3905
3908
|
}
|
|
3906
|
-
}, [
|
|
3909
|
+
}, [summitId, isAuthenticated]);
|
|
3907
3910
|
(0,external_react_.useEffect)(() => {
|
|
3908
3911
|
if (step > constants.STEP_SELECT_TICKET_TYPE && !registrationForm.values?.ticketType && !reservation) {
|
|
3909
3912
|
changeStep(constants.STEP_SELECT_TICKET_TYPE);
|
|
@@ -3914,10 +3917,10 @@ const RegistrationFormContent = _ref => {
|
|
|
3914
3917
|
}, [step]); // Discovery: fetch qualifying promo codes after auth
|
|
3915
3918
|
|
|
3916
3919
|
(0,external_react_.useEffect)(() => {
|
|
3917
|
-
if (
|
|
3918
|
-
discoverPromoCodes(
|
|
3920
|
+
if (isAuthenticated && summitId) {
|
|
3921
|
+
discoverPromoCodes(summitId);
|
|
3919
3922
|
}
|
|
3920
|
-
}, [
|
|
3923
|
+
}, [isAuthenticated, summitId]);
|
|
3921
3924
|
const handleFormPromoCodeChange = (0,external_react_.useCallback)(code => mergeFormValues({
|
|
3922
3925
|
promoCode: code
|
|
3923
3926
|
}), [mergeFormValues]);
|
|
@@ -3930,7 +3933,7 @@ const RegistrationFormContent = _ref => {
|
|
|
3930
3933
|
removePromoCode,
|
|
3931
3934
|
validatePromoCode,
|
|
3932
3935
|
setFormPromoCode: handleFormPromoCodeChange,
|
|
3933
|
-
ticketDataLoaded:
|
|
3936
|
+
ticketDataLoaded: hasTicketData && !ticketDataError,
|
|
3934
3937
|
hasTickets: allowedTicketTypes.length > 0
|
|
3935
3938
|
}); // Local destructure for readability at call sites.
|
|
3936
3939
|
|
|
@@ -3989,8 +3992,9 @@ const RegistrationFormContent = _ref => {
|
|
|
3989
3992
|
|
|
3990
3993
|
const handleGetTicketTypesAndTaxes = summitId => {
|
|
3991
3994
|
setTicketDataError(false);
|
|
3992
|
-
|
|
3993
|
-
|
|
3995
|
+
getTicketTypesAndTaxes(summitId).then(() => {
|
|
3996
|
+
setHasTicketData(true);
|
|
3997
|
+
}).catch(error => {
|
|
3994
3998
|
let {
|
|
3995
3999
|
message
|
|
3996
4000
|
} = error;
|
|
@@ -4001,8 +4005,6 @@ const RegistrationFormContent = _ref => {
|
|
|
4001
4005
|
}
|
|
4002
4006
|
|
|
4003
4007
|
setTicketDataError(true);
|
|
4004
|
-
}).finally(() => {
|
|
4005
|
-
setTicketDataLoaded(true);
|
|
4006
4008
|
});
|
|
4007
4009
|
};
|
|
4008
4010
|
|
|
@@ -4050,12 +4052,11 @@ const RegistrationFormContent = _ref => {
|
|
|
4050
4052
|
trackEvent(constants.PURCHASE_COMPLETE, {
|
|
4051
4053
|
order
|
|
4052
4054
|
});
|
|
4053
|
-
}; //
|
|
4054
|
-
//
|
|
4055
|
-
// race conditions with redux-persist rehydration.
|
|
4055
|
+
}; // Authenticated first-load: wait until ticket data is in before rendering
|
|
4056
|
+
// to avoid a flash of empty/wrong state.
|
|
4056
4057
|
|
|
4057
4058
|
|
|
4058
|
-
if (
|
|
4059
|
+
if (isAuthenticated && !hasTicketData && !ticketDataError) return null;
|
|
4059
4060
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
4060
4061
|
className: "summit-registration-lite"
|
|
4061
4062
|
}, /*#__PURE__*/external_react_default().createElement((ajaxloader_default()), {
|