contentoh-components-library 21.1.60 → 21.1.63

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.
Files changed (22) hide show
  1. package/dist/components/atoms/ProductPercentCard/Percent.stories.js +1 -1
  2. package/dist/components/atoms/ProductPercentCard/styles.js +1 -1
  3. package/dist/components/molecules/AssignedWork/AssignedWork.stories.js +1 -1
  4. package/dist/components/molecules/AssignedWork/styles.js +1 -1
  5. package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
  6. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +93 -109
  7. package/dist/components/pages/ProviderProductEdition/index.js +430 -429
  8. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +1 -1
  9. package/dist/components/pages/RetailerProductEdition/index.js +217 -200
  10. package/dist/global-files/data.js +8 -8
  11. package/package.json +1 -1
  12. package/src/components/atoms/ProductPercentCard/Percent.stories.js +11 -12
  13. package/src/components/atoms/ProductPercentCard/styles.js +9 -9
  14. package/src/components/molecules/AssignedWork/AssignedWork.stories.js +8 -8
  15. package/src/components/molecules/AssignedWork/styles.js +9 -10
  16. package/src/components/organisms/FullProductNameHeader/index.js +2 -2
  17. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +95 -114
  18. package/src/components/pages/ProviderProductEdition/index.js +232 -248
  19. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +1 -1
  20. package/src/components/pages/RetailerProductEdition/index.js +149 -173
  21. package/src/global-files/data.js +8 -8
  22. package/src/components/atoms/ProgressBar/styles.js +0 -69
@@ -280,18 +280,18 @@ 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("PA")) return "PA";
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
296
  return new Error("Status not found");
297
297
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.1.60",
3
+ "version": "21.1.63",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -3,18 +3,18 @@ import { ProductPercentCard } from "./index";
3
3
  const status = [
4
4
  "-",
5
5
  "Pr",
6
- "Rc",
7
- "As",
8
- "P",
9
- "QF",
10
- "AF",
6
+ "R",
7
+ "AS",
8
+ "CA",
9
+ "IE",
10
+ "AC",
11
11
  "AA",
12
12
  "AP",
13
- "AC",
13
+ "ACA",
14
14
  "RA",
15
- "RF",
16
- "RP",
17
15
  "RC",
16
+ "RP",
17
+ "RCA",
18
18
  "Ex",
19
19
  ];
20
20
 
@@ -29,13 +29,12 @@ export default {
29
29
  },
30
30
  };
31
31
 
32
- const Template = (args) => <ProductPercentCard {...args}/>;
32
+ const Template = (args) => <ProductPercentCard {...args} />;
33
33
 
34
- export const ProductPercentCardDefault = Template.bind ({});
34
+ export const ProductPercentCardDefault = Template.bind({});
35
35
 
36
36
  ProductPercentCardDefault.args = {
37
37
  statusType: "-",
38
38
  productsInStatus: 0,
39
39
  totalProcucts: 0,
40
-
41
- };
40
+ };
@@ -8,8 +8,8 @@ export const Container = styled.div`
8
8
  height: 83px;
9
9
  padding: 10px;
10
10
 
11
- &.status-Pr,
12
- &.status-Rc {
11
+ &.status-PA,
12
+ &.status-RC {
13
13
  border: 1px solid ${GlobalColors.reception};
14
14
  .span {
15
15
  color: ${GlobalColors.reception};
@@ -22,19 +22,19 @@ export const Container = styled.div`
22
22
  }
23
23
  }
24
24
 
