rerobe-js-orm 3.0.30 → 3.0.32
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.
|
@@ -40,276 +40,34 @@ export namespace MEASUREMENT_CATEGORY {
|
|
|
40
40
|
const Eyewear: string;
|
|
41
41
|
const GeneralItems: string;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} | {
|
|
75
|
-
lensWidth: string;
|
|
76
|
-
bridgeWidth: string;
|
|
77
|
-
templeLength: string;
|
|
78
|
-
width?: undefined;
|
|
79
|
-
height?: undefined;
|
|
80
|
-
depth?: undefined;
|
|
81
|
-
handLength?: undefined;
|
|
82
|
-
handCircumference?: undefined;
|
|
83
|
-
fingerLength?: undefined;
|
|
84
|
-
headCircumference?: undefined;
|
|
85
|
-
brimWidth?: undefined;
|
|
86
|
-
crownHeight?: undefined;
|
|
87
|
-
bustCircumference?: undefined;
|
|
88
|
-
waistCircumference?: undefined;
|
|
89
|
-
hipCircumference?: undefined;
|
|
90
|
-
length?: undefined;
|
|
91
|
-
shoulderWidth?: undefined;
|
|
92
|
-
sleeveLength?: undefined;
|
|
93
|
-
footLength?: undefined;
|
|
94
|
-
footWidth?: undefined;
|
|
95
|
-
heelHeight?: undefined;
|
|
96
|
-
shaftHeight?: undefined;
|
|
97
|
-
calfCircumference?: undefined;
|
|
98
|
-
chestCircumference?: undefined;
|
|
99
|
-
neckCircumference?: undefined;
|
|
100
|
-
collarLength?: undefined;
|
|
101
|
-
innerLeg?: undefined;
|
|
102
|
-
outerLeg?: undefined;
|
|
103
|
-
footCircumference?: undefined;
|
|
104
|
-
} | {
|
|
105
|
-
handLength: string;
|
|
106
|
-
handCircumference: string;
|
|
107
|
-
fingerLength: string;
|
|
108
|
-
width?: undefined;
|
|
109
|
-
height?: undefined;
|
|
110
|
-
depth?: undefined;
|
|
111
|
-
lensWidth?: undefined;
|
|
112
|
-
bridgeWidth?: undefined;
|
|
113
|
-
templeLength?: undefined;
|
|
114
|
-
headCircumference?: undefined;
|
|
115
|
-
brimWidth?: undefined;
|
|
116
|
-
crownHeight?: undefined;
|
|
117
|
-
bustCircumference?: undefined;
|
|
118
|
-
waistCircumference?: undefined;
|
|
119
|
-
hipCircumference?: undefined;
|
|
120
|
-
length?: undefined;
|
|
121
|
-
shoulderWidth?: undefined;
|
|
122
|
-
sleeveLength?: undefined;
|
|
123
|
-
footLength?: undefined;
|
|
124
|
-
footWidth?: undefined;
|
|
125
|
-
heelHeight?: undefined;
|
|
126
|
-
shaftHeight?: undefined;
|
|
127
|
-
calfCircumference?: undefined;
|
|
128
|
-
chestCircumference?: undefined;
|
|
129
|
-
neckCircumference?: undefined;
|
|
130
|
-
collarLength?: undefined;
|
|
131
|
-
innerLeg?: undefined;
|
|
132
|
-
outerLeg?: undefined;
|
|
133
|
-
footCircumference?: undefined;
|
|
134
|
-
} | {
|
|
135
|
-
headCircumference: string;
|
|
136
|
-
brimWidth: string;
|
|
137
|
-
crownHeight: string;
|
|
138
|
-
width?: undefined;
|
|
139
|
-
height?: undefined;
|
|
140
|
-
depth?: undefined;
|
|
141
|
-
lensWidth?: undefined;
|
|
142
|
-
bridgeWidth?: undefined;
|
|
143
|
-
templeLength?: undefined;
|
|
144
|
-
handLength?: undefined;
|
|
145
|
-
handCircumference?: undefined;
|
|
146
|
-
fingerLength?: undefined;
|
|
147
|
-
bustCircumference?: undefined;
|
|
148
|
-
waistCircumference?: undefined;
|
|
149
|
-
hipCircumference?: undefined;
|
|
150
|
-
length?: undefined;
|
|
151
|
-
shoulderWidth?: undefined;
|
|
152
|
-
sleeveLength?: undefined;
|
|
153
|
-
footLength?: undefined;
|
|
154
|
-
footWidth?: undefined;
|
|
155
|
-
heelHeight?: undefined;
|
|
156
|
-
shaftHeight?: undefined;
|
|
157
|
-
calfCircumference?: undefined;
|
|
158
|
-
chestCircumference?: undefined;
|
|
159
|
-
neckCircumference?: undefined;
|
|
160
|
-
collarLength?: undefined;
|
|
161
|
-
innerLeg?: undefined;
|
|
162
|
-
outerLeg?: undefined;
|
|
163
|
-
footCircumference?: undefined;
|
|
164
|
-
} | {
|
|
165
|
-
bustCircumference: string;
|
|
166
|
-
waistCircumference: string;
|
|
167
|
-
hipCircumference: string;
|
|
168
|
-
length: string;
|
|
169
|
-
shoulderWidth: string;
|
|
170
|
-
sleeveLength: string;
|
|
171
|
-
width?: undefined;
|
|
172
|
-
height?: undefined;
|
|
173
|
-
depth?: undefined;
|
|
174
|
-
lensWidth?: undefined;
|
|
175
|
-
bridgeWidth?: undefined;
|
|
176
|
-
templeLength?: undefined;
|
|
177
|
-
handLength?: undefined;
|
|
178
|
-
handCircumference?: undefined;
|
|
179
|
-
fingerLength?: undefined;
|
|
180
|
-
headCircumference?: undefined;
|
|
181
|
-
brimWidth?: undefined;
|
|
182
|
-
crownHeight?: undefined;
|
|
183
|
-
footLength?: undefined;
|
|
184
|
-
footWidth?: undefined;
|
|
185
|
-
heelHeight?: undefined;
|
|
186
|
-
shaftHeight?: undefined;
|
|
187
|
-
calfCircumference?: undefined;
|
|
188
|
-
chestCircumference?: undefined;
|
|
189
|
-
neckCircumference?: undefined;
|
|
190
|
-
collarLength?: undefined;
|
|
191
|
-
innerLeg?: undefined;
|
|
192
|
-
outerLeg?: undefined;
|
|
193
|
-
footCircumference?: undefined;
|
|
194
|
-
} | {
|
|
195
|
-
footLength: string;
|
|
196
|
-
footWidth: string;
|
|
197
|
-
heelHeight: string;
|
|
198
|
-
shaftHeight: string;
|
|
199
|
-
calfCircumference: string;
|
|
200
|
-
width?: undefined;
|
|
201
|
-
height?: undefined;
|
|
202
|
-
depth?: undefined;
|
|
203
|
-
lensWidth?: undefined;
|
|
204
|
-
bridgeWidth?: undefined;
|
|
205
|
-
templeLength?: undefined;
|
|
206
|
-
handLength?: undefined;
|
|
207
|
-
handCircumference?: undefined;
|
|
208
|
-
fingerLength?: undefined;
|
|
209
|
-
headCircumference?: undefined;
|
|
210
|
-
brimWidth?: undefined;
|
|
211
|
-
crownHeight?: undefined;
|
|
212
|
-
bustCircumference?: undefined;
|
|
213
|
-
waistCircumference?: undefined;
|
|
214
|
-
hipCircumference?: undefined;
|
|
215
|
-
length?: undefined;
|
|
216
|
-
shoulderWidth?: undefined;
|
|
217
|
-
sleeveLength?: undefined;
|
|
218
|
-
chestCircumference?: undefined;
|
|
219
|
-
neckCircumference?: undefined;
|
|
220
|
-
collarLength?: undefined;
|
|
221
|
-
innerLeg?: undefined;
|
|
222
|
-
outerLeg?: undefined;
|
|
223
|
-
footCircumference?: undefined;
|
|
224
|
-
} | {
|
|
225
|
-
chestCircumference: string;
|
|
226
|
-
waistCircumference: string;
|
|
227
|
-
length: string;
|
|
228
|
-
shoulderWidth: string;
|
|
229
|
-
sleeveLength: string;
|
|
230
|
-
width?: undefined;
|
|
231
|
-
height?: undefined;
|
|
232
|
-
depth?: undefined;
|
|
233
|
-
lensWidth?: undefined;
|
|
234
|
-
bridgeWidth?: undefined;
|
|
235
|
-
templeLength?: undefined;
|
|
236
|
-
handLength?: undefined;
|
|
237
|
-
handCircumference?: undefined;
|
|
238
|
-
fingerLength?: undefined;
|
|
239
|
-
headCircumference?: undefined;
|
|
240
|
-
brimWidth?: undefined;
|
|
241
|
-
crownHeight?: undefined;
|
|
242
|
-
bustCircumference?: undefined;
|
|
243
|
-
hipCircumference?: undefined;
|
|
244
|
-
footLength?: undefined;
|
|
245
|
-
footWidth?: undefined;
|
|
246
|
-
heelHeight?: undefined;
|
|
247
|
-
shaftHeight?: undefined;
|
|
248
|
-
calfCircumference?: undefined;
|
|
249
|
-
neckCircumference?: undefined;
|
|
250
|
-
collarLength?: undefined;
|
|
251
|
-
innerLeg?: undefined;
|
|
252
|
-
outerLeg?: undefined;
|
|
253
|
-
footCircumference?: undefined;
|
|
254
|
-
} | {
|
|
255
|
-
neckCircumference: string;
|
|
256
|
-
collarLength: string;
|
|
257
|
-
sleeveLength: string;
|
|
258
|
-
chestCircumference: string;
|
|
259
|
-
width?: undefined;
|
|
260
|
-
height?: undefined;
|
|
261
|
-
depth?: undefined;
|
|
262
|
-
lensWidth?: undefined;
|
|
263
|
-
bridgeWidth?: undefined;
|
|
264
|
-
templeLength?: undefined;
|
|
265
|
-
handLength?: undefined;
|
|
266
|
-
handCircumference?: undefined;
|
|
267
|
-
fingerLength?: undefined;
|
|
268
|
-
headCircumference?: undefined;
|
|
269
|
-
brimWidth?: undefined;
|
|
270
|
-
crownHeight?: undefined;
|
|
271
|
-
bustCircumference?: undefined;
|
|
272
|
-
waistCircumference?: undefined;
|
|
273
|
-
hipCircumference?: undefined;
|
|
274
|
-
length?: undefined;
|
|
275
|
-
shoulderWidth?: undefined;
|
|
276
|
-
footLength?: undefined;
|
|
277
|
-
footWidth?: undefined;
|
|
278
|
-
heelHeight?: undefined;
|
|
279
|
-
shaftHeight?: undefined;
|
|
280
|
-
calfCircumference?: undefined;
|
|
281
|
-
innerLeg?: undefined;
|
|
282
|
-
outerLeg?: undefined;
|
|
283
|
-
footCircumference?: undefined;
|
|
284
|
-
} | {
|
|
285
|
-
waistCircumference: string;
|
|
286
|
-
innerLeg: string;
|
|
287
|
-
outerLeg: string;
|
|
288
|
-
footCircumference: string;
|
|
289
|
-
width?: undefined;
|
|
290
|
-
height?: undefined;
|
|
291
|
-
depth?: undefined;
|
|
292
|
-
lensWidth?: undefined;
|
|
293
|
-
bridgeWidth?: undefined;
|
|
294
|
-
templeLength?: undefined;
|
|
295
|
-
handLength?: undefined;
|
|
296
|
-
handCircumference?: undefined;
|
|
297
|
-
fingerLength?: undefined;
|
|
298
|
-
headCircumference?: undefined;
|
|
299
|
-
brimWidth?: undefined;
|
|
300
|
-
crownHeight?: undefined;
|
|
301
|
-
bustCircumference?: undefined;
|
|
302
|
-
hipCircumference?: undefined;
|
|
303
|
-
length?: undefined;
|
|
304
|
-
shoulderWidth?: undefined;
|
|
305
|
-
sleeveLength?: undefined;
|
|
306
|
-
footLength?: undefined;
|
|
307
|
-
footWidth?: undefined;
|
|
308
|
-
heelHeight?: undefined;
|
|
309
|
-
shaftHeight?: undefined;
|
|
310
|
-
calfCircumference?: undefined;
|
|
311
|
-
chestCircumference?: undefined;
|
|
312
|
-
neckCircumference?: undefined;
|
|
313
|
-
collarLength?: undefined;
|
|
314
|
-
};
|
|
315
|
-
};
|
|
43
|
+
export namespace MEASUREMENT_FIELDS_DICT {
|
|
44
|
+
const length: string;
|
|
45
|
+
const width: string;
|
|
46
|
+
const height: string;
|
|
47
|
+
const depth: string;
|
|
48
|
+
const lensWidth: string;
|
|
49
|
+
const bridgeWidth: string;
|
|
50
|
+
const templeLength: string;
|
|
51
|
+
const handLength: string;
|
|
52
|
+
const handCircumference: string;
|
|
53
|
+
const fingerLength: string;
|
|
54
|
+
const headCircumference: string;
|
|
55
|
+
const brimWidth: string;
|
|
56
|
+
const crownHeight: string;
|
|
57
|
+
const bustCircumference: string;
|
|
58
|
+
const waistCircumference: string;
|
|
59
|
+
const hipCircumference: string;
|
|
60
|
+
const shoulderWidth: string;
|
|
61
|
+
const sleeveLength: string;
|
|
62
|
+
const footLength: string;
|
|
63
|
+
const footWidth: string;
|
|
64
|
+
const heelHeight: string;
|
|
65
|
+
const shaftHeight: string;
|
|
66
|
+
const calfCircumference: string;
|
|
67
|
+
const chestCircumference: string;
|
|
68
|
+
const neckCircumference: string;
|
|
69
|
+
const collarLength: string;
|
|
70
|
+
const innerLeg: string;
|
|
71
|
+
const outerLeg: string;
|
|
72
|
+
const footCircumference: string;
|
|
73
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MEASUREMENT_FIELDS_DICT = exports.MEASUREMENT_CATEGORY = exports.PRODUCT_STATES = void 0;
|
|
4
4
|
exports.PRODUCT_STATES = {
|
|
5
5
|
archived: 'ARCHIVED',
|
|
6
6
|
sellRequestReview: 'SELL_REQUEST_REVIEW',
|
|
@@ -43,71 +43,35 @@ exports.MEASUREMENT_CATEGORY = {
|
|
|
43
43
|
Eyewear: 'Eyewear',
|
|
44
44
|
GeneralItems: 'General Items',
|
|
45
45
|
};
|
|
46
|
-
exports.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
shoulderWidth: 'Shoulder Width',
|
|
78
|
-
sleeveLength: 'Sleeve Length',
|
|
79
|
-
},
|
|
80
|
-
[exports.MEASUREMENT_CATEGORY.Shoes]: {
|
|
81
|
-
footLength: 'Foot Length',
|
|
82
|
-
footWidth: 'Foot Width',
|
|
83
|
-
heelHeight: 'Heel Height',
|
|
84
|
-
shaftHeight: 'Shaft Height',
|
|
85
|
-
calfCircumference: 'Calf Circumference',
|
|
86
|
-
},
|
|
87
|
-
[exports.MEASUREMENT_CATEGORY.Coats]: {
|
|
88
|
-
chestCircumference: 'Chest Circumference',
|
|
89
|
-
waistCircumference: 'Waist Circumference',
|
|
90
|
-
length: 'Length',
|
|
91
|
-
shoulderWidth: 'Shoulder Width',
|
|
92
|
-
sleeveLength: 'Sleeve Length',
|
|
93
|
-
},
|
|
94
|
-
[exports.MEASUREMENT_CATEGORY.Shirts]: {
|
|
95
|
-
neckCircumference: 'Neck Circumference',
|
|
96
|
-
collarLength: 'Collar Length',
|
|
97
|
-
sleeveLength: 'Sleeve Length',
|
|
98
|
-
chestCircumference: 'Chest Circumference',
|
|
99
|
-
},
|
|
100
|
-
[exports.MEASUREMENT_CATEGORY.Bottoms]: {
|
|
101
|
-
waistCircumference: 'Waist Circumference',
|
|
102
|
-
innerLeg: 'Inner Leg',
|
|
103
|
-
outerLeg: 'Outer Leg',
|
|
104
|
-
footCircumference: 'Foot Circumference',
|
|
105
|
-
},
|
|
106
|
-
[exports.MEASUREMENT_CATEGORY.SuitsNBlazers]: {
|
|
107
|
-
chestCircumference: 'Chest Circumference',
|
|
108
|
-
waistCircumference: 'Waist Circumference',
|
|
109
|
-
length: 'Length',
|
|
110
|
-
shoulderWidth: 'Shoulder Width',
|
|
111
|
-
sleeveLength: 'Sleeve Length',
|
|
112
|
-
},
|
|
46
|
+
exports.MEASUREMENT_FIELDS_DICT = {
|
|
47
|
+
length: 'Length',
|
|
48
|
+
width: 'Width',
|
|
49
|
+
height: 'Height',
|
|
50
|
+
depth: 'Depth',
|
|
51
|
+
lensWidth: 'Lens Width',
|
|
52
|
+
bridgeWidth: 'Bridge Width',
|
|
53
|
+
templeLength: 'Temple Width',
|
|
54
|
+
handLength: 'Hand Length',
|
|
55
|
+
handCircumference: 'Hand Circumference',
|
|
56
|
+
fingerLength: 'Finger Length',
|
|
57
|
+
headCircumference: 'Head Circumference',
|
|
58
|
+
brimWidth: 'Brim Width',
|
|
59
|
+
crownHeight: 'Crown Height',
|
|
60
|
+
bustCircumference: 'Bust Circumference',
|
|
61
|
+
waistCircumference: 'Waist Circumference',
|
|
62
|
+
hipCircumference: 'Hip Circumference',
|
|
63
|
+
shoulderWidth: 'Shoulder Width',
|
|
64
|
+
sleeveLength: 'Sleeve Length',
|
|
65
|
+
footLength: 'Foot Length',
|
|
66
|
+
footWidth: 'Foot Width',
|
|
67
|
+
heelHeight: 'Heel Height',
|
|
68
|
+
shaftHeight: 'Shaft Height',
|
|
69
|
+
calfCircumference: 'Calf Circumference',
|
|
70
|
+
chestCircumference: 'Chest Circumference',
|
|
71
|
+
neckCircumference: 'Neck Circumference',
|
|
72
|
+
collarLength: 'Collar Length',
|
|
73
|
+
innerLeg: 'Inner Leg',
|
|
74
|
+
outerLeg: 'Outer Leg',
|
|
75
|
+
footCircumference: 'Foot Circumference',
|
|
76
|
+
sleeveLength: 'Sleeve Length',
|
|
113
77
|
};
|
|
@@ -9,7 +9,7 @@ export default class ReRobeProductHelpers {
|
|
|
9
9
|
static buildReRobeEarnings(arrayLike: CompleteProduct | CompleteProduct[]): number[];
|
|
10
10
|
static buildReRobeEarningsV2(arrayLike: CompleteProduct | CompleteProduct[], isCanonicalMerchant?: boolean): number[];
|
|
11
11
|
static materialCompJoinedString(materialComposition?: MaterialComposition): string;
|
|
12
|
-
static measurementsJoinedString(measurementsObj
|
|
12
|
+
static measurementsJoinedString(measurementsObj: Measurements): string;
|
|
13
13
|
static sizeCommentPretty(sizeComment: string): string;
|
|
14
14
|
static getSizeLabel(clothingSize: string[], shoeSize: string, jeanSize: string): string;
|
|
15
15
|
static generateArrForDetailsBulletList(productObj: CompleteProduct): string[];
|
|
@@ -111,23 +111,20 @@ class ReRobeProductHelpers {
|
|
|
111
111
|
}
|
|
112
112
|
return '';
|
|
113
113
|
}
|
|
114
|
-
static measurementsJoinedString(measurementsObj
|
|
115
|
-
if (measurementsObj
|
|
116
|
-
|
|
117
|
-
let result = acc;
|
|
118
|
-
if (cur !== 'unit') {
|
|
119
|
-
if (measurementsObj[cur]) {
|
|
120
|
-
if (acc === '') {
|
|
121
|
-
return (result = `${measurementsObj[cur]} ${measurementsObj.unit} ${cur}`);
|
|
122
|
-
}
|
|
123
|
-
return (result = `${measurementsObj[cur]} ${measurementsObj.unit} ${cur} x ${acc}`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return result;
|
|
127
|
-
}, '');
|
|
128
|
-
return measurementStr;
|
|
114
|
+
static measurementsJoinedString(measurementsObj) {
|
|
115
|
+
if (typeof measurementsObj !== 'object' || measurementsObj == null) {
|
|
116
|
+
return '';
|
|
129
117
|
}
|
|
130
|
-
|
|
118
|
+
if (Object.keys(measurementsObj).length === 0) {
|
|
119
|
+
return '';
|
|
120
|
+
}
|
|
121
|
+
return Object.keys(measurementsObj)
|
|
122
|
+
.filter((key) => key !== 'unit' && !!measurementsObj[key])
|
|
123
|
+
.map((key) => {
|
|
124
|
+
const label = product_constants_1.MEASUREMENT_FIELDS_DICT[key] || lodash_1.startCase(key);
|
|
125
|
+
return `${measurementsObj[key]} ${measurementsObj.unit} ${label}`;
|
|
126
|
+
})
|
|
127
|
+
.join(' x ');
|
|
131
128
|
}
|
|
132
129
|
static sizeCommentPretty(sizeComment) {
|
|
133
130
|
const scO = options_1.sizeCommentOptions.filter((o) => o.value === sizeComment);
|
package/lib/models/Product.js
CHANGED
|
@@ -438,6 +438,7 @@ class Product extends Base_1.default {
|
|
|
438
438
|
const color = this.filterAttributes.color;
|
|
439
439
|
const productStyle = this.filterAttributes.productStyle.join(', ');
|
|
440
440
|
const productRemarks = this.consignmentAttributes.productRemarks;
|
|
441
|
+
const conditionRemarks = this.consignmentAttributes.conditionRemarks;
|
|
441
442
|
const condition = this.filterAttributes.condition;
|
|
442
443
|
const priceNew = this.consignmentAttributes.purchasePrice;
|
|
443
444
|
const yearPurchased = this.consignmentAttributes.yearPurchased;
|
|
@@ -448,16 +449,17 @@ class Product extends Base_1.default {
|
|
|
448
449
|
const descriptionObj = {
|
|
449
450
|
title: customHeading ? `<p>${customHeading}</p>\n` : 'REMOVE_ME',
|
|
450
451
|
line1: `<ul>\n`,
|
|
451
|
-
line2: `<li>Fit: ${fit}</li>\n
|
|
452
|
-
line3: `<li>Condition: ${condition}</li>\n
|
|
453
|
-
line4:
|
|
454
|
-
line5:
|
|
455
|
-
line6:
|
|
456
|
-
line7:
|
|
457
|
-
line8:
|
|
458
|
-
line9:
|
|
459
|
-
line10:
|
|
460
|
-
line11: `\n</
|
|
452
|
+
line2: fit ? `<li>Fit: ${fit}</li>\n` : 'REMOVE_ME',
|
|
453
|
+
line3: condition ? `<li>Condition: ${condition}</li>\n` : 'REMOVE_ME',
|
|
454
|
+
line4: conditionRemarks ? `\n<li>Condition Remarks: ${conditionRemarks}</li>` : 'REMOVE_ME',
|
|
455
|
+
line5: color ? `<li>Color: ${color}</li>` : 'REMOVE_ME',
|
|
456
|
+
line6: productStyle && productStyle.length > 0 ? `\n<li>Style: ${productStyle}</li>` : 'REMOVE_ME',
|
|
457
|
+
line7: materials ? `\n<li>Material: ${materials}</li>` : 'REMOVE_ME',
|
|
458
|
+
line8: measurements ? `\n<li>Measurements: ${measurements}</li>` : 'REMOVE_ME',
|
|
459
|
+
line9: productRemarks ? `\n<li>Remarks: ${productRemarks}</li>` : 'REMOVE_ME',
|
|
460
|
+
line10: priceNew ? `\n<li>Purchase price: ${priceNew}</li>` : 'REMOVE_ME',
|
|
461
|
+
line11: yearPurchased ? `\n<li>Year purchased: ${yearPurchased}</li>` : 'REMOVE_ME',
|
|
462
|
+
line12: `\n</ul>`,
|
|
461
463
|
};
|
|
462
464
|
return Object.values(descriptionObj).reduce((acc, cur) => {
|
|
463
465
|
if (!cur.includes('REMOVE_ME')) {
|
|
@@ -841,12 +843,11 @@ class Product extends Base_1.default {
|
|
|
841
843
|
return '';
|
|
842
844
|
}
|
|
843
845
|
return Object.keys(measurementsObj)
|
|
844
|
-
.filter((key) => key !== 'unit')
|
|
846
|
+
.filter((key) => key !== 'unit' && !!measurementsObj[key])
|
|
845
847
|
.map((key) => {
|
|
846
|
-
const label = product_constants_1.
|
|
848
|
+
const label = product_constants_1.MEASUREMENT_FIELDS_DICT[key] || this.utilities.startCase(key);
|
|
847
849
|
return `${measurementsObj[key]} ${measurementsObj.unit} ${label}`;
|
|
848
850
|
})
|
|
849
|
-
.reverse()
|
|
850
851
|
.join(' x ');
|
|
851
852
|
}
|
|
852
853
|
convertMaterialCompJoinedStrToObj(materialCompJoinedString) {
|