contentoh-components-library 21.1.46 → 21.1.47

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.
@@ -280,20 +280,21 @@ var getNewStatus = function getNewStatus(statusArray) {
280
280
  statusArray.forEach(function (element) {
281
281
  return lookupString += element + "/";
282
282
  });
283
- if (lookupString.includes("RF")) return "RF";
283
+ if (lookupString.includes("RCA")) return "RCA";
284
+ if (lookupString.includes("RC")) return "RC";
284
285
  if (lookupString.includes("RA")) return "RA";
285
286
  if (lookupString.includes("RP")) return "RP";
286
- if (lookupString.includes("RC")) return "RC";
287
- if (lookupString.includes("UNASSIGNED")) return "IN_PROGRESS";
288
- if (lookupString.includes("IN_PROGRESS")) return "IN_PROGRESS";
289
- if (lookupString.includes("QF")) return "QF";
290
- if (lookupString.includes("AF")) return "AF";
287
+ if (lookupString.includes("ACA")) return "ACA";
288
+ if (lookupString.includes("UNASSIGNED")) return "CA";
289
+ if (lookupString.includes("CA")) return "CA";
290
+ if (lookupString.includes("IE")) return "IE";
291
+ if (lookupString.includes("AC")) return "AC";
291
292
  if (lookupString.includes("AA")) return "AA";
292
293
  if (lookupString.includes("AP")) return "AP";
293
- if (lookupString.includes("AC")) return "AC";
294
- if (lookupString.includes("RECEIVED")) return "RECEIVED";
294
+ if (lookupString.includes("R")) return "R";
295
295
  if (lookupString.includes("NA")) return "NA";
296
- return new Error("Status not found");
296
+ console.log("Status not found");
297
+ return "NA";
297
298
  };
298
299
 
299
300
  exports.getNewStatus = getNewStatus;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.1.46",
3
+ "version": "21.1.47",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "scripts": {
36
36
  "start": "start-storybook -p 6006",
37
- "build": "cross-env BABEL_ENV=production babel src -d dist",
37
+ "build": "cross-env BABEL_ENV=production babel src -d dist && cp -a src/assets dist/ && cp -a src/global-files/*.css dist/global-files",
38
38
  "chromatic": "npx chromatic --project-token=d7bb0c8ba831",
39
39
  "release": "auto shipit --base-branch=main"
40
40
  },
