@open-tender/utils 0.1.169 → 0.1.170
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.
|
@@ -27,11 +27,7 @@ const useOrderItem = (orderItem, favorite = null, allergenAlerts = [], cartCount
|
|
|
27
27
|
const nonSizeGroups = groups.filter(i => !i.isSize);
|
|
28
28
|
const currentOptions = (0, utils_1.getItemOptions)(Object.assign(Object.assign({}, orderItem), { groups: nonSizeGroups }));
|
|
29
29
|
const hasSelections = currentOptions.length > 0;
|
|
30
|
-
const desc = showDesc === '
|
|
31
|
-
? ''
|
|
32
|
-
: showDesc === 'SHORT'
|
|
33
|
-
? shortDescription
|
|
34
|
-
: description;
|
|
30
|
+
const desc = showDesc === 'SHORT' ? shortDescription : description;
|
|
35
31
|
const optionNames = favorite
|
|
36
32
|
? groups
|
|
37
33
|
.reduce((arr, group) => {
|
|
@@ -42,7 +38,7 @@ const useOrderItem = (orderItem, favorite = null, allergenAlerts = [], cartCount
|
|
|
42
38
|
}, [])
|
|
43
39
|
.join(', ')
|
|
44
40
|
: null;
|
|
45
|
-
const displayDesc = optionNames || desc;
|
|
41
|
+
const displayDesc = showDesc === 'HIDE' ? '' : optionNames || desc;
|
|
46
42
|
return Object.assign(Object.assign({}, orderItem), { displayDesc,
|
|
47
43
|
displayTags,
|
|
48
44
|
displayAllergens,
|
|
@@ -24,11 +24,7 @@ export const useOrderItem = (orderItem, favorite = null, allergenAlerts = [], ca
|
|
|
24
24
|
const nonSizeGroups = groups.filter(i => !i.isSize);
|
|
25
25
|
const currentOptions = getItemOptions(Object.assign(Object.assign({}, orderItem), { groups: nonSizeGroups }));
|
|
26
26
|
const hasSelections = currentOptions.length > 0;
|
|
27
|
-
const desc = showDesc === '
|
|
28
|
-
? ''
|
|
29
|
-
: showDesc === 'SHORT'
|
|
30
|
-
? shortDescription
|
|
31
|
-
: description;
|
|
27
|
+
const desc = showDesc === 'SHORT' ? shortDescription : description;
|
|
32
28
|
const optionNames = favorite
|
|
33
29
|
? groups
|
|
34
30
|
.reduce((arr, group) => {
|
|
@@ -39,7 +35,7 @@ export const useOrderItem = (orderItem, favorite = null, allergenAlerts = [], ca
|
|
|
39
35
|
}, [])
|
|
40
36
|
.join(', ')
|
|
41
37
|
: null;
|
|
42
|
-
const displayDesc = optionNames || desc;
|
|
38
|
+
const displayDesc = showDesc === 'HIDE' ? '' : optionNames || desc;
|
|
43
39
|
return Object.assign(Object.assign({}, orderItem), { displayDesc,
|
|
44
40
|
displayTags,
|
|
45
41
|
displayAllergens,
|
package/package.json
CHANGED