rerobe-js-orm 3.3.8 → 3.4.0
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.
|
@@ -33,7 +33,7 @@ class ProductFromFormState extends ProductFactory_1.default {
|
|
|
33
33
|
editorAuthorizations: props.fields.editorAuthorizations.selectedValue,
|
|
34
34
|
rfidTag: props.fields.rfidTag.inputValue || '',
|
|
35
35
|
sku: props.fields.sku.inputValue || '',
|
|
36
|
-
metaDataDescription: ((_o = props.fields.
|
|
36
|
+
metaDataDescription: ((_o = props.fields.metaDataDescription) === null || _o === void 0 ? void 0 : _o.inputValue) || '',
|
|
37
37
|
metaDataTitle: ((_p = props.fields.metaDataTitle) === null || _p === void 0 ? void 0 : _p.inputValue) || '',
|
|
38
38
|
};
|
|
39
39
|
const productFilterAttributes = {
|
package/lib/models/Product.js
CHANGED
|
@@ -434,7 +434,11 @@ class Product extends Base_1.default {
|
|
|
434
434
|
const singularProductType = this.utilities.singularizeProductType(productType);
|
|
435
435
|
// Function to build the title
|
|
436
436
|
const buildTitle = (includeProductType) => {
|
|
437
|
-
const parts = [color.trim()
|
|
437
|
+
const parts = [color.trim()];
|
|
438
|
+
if (brand.includes('Vintage')) {
|
|
439
|
+
// For 'Vintage' brands, include the brand with the color
|
|
440
|
+
parts.push(brand.trim());
|
|
441
|
+
}
|
|
438
442
|
if (productStyle && productStyle.length > 0) {
|
|
439
443
|
parts.push(productStyle.join(', ').trim());
|
|
440
444
|
}
|
|
@@ -442,7 +446,8 @@ class Product extends Base_1.default {
|
|
|
442
446
|
parts.push(singularProductType.trim());
|
|
443
447
|
}
|
|
444
448
|
const baseTitle = parts.join(' ');
|
|
445
|
-
|
|
449
|
+
// For non-'Vintage' brands, append "by ${brand.trim()}"
|
|
450
|
+
const titleWithBrand = !brand.includes('Vintage') ? `${baseTitle} by ${brand.trim()}` : baseTitle;
|
|
446
451
|
// Add size to the end of the title if it's available
|
|
447
452
|
return size && size.trim() !== '' ? `${titleWithBrand}, Size ${size.trim()}` : titleWithBrand;
|
|
448
453
|
};
|