@nuskin/cs-product-lib 1.4.6 → 1.4.7-mdigi-10714.2
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/package.json +1 -1
- package/src/formatProduct.js +3 -1
- package/src/formatVariant.js +3 -1
- package/src/helpers.js +13 -1
package/package.json
CHANGED
package/src/formatProduct.js
CHANGED
|
@@ -77,7 +77,9 @@ const formatProduct = (parent, homeUrl, status) => {
|
|
|
77
77
|
relevancyRank: parent?.relevancy_rank || null,
|
|
78
78
|
warranty: helpers?.mapWarranty(parent),
|
|
79
79
|
upSellProductIds: helpers?.mapUpSellProductIds(parent),
|
|
80
|
-
crossProductIds: helpers?.mapCrossProductIds(parent)
|
|
80
|
+
crossProductIds: helpers?.mapCrossProductIds(parent),
|
|
81
|
+
availabilityDate: helpers?.mapAvailabilityDate(parent),
|
|
82
|
+
startDate: helpers?.mapStartDate(parent)
|
|
81
83
|
}
|
|
82
84
|
if (parent.bundle || (parent.sku_kit && parent.sku_kit.length > 0) || (parent.product_bundle && parent.product_bundle.length > 0)) {
|
|
83
85
|
return formatKit(formattedProduct, null, status)
|
package/src/formatVariant.js
CHANGED
|
@@ -119,7 +119,9 @@ const formatVariant = (parent) => {
|
|
|
119
119
|
foreignLimit: helpers?.getBestSkuData(parent)?.foreign_limit,
|
|
120
120
|
foreignOrderLimit: helpers?.getBestSkuData(parent)?.foreign_limit,
|
|
121
121
|
orderType: parent.sap_data?.order_type,
|
|
122
|
-
discontinuedSkuReplacement: helpers?.mapDiscontinuedSkuReplacement(parent)?.sku
|
|
122
|
+
discontinuedSkuReplacement: helpers?.mapDiscontinuedSkuReplacement(parent)?.sku,
|
|
123
|
+
availabilityDate: helpers?.mapAvailabilityDate(parent),
|
|
124
|
+
startDate: helpers?.mapStartDate(parent)
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
|
package/src/helpers.js
CHANGED
|
@@ -1179,6 +1179,16 @@ function mapDiscontinuedSkuReplacement (product) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
|
+
function mapAvailabilityDate(product){
|
|
1183
|
+
const availabilityDate = product?.availability_date;
|
|
1184
|
+
return availabilityDate
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
function mapStartDate(product){
|
|
1188
|
+
const startDate = product?.start_date;
|
|
1189
|
+
return startDate
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1182
1192
|
module.exports = {
|
|
1183
1193
|
mapBrandStyle,
|
|
1184
1194
|
mapWarranty,
|
|
@@ -1225,5 +1235,7 @@ module.exports = {
|
|
|
1225
1235
|
benefitsToMarkdown,
|
|
1226
1236
|
mapActiveEventDisclaimer,
|
|
1227
1237
|
isTopCategory,
|
|
1228
|
-
mapDiscontinuedSkuReplacement
|
|
1238
|
+
mapDiscontinuedSkuReplacement,
|
|
1239
|
+
mapAvailabilityDate,
|
|
1240
|
+
mapStartDate
|
|
1229
1241
|
}
|