@heycater/qualification-funnel 1.19.32 → 1.19.33
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/heycater-funnel.iife.js +466 -466
- package/dist/index.cjs.js +480 -480
- package/dist/index.esm.js +57 -21
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -7170,31 +7170,45 @@ const EVENT_TYPES = [
|
|
|
7170
7170
|
const EVENT_TYPE_MAPPINGS = {
|
|
7171
7171
|
lunch: {
|
|
7172
7172
|
service_type: "meetings_events",
|
|
7173
|
-
catering_category: "business_lunch"
|
|
7173
|
+
catering_category: "business_lunch",
|
|
7174
|
+
occasion_tag: "business-meal",
|
|
7175
|
+
catering_category_tag: "lunch"
|
|
7174
7176
|
},
|
|
7175
7177
|
breakfast: {
|
|
7176
7178
|
service_type: "meetings_events",
|
|
7177
|
-
catering_category: "breakfast"
|
|
7179
|
+
catering_category: "breakfast",
|
|
7180
|
+
occasion_tag: "business-meal",
|
|
7181
|
+
catering_category_tag: "breakfast"
|
|
7178
7182
|
},
|
|
7179
7183
|
party: {
|
|
7180
7184
|
service_type: "meetings_events",
|
|
7181
|
-
catering_category: "buffet"
|
|
7185
|
+
catering_category: "buffet",
|
|
7186
|
+
occasion_tag: "office-party",
|
|
7187
|
+
catering_category_tag: "other"
|
|
7182
7188
|
},
|
|
7183
7189
|
meeting: {
|
|
7184
7190
|
service_type: "meetings_events",
|
|
7185
|
-
catering_category: "fingerfood"
|
|
7191
|
+
catering_category: "fingerfood",
|
|
7192
|
+
occasion_tag: "business-meeting",
|
|
7193
|
+
catering_category_tag: "other"
|
|
7186
7194
|
},
|
|
7187
7195
|
conference: {
|
|
7188
7196
|
service_type: "full_service_event",
|
|
7189
|
-
catering_category: "buffet"
|
|
7197
|
+
catering_category: "buffet",
|
|
7198
|
+
occasion_tag: "conference",
|
|
7199
|
+
catering_category_tag: "other"
|
|
7190
7200
|
},
|
|
7191
7201
|
workshop: {
|
|
7192
7202
|
service_type: "meetings_events",
|
|
7193
|
-
catering_category: "business_lunch"
|
|
7203
|
+
catering_category: "business_lunch",
|
|
7204
|
+
occasion_tag: "team-event",
|
|
7205
|
+
catering_category_tag: "other"
|
|
7194
7206
|
},
|
|
7195
7207
|
other: {
|
|
7196
7208
|
service_type: "meetings_events",
|
|
7197
|
-
catering_category: "other"
|
|
7209
|
+
catering_category: "other",
|
|
7210
|
+
occasion_tag: void 0,
|
|
7211
|
+
catering_category_tag: "other"
|
|
7198
7212
|
}
|
|
7199
7213
|
};
|
|
7200
7214
|
const EVENT_TYPE_ITEMS = [
|
|
@@ -14674,7 +14688,8 @@ const occasionToEventMapping = {
|
|
|
14674
14688
|
other: "Sonstiges"
|
|
14675
14689
|
};
|
|
14676
14690
|
const CLOUD_GROUPS_SLUGS = {
|
|
14677
|
-
CATERING_CATEGORIES: "catering-categories"
|
|
14691
|
+
CATERING_CATEGORIES: "catering-categories",
|
|
14692
|
+
OCCASIONS: "occasions"
|
|
14678
14693
|
};
|
|
14679
14694
|
const prepareGroupTagValues = (groupSlug, selectedValues) => {
|
|
14680
14695
|
return selectedValues.map((value) => {
|
|
@@ -14685,14 +14700,31 @@ const prepareGroupTagValues = (groupSlug, selectedValues) => {
|
|
|
14685
14700
|
});
|
|
14686
14701
|
};
|
|
14687
14702
|
const cloudGroupTagValuesPayload = (payload) => {
|
|
14688
|
-
const { catering_categories } = payload;
|
|
14689
|
-
const
|
|
14690
|
-
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
|
|
14694
|
-
|
|
14695
|
-
|
|
14703
|
+
const { catering_categories, occasion_tag, catering_category_tag } = payload;
|
|
14704
|
+
const tags = [];
|
|
14705
|
+
if (occasion_tag) {
|
|
14706
|
+
tags.push({
|
|
14707
|
+
tagSlug: occasion_tag,
|
|
14708
|
+
groupSlug: CLOUD_GROUPS_SLUGS.OCCASIONS
|
|
14709
|
+
});
|
|
14710
|
+
}
|
|
14711
|
+
if (catering_category_tag && catering_category_tag !== "other") {
|
|
14712
|
+
tags.push({
|
|
14713
|
+
tagSlug: catering_category_tag,
|
|
14714
|
+
groupSlug: CLOUD_GROUPS_SLUGS.CATERING_CATEGORIES
|
|
14715
|
+
});
|
|
14716
|
+
} else {
|
|
14717
|
+
const selectedCateringCategories = catering_categories.filter((value) => value !== "other").map(
|
|
14718
|
+
(cateringCategory) => platformToSalesforceCateringCategoryMapping[cateringCategory]
|
|
14719
|
+
);
|
|
14720
|
+
tags.push(
|
|
14721
|
+
...prepareGroupTagValues(
|
|
14722
|
+
CLOUD_GROUPS_SLUGS.CATERING_CATEGORIES,
|
|
14723
|
+
selectedCateringCategories
|
|
14724
|
+
)
|
|
14725
|
+
);
|
|
14726
|
+
}
|
|
14727
|
+
return tags;
|
|
14696
14728
|
};
|
|
14697
14729
|
function createOpportunityCreationPayload(payload) {
|
|
14698
14730
|
const {
|
|
@@ -26993,6 +27025,8 @@ function useRequestForm() {
|
|
|
26993
27025
|
number_of_vegans: 0,
|
|
26994
27026
|
number_of_vegetarians: 0
|
|
26995
27027
|
} : {};
|
|
27028
|
+
const eventType = answers.event_type;
|
|
27029
|
+
const eventTypeMapping = eventType ? EVENT_TYPE_MAPPINGS[eventType] : void 0;
|
|
26996
27030
|
return {
|
|
26997
27031
|
...answers,
|
|
26998
27032
|
...dietaryDefaults,
|
|
@@ -27009,7 +27043,9 @@ function useRequestForm() {
|
|
|
27009
27043
|
deliveryCountry: values2.deliveryAddressCountry,
|
|
27010
27044
|
lead_language: router.locale,
|
|
27011
27045
|
leadSource,
|
|
27012
|
-
commentByHeycaterForCaterer: values2.comment
|
|
27046
|
+
commentByHeycaterForCaterer: values2.comment,
|
|
27047
|
+
occasion_tag: eventTypeMapping == null ? void 0 : eventTypeMapping.occasion_tag,
|
|
27048
|
+
catering_category_tag: eventTypeMapping == null ? void 0 : eventTypeMapping.catering_category_tag
|
|
27013
27049
|
};
|
|
27014
27050
|
};
|
|
27015
27051
|
const submitAsExistingCustomer = async (values2) => {
|
|
@@ -30558,10 +30594,10 @@ const getIconUrl = (name) => getAssetUrl(`${ICON_BASE_PATH}/${name}.svg`);
|
|
|
30558
30594
|
const EVENT_TYPE_TO_ICON = {
|
|
30559
30595
|
lunch: "business_lunch",
|
|
30560
30596
|
breakfast: "breakfast",
|
|
30561
|
-
party: "
|
|
30562
|
-
meeting: "
|
|
30563
|
-
conference: "
|
|
30564
|
-
workshop: "
|
|
30597
|
+
party: "drinks",
|
|
30598
|
+
meeting: "fingerfood",
|
|
30599
|
+
conference: "buffet",
|
|
30600
|
+
workshop: "street_food",
|
|
30565
30601
|
other: null
|
|
30566
30602
|
};
|
|
30567
30603
|
const EventTypeTiles = ({
|