@@ -70,7 +70,7 @@ export const StatusAsignationInfo = ({
70
70
  slidefront={slidefront}
71
71
  iconSize={"medium-image"}
72
72
  slidePosition={"bottom-slide"}
73
- ></SliderToolTip>
73
+ />
74
74
  {status !== "-" && <StatusTag statusType={status} ovalForm={true} />}
75
75
  {showSaveButton && (
76
76
  <Button
@@ -26,7 +26,7 @@ export const FullProductNameHeader = ({
26
26
  const element = [];
27
27
  servicesData.forEach((sd) => {
28
28
  if (sd.id_retailer === rt.id) {
29
- element.push(sd.status ? sd.status : "RECEIVED");
29
+ element.push(sd.status ? sd.status : "R");
30
30
  } else element.push("NA");
31
31
  rt["services"] = element;
32
32
  });
@@ -12,48 +12,42 @@ export const ProviderProductEditionDefault = Template.bind({});
12
12
  ProviderProductEditionDefault.args = {
13
13
  tabsSections: {
14
14
  Descripción: true,
15
- "Ficha técnica": false,
16
- Imágenes: false,
15
+ "Ficha técnica": true,
16
+ Imágenes: true,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI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amRWxxLW28ZGYue_UlSg",
20
+ articleId: 55154,
21
+ category: 2568,
22
+ version: 3,
23
23
  productSelected: {
24
- orderId: 55,
24
+ orderId: 96,
25
25
  article_status: "AP",
26
- datasheet_status: "AP",
27
- description_status: "AP",
28
- images_status: "AP",
26
+ datasheet_status: "ACA",
27
+ description_status: "ACA",
28
+ images_status: "ACA",
29
29
  prio: "none",
30
- version: 2,
30
+ version: 3,
31
31
  brand: null,
32
32
  article: {
33
- category: "ILUMINACIÓN|FOCOS|FOCOS",
34
- company_name: "THD Proveedor",
33
+ category: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
34
+ company_name: "COMPANY DEV",
35
35
  country: "México",
36
- id_category: "2143",
37
- id_article: 55118,
38
- name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
39
- upc: "145582",
36
+ id_category: "2568",
37
+ id_article: 55154,
38
+ name: "Prueba 12312",
39
+ upc: "977812",
40
40
  },
41
41
  retailers: [
42
42
  {
43
43
  id: 58,
44
44
  name: "The Home Depot Golden",
45
+ services: ["ACA", "ACA", "ACA", "NA"],
45
46
  },
46
47
  {
47
48
  id: 59,
48
49
  name: "The Home Depot Platinum",
49
- },
50
- {
51
- id: 60,
52
- name: "The Home Depot Resizing",
53
- },
54
- {
55
- id: 61,
56
- name: "Home Depot TAB",
50
+ services: ["NA", "NA", "NA", "AP"],
57
51
  },
58
52
  ],
59
53
  services: {
@@ -61,63 +55,62 @@ ProviderProductEditionDefault.args = {
61
55
  descriptions: 1,
62
56
  images: 1,
63
57
  },
64
- id_article: 55118,
58
+ statusByRetailer: {
59
+ 58: {
60
+ datasheet: "ACA",
61
+ description: "ACA",
62
+ images: "ACA",
63
+ },
64
+ 59: {
65
+ images: "ACA",
66
+ },
67
+ },
68
+ id_article: 55154,
65
69
  retailersAvailable: [
66
70
  {
67
71
  id: 58,
68
72
  name: "The Home Depot Golden",
73
+ percentage: 100,
69
74
  },
70
75
  {
71
76
  id: 59,
72
77
  name: "The Home Depot Platinum",
73
- },
74
- {
75
- id: 60,
76
- name: "The Home Depot Resizing",
77
- },
78
- {
79
- id: 61,
80
- name: "Home Depot TAB",
78
+ percentage: 100,
81
79
  },
82
80
  ],
81
+ status: "ACA",
83
82
  },
84
83
  productToEdit: {
85
- ArticleId: 55118,
86
- idCategory: "2143",
84
+ ArticleId: 55154,
85
+ idCategory: "2568",
87
86
  product: {
88
- orderId: 55,
87
+ orderId: 96,
89
88
  article_status: "AP",
90
- datasheet_status: "AP",
91
- description_status: "AP",
92
- images_status: "AP",
89
+ datasheet_status: "ACA",
90
+ description_status: "ACA",
91
+ images_status: "ACA",
93
92
  prio: "none",
94
- version: 2,
93
+ version: 3,
95
94
  brand: null,
96
95
  article: {
97
- category: "ILUMINACIÓN|FOCOS|FOCOS",
98
- company_name: "THD Proveedor",
96
+ category: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
97
+ company_name: "COMPANY DEV",
99
98
  country: "México",
100
- id_category: "2143",
101
- id_article: 55118,
102
- name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
103
- upc: "145582",
99
+ id_category: "2568",
100
+ id_article: 55154,
101
+ name: "Prueba 12312",
102
+ upc: "977812",
104
103
  },
105
104
  retailers: [
106
105
  {
107
106
  id: 58,
108
107
  name: "The Home Depot Golden",
108
+ services: ["ACA", "ACA", "ACA", "NA"],
109
109
  },
110
110
  {
111
111
  id: 59,
112
112
  name: "The Home Depot Platinum",
113
- },
114
- {
115
- id: 60,
116
- name: "The Home Depot Resizing",
117
- },
118
- {
119
- id: 61,
120
- name: "Home Depot TAB",
113
+ services: ["NA", "NA", "NA", "AP"],
121
114
  },
122
115
  ],
123
116
  services: {
@@ -125,29 +118,34 @@ ProviderProductEditionDefault.args = {
125
118
  descriptions: 1,
126
119
  images: 1,
127
120
  },
128
- id_article: 55118,
121
+ statusByRetailer: {
122
+ 58: {
123
+ datasheet: "ACA",
124
+ description: "ACA",
125
+ images: "ACA",
126
+ },
127
+ 59: {
128
+ images: "ACA",
129
+ },
130
+ },
131
+ id_article: 55154,
129
132
  retailersAvailable: [
130
133
  {
131
134
  id: 58,
132
135
  name: "The Home Depot Golden",
136
+ percentage: 100,
133
137
  },
134
138
  {
135
139
  id: 59,
136
140
  name: "The Home Depot Platinum",
137
- },
138
- {
139
- id: 60,
140
- name: "The Home Depot Resizing",
141
- },
142
- {
143
- id: 61,
144
- name: "Home Depot TAB",
141
+ percentage: 100,
145
142
  },
146
143
  ],
144
+ status: "ACA",
147
145
  },
148
146
  },
149
147
  location: {
150
- product: { articleId: 109485, versionId: 3 },
148
+ product: { articleId: 55157, versionId: 3 },
151
149
  state: { origin: "Contentoh" },
152
150
  },
153
151
  user: {
@@ -168,7 +166,7 @@ ProviderProductEditionDefault.args = {
168
166
  id_stripe: "",
169
167
  id_role: 0,
170
168
  active: 1,
171
- is_retailer: 0,
169
+ is_retailer: 1,
172
170
  email_notify: 1,
173
171
  membership: {
174
172
  id: 24,
@@ -181,6 +179,6 @@ ProviderProductEditionDefault.args = {
181
179
  products_limit: "10000",
182
180
  type: "Enterprise",
183
181
  },
184
- src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1656113146885",
182
+ src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1657069378649",
185
183
  },
186
- };
184
+ };