rerobe-js-orm 3.3.7 → 3.3.9

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.
@@ -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(), brand.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
- const titleWithBrand = brand.includes('Vintage') ? baseTitle : `${baseTitle} by ${brand.trim()}`;
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
  };
@@ -457,7 +462,7 @@ class Product extends Base_1.default {
457
462
  autoCreateDescriptionHTML(t = (str) => str, additionalSections = [], currency = 'SEK', locale = 'sv-SE') {
458
463
  var _a;
459
464
  const { compareAtPrice } = this.attributes;
460
- const { color, productCategory, productType, productStyle, condition, gender } = this.filterAttributes;
465
+ const { color, productCategory, productType, productStyle, condition, gender, size } = this.filterAttributes;
461
466
  const { productRemarks, conditionRemarks, purchasePrice, yearPurchased, sizeComment, majorDefects, minorDefects } = this.consignmentAttributes;
462
467
  const measurements = this.measurementsJoinedString(this.filterAttributes.measurements);
463
468
  const materials = this.materialCompJoinedString();
@@ -481,6 +486,7 @@ class Product extends Base_1.default {
481
486
  {
482
487
  title: 'Product Details',
483
488
  attributes: [
489
+ size && `${t('Size')}: ${t(size)}`,
484
490
  gender && `${t('Primary segment')}: ${t(gender)}`,
485
491
  productCategory && `${t('Category')}: ${t(productCategory)}`,
486
492
  productType && `${t('Type')}: ${t(productType)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.3.7",
3
+ "version": "3.3.9",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",