25
- &.status-As,
26
- &.status-P,
27
- &.status-QF {
25
+ &.status-AS,
26
+ &.status-CA,
27
+ &.status-IE {
28
28
  border: 1px solid ${GlobalColors.in_progress};
29
29
  .span {
30
30
  color: ${GlobalColors.in_progress};
31
31
  }
32
32
  }
33
33
 
34
- &.status-AF,
34
+ &.status-AC,
35
35
  &.status-AA,
36
36
  &.status-AP,
37
- &.status-AC {
37
+ &.status-ACA {
38
38
  border: 1px solid ${GlobalColors.finished};
39
39
  .span {
40
40
  color: ${GlobalColors.finished};
@@ -42,9 +42,9 @@ export const Container = styled.div`
42
42
  }
43
43
 
44
44
  &.status-RA,
45
- &.status-RF,
45
+ &.status-RC,
46
46
  &.status-RP,
47
- &.status-RC {
47
+ &.status-RCA {
48
48
  border: 1px solid #d74ded;
49
49
  .span {
50
50
  color: #d74ded;
@@ -5,18 +5,18 @@ import assignedImage2 from "../../../assets/images/componentAssigned/assignedIma
5
5
  const status = [
6
6
  "-",
7
7
  "Pr",
8
- "Rc",
9
- "As",
10
- "P",
11
- "QF",
12
- "AF",
8
+ "R",
9
+ "AS",
10
+ "CA",
11
+ "IE",
12
+ "AC",
13
13
  "AA",
14
14
  "AP",
15
- "AC",
15
+ "ACA",
16
16
  "RA",
17
- "RF",
18
- "RP",
19
17
  "RC",
18
+ "RP",
19
+ "RCA",
20
20
  "Ex",
21
21
  ];
22
22
 
@@ -9,8 +9,8 @@ export const Container = styled.div`
9
9
  padding-bottom: 5px;
10
10
  position: relative;
11
11
 
12
- &.status-Pr,
13
- &.status-Rc {
12
+ &.status-PA,
13
+ &.status-R {
14
14
  border: 1px solid ${GlobalColors.reception};
15
15
  .header-and-paragraph {
16
16
  color: ${GlobalColors.reception};
@@ -23,19 +23,19 @@ export const Container = styled.div`
23
23
  }
24
24
  }
25
25
 
26
- &.status-As,
27
- &.status-P,
28
- &.status-QF {
26
+ &.status-AA,
27
+ &.status-CA,
28
+ &.status-IE {
29
29
  border: 1px solid ${GlobalColors.in_progress};
30
30
  .header-and-paragraph {
31
31
  color: ${GlobalColors.in_progress};
32
32
  }
33
33
  }
34
34
 
35
- &.status-AF,
35
+ &.status-AC,
36
36
  &.status-AA,
37
37
  &.status-AP,
38
- &.status-AC {
38
+ &.status-ACA {
39
39
  border: 1px solid ${GlobalColors.finished};
40
40
  .header-and-paragraph {
41
41
  color: ${GlobalColors.finished};
@@ -43,9 +43,9 @@ export const Container = styled.div`
43
43
  }
44
44
 
45
45
  &.status-RA,
46
- &.status-RF,
46
+ &.status-RC,
47
47
  &.status-RP,
48
- &.status-RC {
48
+ &.status-RCA {
49
49
  border: 1px solid #d74ded;
50
50
  .header-and-paragraph {
51
51
  color: #d74ded;
@@ -56,7 +56,6 @@ export const Container = styled.div`
56
56
  border: 1px solid ${GlobalColors.exported};
57
57
  .header-and-paragraph {
58
58
  color: ${GlobalColors.exported};
59
-
60
59
  }
61
60
  }
62
61
 
@@ -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
  });
@@ -81,4 +81,4 @@ export const FullProductNameHeader = ({
81
81
  </div>
82
82
  </Container>
83
83
  );
84
- };
84
+ };
@@ -12,105 +12,125 @@ 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.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJhODE2NGMwNi1hN2U5LTQ2OGItYTBiMS02MDIxNzMyNWY0ZTgiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NjExMzE0NiwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjU2MTE2NzQ2LCJpYXQiOjE2NTYxMTMxNDYsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.kfMoKcxYDkpNZJibGdw50oOkRwP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dGhfdGltZSI6MTY1ODUzODc2NCwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTg1NDIzNjQsImlhdCI6MTY1ODUzODc2NCwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.B7za0LzO3yrlFnHWJKqkhQ2CoN9lGfPUjhscVUPzSYFd55yLewKD1aOGwfhJJM95Wve1JTRnAAkhiWJHVD8bEtk4SJXYtoYnaPb_LKK0tqF9GtSWPaWN1Lmz5pWezjeSujspCvZGboAo7vJcwc0wQbKZ2WceS_Om1bC8ov-ZuOLi6yr8dxYCXWNzJ_n0FQtc5X3cB_4d3RQaMGKJSFKo8UhFH8cuzLxhNowYd2wte-WcdVf8-hZ0ddZaBSOfjQbBVhAg6LaiOODucLUOHazD_qFL-h3opmei1ztmYZ80H2B3cWARUU1l_ZmaXeKe0HSOxaRr3w7F-2Wo2cFih70ZzA",
20
+ articleId: 76180,
21
+ category: 121,
22
22
  version: 2,
23
23
  productSelected: {
24
- orderId: 55,
25
- article_status: "AP",
26
- datasheet_status: "AP",
27
- description_status: "AP",
28
- images_status: "AP",
24
+ orderId: 121,
25
+ status: "AA",
26
+ datasheet_status: "AA",
29
27
  prio: "none",
30
28
  version: 2,
29
+ description_status: "AA",
30
+ images_status: "AA",
31
31
  brand: null,
32
+ retailerOrder: 0,
33
+ missing: {
34
+ datasheet: null,
35
+ descriptions: null,
36
+ images: null,
37
+ },
38
+ services: {
39
+ datasheets: 1,
40
+ descriptions: 1,
41
+ images: 1,
42
+ },
32
43
  article: {
33
- category: "ILUMINACIÓN|FOCOS|FOCOS",
34
- company_name: "THD Proveedor",
44
+ category:
45
+ "Eléctrico|Casa Inteligente|Interruptores y contactos inteligentes",
46
+ company_name: "COMPANY DEV",
35
47
  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",
48
+ id_category: "3031",
49
+ id_datasheet_especialist: null,
50
+ id_datasheet_facilitator: null,
51
+ id_description_especialist: null,
52
+ id_description_facilitator: null,
53
+ id_images_especialist: null,
54
+ id_images_facilitator: null,
55
+ id_order: 121,
56
+ id_article: 76180,
57
+ id_auditor: null,
58
+ name: "Prod 3",
59
+ timestamp: "2022-07-18T19:45:31.000Z",
60
+ upc: "1807203",
40
61
  },
41
62
  retailers: [
42
63
  {
43
64
  id: 58,
44
65
  name: "The Home Depot Golden",
45
66
  },
46
- {
47
- id: 59,
48
- 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",
57
- },
58
67
  ],
59
- services: {
60
- datasheets: 1,
61
- descriptions: 1,
62
- images: 1,
68
+ statusByRetailer: {
69
+ 58: {
70
+ datasheet: "AA",
71
+ description: "AA",
72
+ images: "AA",
73
+ },
63
74
  },
64
- id_article: 55118,
65
75
  retailersAvailable: [
66
76
  {
67
77
  id: 58,
68
78
  name: "The Home Depot Golden",
69
79
  },
70
- {
71
- id: 59,
72
- 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",
81
- },
82
80
  ],
81
+ categoryName:
82
+ "Eléctrico|Casa Inteligente|Interruptores y contactos inteligentes",
83
+ upc: "1807203",
84
+ id_article: 76180,
85
+ id_order: 121,
83
86
  },
84
87
  productToEdit: {
85
- ArticleId: 55118,
86
- idCategory: "2143",
88
+ ArticleId: 76180,
89
+ idCategory: "3031",
87
90
  product: {
88
- orderId: 55,
89
- article_status: "AP",
90
- datasheet_status: "AP",
91
- description_status: "AP",
92
- images_status: "AP",
91
+ orderId: 121,
92
+ status: "AA",
93
+ datasheet_status: "AA",
93
94
  prio: "none",
94
95
  version: 2,
96
+ description_status: "AA",
97
+ images_status: "AA",
95
98
  brand: null,
99
+ retailerOrder: 0,
100
+ missing: {
101
+ datasheet: null,
102
+ descriptions: null,
103
+ images: null,
104
+ },
105
+ services: {
106
+ datasheets: 1,
107
+ descriptions: 1,
108
+ images: 1,
109
+ },
96
110
  article: {
97
- category: "ILUMINACIÓN|FOCOS|FOCOS",
98
- company_name: "THD Proveedor",
111
+ category:
112
+ "Eléctrico|Casa Inteligente|Interruptores y contactos inteligentes",
113
+ company_name: "COMPANY DEV",
99
114
  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",
115
+ id_category: "3031",
116
+ id_datasheet_especialist: null,
117
+ id_datasheet_facilitator: null,
118
+ id_description_especialist: null,
119
+ id_description_facilitator: null,
120
+ id_images_especialist: null,
121
+ id_images_facilitator: null,
122
+ id_order: 121,
123
+ id_article: 76180,
124
+ id_auditor: null,
125
+ name: "Prod 3",
126
+ timestamp: "2022-07-18T19:45:31.000Z",
127
+ upc: "1807203",
104
128
  },
105
129
  retailers: [
106
130
  {
107
131
  id: 58,
108
132
  name: "The Home Depot Golden",
109
133
  },
110
- {
111
- id: 59,
112
- name: "The Home Depot Platinum",
113
- },
114
134
  {
115
135
  id: 60,
116
136
  name: "The Home Depot Resizing",
@@ -120,67 +140,28 @@ ProviderProductEditionDefault.args = {
120
140
  name: "Home Depot TAB",
121
141
  },
122
142
  ],
123
- services: {
124
- datasheets: 1,
125
- descriptions: 1,
126
- images: 1,
143
+ statusByRetailer: {
144
+ 58: {
145
+ datasheet: "AA",
146
+ description: "AA",
147
+ images: "AA",
148
+ },
127
149
  },
128
- id_article: 55118,
129
150
  retailersAvailable: [
130
151
  {
131
152
  id: 58,
132
153
  name: "The Home Depot Golden",
133
154
  },
134
- {
135
- id: 59,
136
- 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",
145
- },
146
155
  ],
156
+ categoryName:
157
+ "Eléctrico|Casa Inteligente|Interruptores y contactos inteligentes",
158
+ upc: "1807203",
159
+ id_article: 76180,
160
+ id_order: 121,
147
161
  },
162
+ src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1658189942624",
148
163
  },
149
164
  location: {
150
- product: { articleId: 109485, versionId: 3 },
151
165
  state: { origin: "Contentoh" },
152
166
  },
153
- user: {
154
- id_user: 59,
155
- name: "The Home",
156
- last_name: "Depot",
157
- email: "cadena.ismael@allfreemail.net",
158
- position: "Admin",
159
- telephone: "+523111366336",
160
- country: "México",
161
- id_company: 7,
162
- id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
163
- birth_Date: null,
164
- about_me: null,
165
- zip_code: null,
166
- address: null,
167
- job: null,
168
- id_stripe: "",
169
- id_role: 0,
170
- active: 1,
171
- is_retailer: 0,
172
- email_notify: 1,
173
- membership: {
174
- id: 24,
175
- start_date: "2021-11-23T03:35:50.000Z",
176
- end_date: "2022-11-23T03:35:50.000Z",
177
- planID: 9,
178
- plan: "prod_KtlkzZVGq6bRTO",
179
- name: "Plan Enterprise Full",
180
- user_limit: "30",
181
- products_limit: "10000",
182
- type: "Enterprise",
183
- },
184
- src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1656113146885",
185
- },
186
- };
167
+ };