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
|
@@ -4835,9 +4835,12 @@ const RegistrationFormContent = _ref => {
|
|
|
4835
4835
|
},
|
|
4836
4836
|
errors: []
|
|
4837
4837
|
});
|
|
4838
|
+
const [hasTicketData, setHasTicketData] = (0,external_react_.useState)(false);
|
|
4838
4839
|
const [ticketDataError, setTicketDataError] = (0,external_react_.useState)(false);
|
|
4839
|
-
const [ticketDataLoaded, setTicketDataLoaded] = (0,external_react_.useState)(false);
|
|
4840
4840
|
const [unappliedCodeWarning, setUnappliedCodeWarning] = (0,external_react_.useState)(null);
|
|
4841
|
+
const isAuthenticated = !!profileData;
|
|
4842
|
+
const summitId = summitData?.id;
|
|
4843
|
+
const userId = profileData?.id;
|
|
4841
4844
|
const {
|
|
4842
4845
|
values: formValues,
|
|
4843
4846
|
errors: formErrors
|
|
@@ -4852,12 +4855,12 @@ const RegistrationFormContent = _ref => {
|
|
|
4852
4855
|
publicKey,
|
|
4853
4856
|
provider
|
|
4854
4857
|
} = (0,utils/* getCurrentProvider */.U5)(summitData);
|
|
4855
|
-
const allowedTicketTypes =
|
|
4856
|
-
const noAvailableTickets = (0,external_react_.useMemo)(() =>
|
|
4857
|
-
const alreadyOwnedTickets = (0,external_react_.useMemo)(() =>
|
|
4858
|
+
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]);
|
|
4859
|
+
const noAvailableTickets = (0,external_react_.useMemo)(() => isAuthenticated && hasTicketData && !ticketDataError && allowedTicketTypes.length === 0 && step !== constants.STEP_COMPLETE, [isAuthenticated, hasTicketData, ticketDataError, allowedTicketTypes, step]);
|
|
4860
|
+
const alreadyOwnedTickets = (0,external_react_.useMemo)(() => isAuthenticated && hasTicketData && !ticketDataError && allowedTicketTypes.length > 0 && ownedTickets.length > 0, [isAuthenticated, hasTicketData, ticketDataError, allowedTicketTypes, ownedTickets]);
|
|
4858
4861
|
(0,external_react_.useEffect)(() => {
|
|
4859
4862
|
if (profileData) loadProfileData(profileData);
|
|
4860
|
-
}, [
|
|
4863
|
+
}, [userId]);
|
|
4861
4864
|
(0,external_react_.useEffect)(() => {
|
|
4862
4865
|
loadSession(registration_form_objectSpread(registration_form_objectSpread({}, rest), {}, {
|
|
4863
4866
|
summitData,
|
|
@@ -4869,12 +4872,12 @@ const RegistrationFormContent = _ref => {
|
|
|
4869
4872
|
}
|
|
4870
4873
|
}, []);
|
|
4871
4874
|
(0,external_react_.useEffect)(() => {
|
|
4872
|
-
if (
|
|
4873
|
-
const ensureInvitation = () => summitData.invite_only_registration ? getMyInvitation(
|
|
4875
|
+
if (summitId && isAuthenticated) {
|
|
4876
|
+
const ensureInvitation = () => summitData.invite_only_registration ? getMyInvitation(summitId) : Promise.resolve();
|
|
4874
4877
|
|
|
4875
|
-
ensureInvitation().catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(
|
|
4878
|
+
ensureInvitation().catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(summitId));
|
|
4876
4879
|
}
|
|
4877
|
-
}, [
|
|
4880
|
+
}, [summitId, isAuthenticated]);
|
|
4878
4881
|
(0,external_react_.useEffect)(() => {
|
|
4879
4882
|
if (step > constants.STEP_SELECT_TICKET_TYPE && !registrationForm.values?.ticketType && !reservation) {
|
|
4880
4883
|
changeStep(constants.STEP_SELECT_TICKET_TYPE);
|
|
@@ -4885,10 +4888,10 @@ const RegistrationFormContent = _ref => {
|
|
|
4885
4888
|
}, [step]); // Discovery: fetch qualifying promo codes after auth
|
|
4886
4889
|
|
|
4887
4890
|
(0,external_react_.useEffect)(() => {
|
|
4888
|
-
if (
|
|
4889
|
-
discoverPromoCodes(
|
|
4891
|
+
if (isAuthenticated && summitId) {
|
|
4892
|
+
discoverPromoCodes(summitId);
|
|
4890
4893
|
}
|
|
4891
|
-
}, [
|
|
4894
|
+
}, [isAuthenticated, summitId]);
|
|
4892
4895
|
const handleFormPromoCodeChange = (0,external_react_.useCallback)(code => mergeFormValues({
|
|
4893
4896
|
promoCode: code
|
|
4894
4897
|
}), [mergeFormValues]);
|
|
@@ -4901,7 +4904,7 @@ const RegistrationFormContent = _ref => {
|
|
|
4901
4904
|
removePromoCode,
|
|
4902
4905
|
validatePromoCode,
|
|
4903
4906
|
setFormPromoCode: handleFormPromoCodeChange,
|
|
4904
|
-
ticketDataLoaded:
|
|
4907
|
+
ticketDataLoaded: hasTicketData && !ticketDataError,
|
|
4905
4908
|
hasTickets: allowedTicketTypes.length > 0
|
|
4906
4909
|
}); // Local destructure for readability at call sites.
|
|
4907
4910
|
|
|
@@ -4960,8 +4963,9 @@ const RegistrationFormContent = _ref => {
|
|
|
4960
4963
|
|
|
4961
4964
|
const handleGetTicketTypesAndTaxes = summitId => {
|
|
4962
4965
|
setTicketDataError(false);
|
|
4963
|
-
|
|
4964
|
-
|
|
4966
|
+
getTicketTypesAndTaxes(summitId).then(() => {
|
|
4967
|
+
setHasTicketData(true);
|
|
4968
|
+
}).catch(error => {
|
|
4965
4969
|
let {
|
|
4966
4970
|
message
|
|
4967
4971
|
} = error;
|
|
@@ -4972,8 +4976,6 @@ const RegistrationFormContent = _ref => {
|
|
|
4972
4976
|
}
|
|
4973
4977
|
|
|
4974
4978
|
setTicketDataError(true);
|
|
4975
|
-
}).finally(() => {
|
|
4976
|
-
setTicketDataLoaded(true);
|
|
4977
4979
|
});
|
|
4978
4980
|
};
|
|
4979
4981
|
|
|
@@ -5021,12 +5023,11 @@ const RegistrationFormContent = _ref => {
|
|
|
5021
5023
|
trackEvent(constants.PURCHASE_COMPLETE, {
|
|
5022
5024
|
order
|
|
5023
5025
|
});
|
|
5024
|
-
}; //
|
|
5025
|
-
//
|
|
5026
|
-
// race conditions with redux-persist rehydration.
|
|
5026
|
+
}; // Authenticated first-load: wait until ticket data is in before rendering
|
|
5027
|
+
// to avoid a flash of empty/wrong state.
|
|
5027
5028
|
|
|
5028
5029
|
|
|
5029
|
-
if (
|
|
5030
|
+
if (isAuthenticated && !hasTicketData && !ticketDataError) return null;
|
|
5030
5031
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
5031
5032
|
className: "summit-registration-lite"
|
|
5032
5033
|
}, /*#__PURE__*/external_react_default().createElement((ajaxloader_default()), {
|