rerobe-js-orm 2.4.96 → 2.4.99
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/lib/form-states/Product/ProductFormState.js +1 -1
- package/lib/form-states/Product/options.d.ts +1 -1
- package/lib/form-states/Product/options.js +6 -66
- package/lib/models/Product.js +3 -0
- package/lib/models/ProductStateManager.d.ts +1 -0
- package/lib/models/ProductStateManager.js +1 -0
- package/package.json +1 -1
|
@@ -86,7 +86,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
86
86
|
return productFactory.createProduct(this);
|
|
87
87
|
}
|
|
88
88
|
priceInputChangeHandler(value) {
|
|
89
|
-
const priceValAsValNumberString = Number(value) > 0 ? String(value) : '
|
|
89
|
+
const priceValAsValNumberString = Number(value) > 0 ? String(value) : '';
|
|
90
90
|
// Mutate price inputValue and valid prop
|
|
91
91
|
this.fields.price.inputValue = priceValAsValNumberString;
|
|
92
92
|
this.fields.price.valid = Number(value) > 0;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.productOptions = exports.productIsOnSaleOptions = exports.discountTypeOptions = exports.conditionTypeOptions = exports.salesChannelOptions = exports.unisexJewelry = exports.mensJewelry = exports.jewelry = exports.unisexAccessories = exports.mensAccessories = exports.accessories = exports.unisexBags = exports.mensBags = exports.bags = exports.unisexShoes = exports.mensShoes = exports.shoes = exports.unisexClothing = exports.mensClothing = exports.clothing = exports.productCategories = exports.clothingMaterials = exports.shoeSizes = exports.jeanSizes = exports.gender = exports.conditions = exports.colors = exports.brands = exports.sizeCommentOptions = exports.clothingSizeOptions = exports.statusOptions = exports.publishTypeOptions = exports.availableForSaleOptions = void 0;
|
|
4
|
+
const ProductStateManager_1 = require("../../models/ProductStateManager");
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
4
6
|
const availableForSaleOptions = [
|
|
5
7
|
{
|
|
6
8
|
label: 'Zero',
|
|
@@ -27,72 +29,10 @@ const publishTypeOptions = [
|
|
|
27
29
|
},
|
|
28
30
|
];
|
|
29
31
|
exports.publishTypeOptions = publishTypeOptions;
|
|
30
|
-
const statusOptions =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: 'Rejected',
|
|
37
|
-
value: 'REJECTED',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
label: 'Seller Liquidated',
|
|
41
|
-
value: 'SELLER_LIQUIDATED',
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: 'Hold',
|
|
45
|
-
value: 'HOLD',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
label: 'Accepted',
|
|
49
|
-
value: 'ACCEPTED',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: 'To Be Dropped Off By Seller',
|
|
53
|
-
value: 'DROP_OFF_AT_REROBE',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: 'To Be Shipped By Seller',
|
|
57
|
-
value: 'SHIP_TO_REROBE',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
label: 'To Be Picked Up From Seller (At Home Pick-up)',
|
|
61
|
-
value: 'AT_HOME_PICK_UP',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
label: 'In Quality Control',
|
|
65
|
-
value: 'QUALITY_CONTROL',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
label: 'Pending Publication',
|
|
69
|
-
value: 'PENDING_PUBLICATION',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: 'Listed For Sale',
|
|
73
|
-
value: 'LISTED',
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
label: 'Reserved',
|
|
77
|
-
value: 'RESERVED',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label: 'Sold (IN RETURN PERIOD)',
|
|
81
|
-
value: 'SOLD',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
label: 'Returned',
|
|
85
|
-
value: 'RETURNED',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
label: 'Sold (Seller To Be Paid)',
|
|
89
|
-
value: 'SOLD_SELLER_TO_BE_PAID',
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
label: 'Sold (Paid)',
|
|
93
|
-
value: 'SOLD_SELLER_PAID',
|
|
94
|
-
},
|
|
95
|
-
];
|
|
32
|
+
const statusOptions = Object.values(ProductStateManager_1.default.PRODUCT_STATES).map((val) => ({
|
|
33
|
+
label: lodash_1.startCase(lodash_1.toLower(val)),
|
|
34
|
+
value: val,
|
|
35
|
+
}));
|
|
96
36
|
exports.statusOptions = statusOptions;
|
|
97
37
|
const clothingSizeOptions = [
|
|
98
38
|
{
|
package/lib/models/Product.js
CHANGED
|
@@ -350,6 +350,9 @@ class Product extends Base_1.default {
|
|
|
350
350
|
if (productType === 'Suit Jacket' || productType === 'Shirts & Blouses' || productType === 'Outerwear') {
|
|
351
351
|
productType = '';
|
|
352
352
|
}
|
|
353
|
+
if (['Blazers', 'Dresses', 'Jumpsuits', 'Skirts', 'Tops'].includes(productType)) {
|
|
354
|
+
productType = productType.substring(0, productType.length - 1);
|
|
355
|
+
}
|
|
353
356
|
let result;
|
|
354
357
|
if (brand.includes('Vintage')) {
|
|
355
358
|
if (productType !== '') {
|
|
@@ -350,6 +350,7 @@ class ProductStateManager extends Base_1.default {
|
|
|
350
350
|
}
|
|
351
351
|
exports.default = ProductStateManager;
|
|
352
352
|
ProductStateManager.PRODUCT_STATES = {
|
|
353
|
+
archived: 'ARCHIVED',
|
|
353
354
|
sellRequestReview: 'SELL_REQUEST_REVIEW',
|
|
354
355
|
sellRequestReviewDraft: 'SELL_REQUEST_REVIEW_DRAFT',
|
|
355
356
|
rejected: 'REJECTED',
|