rerobe-js-orm 2.4.95 → 2.4.98

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.
@@ -9,7 +9,7 @@ export const publishTypeOptions: {
9
9
  value: string;
10
10
  }[];
11
11
  export const statusOptions: {
12
- label: string;
12
+ label: any;
13
13
  value: string;
14
14
  }[];
15
15
  export const clothingSizeOptions: {
@@ -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
- label: 'Sell Request Review',
33
- value: 'SELL_REQUEST_REVIEW',
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
  {
@@ -1,6 +1,7 @@
1
1
  import Base from '../Base';
2
2
  export default class ProductStateManager extends Base {
3
3
  static PRODUCT_STATES: {
4
+ archived: string;
4
5
  sellRequestReview: string;
5
6
  sellRequestReviewDraft: string;
6
7
  rejected: string;
@@ -309,7 +309,10 @@ class ProductStateManager extends Base_1.default {
309
309
  if (status.includes(ProductStateManager.PRODUCT_STATES.clearance)) {
310
310
  return this.state.toClearance();
311
311
  }
312
- return this.state.toListed();
312
+ if (status.includes(ProductStateManager.PRODUCT_STATES.listed)) {
313
+ return this.state.toListed();
314
+ }
315
+ return this.state.toSold();
313
316
  }
314
317
  toLoading() {
315
318
  this.state.toLoading();
@@ -347,6 +350,7 @@ class ProductStateManager extends Base_1.default {
347
350
  }
348
351
  exports.default = ProductStateManager;
349
352
  ProductStateManager.PRODUCT_STATES = {
353
+ archived: 'ARCHIVED',
350
354
  sellRequestReview: 'SELL_REQUEST_REVIEW',
351
355
  sellRequestReviewDraft: 'SELL_REQUEST_REVIEW_DRAFT',
352
356
  rejected: 'REJECTED',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "2.4.95",
3
+ "version": "2.4.98",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",