contentoh-components-library 21.1.35 → 21.1.38

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 (29) hide show
  1. package/dist/components/atoms/Percent/Percent.stories.js +39 -0
  2. package/dist/components/atoms/Percent/index.js +39 -0
  3. package/dist/components/atoms/Percent/styles.js +20 -0
  4. package/dist/components/atoms/StatusTag/index.js +17 -2
  5. package/dist/components/atoms/StatusTag/styles.js +1 -1
  6. package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +31 -0
  7. package/dist/components/molecules/TextAndGradient/index.js +36 -0
  8. package/dist/components/molecules/TextAndGradient/styles.js +18 -0
  9. package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
  10. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +105 -103
  11. package/dist/components/pages/ProviderProductEdition/index.js +323 -349
  12. package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
  13. package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
  14. package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
  15. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +38 -83
  16. package/dist/components/pages/RetailerProductEdition/index.js +197 -208
  17. package/dist/global-files/data.js +9 -10
  18. package/package.json +1 -1
  19. package/src/components/atoms/StatusTag/index.js +12 -2
  20. package/src/components/atoms/StatusTag/styles.js +11 -11
  21. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  22. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +117 -103
  23. package/src/components/pages/ProviderProductEdition/index.js +171 -165
  24. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +33 -82
  25. package/src/components/pages/RetailerProductEdition/index.js +167 -139
  26. package/src/global-files/data.js +9 -10
  27. package/dist/assets/images/sliderToolTip/slide21.svg +0 -9
  28. package/dist/assets/images/sliderToolTip/slide22.svg +0 -9
  29. package/dist/assets/images/sliderToolTip/slide23.svg +0 -9
@@ -280,21 +280,20 @@ var getNewStatus = function getNewStatus(statusArray) {
280
280
  statusArray.forEach(function (element) {
281
281
  return lookupString += element + "/";
282
282
  });
283
- if (lookupString.includes("RC")) return "RC";
283
+ if (lookupString.includes("RF")) return "RF";
284
284
  if (lookupString.includes("RA")) return "RA";
285
285
  if (lookupString.includes("RP")) return "RP";
286
- if (lookupString.includes("RCA")) return "RCA";
287
- if (lookupString.includes("UNASSIGNED")) return "CA";
288
- if (lookupString.includes("CA")) return "CA";
289
- if (lookupString.includes("IE")) return "IE";
290
- if (lookupString.includes("AC")) return "AC";
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";
291
291
  if (lookupString.includes("AA")) return "AA";
292
292
  if (lookupString.includes("AP")) return "AP";
293
- if (lookupString.includes("ACA")) return "ACA";
294
- if (lookupString.includes("R")) return "R";
293
+ if (lookupString.includes("AC")) return "AC";
294
+ if (lookupString.includes("RECEIVED")) return "RECEIVED";
295
295
  if (lookupString.includes("NA")) return "NA";
296
- console.log("Status not found");
297
- return "NA";
296
+ return new Error("Status not found");
298
297
  };
299
298
 
300
299
  exports.getNewStatus = getNewStatus;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.1.35",
3
+ "version": "21.1.38",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -5,10 +5,20 @@ export const StatusTag = ({ statusType, ovalForm }) => {
5
5
  switch (status) {
6
6
  case "COMPLETED":
7
7
  return "C";
8
+ case "RECEPTION":
9
+ return "Pr";
8
10
  case "NULL":
9
- return "--";
11
+ return "-";
12
+ case "RECEIVED":
13
+ return "Rc";
14
+ case "IN_PROGRESS":
15
+ return "P";
16
+ case "ASSIGNED":
17
+ return "As";
10
18
  case "APPROVED":
11
19
  return "Ap";
20
+ case "VALIDATING":
21
+ return "V";
12
22
  case "PAID_OUT":
13
23
  return "Po";
14
24
  default:
@@ -17,7 +27,7 @@ export const StatusTag = ({ statusType, ovalForm }) => {
17
27
  };
18
28
  return (
19
29
  <Container
20
- className={`status-${getShortStatus(statusType?.replace(/\/.*/, ""))} ${
30
+ className={`status-${getShortStatus(statusType)} ${
21
31
  ovalForm && "oval-form"
22
32
  }`}
23
33
  >
@@ -16,27 +16,30 @@ export const Container = styled.div`
16
16
  line-height: 20px;
17
17
  }
18
18
 
19
- &.status-AS,
20
- &.status-CA,
21
- &.status-IE {
19
+ &.status-As,
20
+ &.status-P,
21
+ &.status-IN_PROGRESS,
22
+ &.status-QF {
22
23
  background-color: ${GlobalColors.in_progress};
23
24
  }
24
25
 
25
- &.status-R {
26
+ &.status-Pr,
27
+ &.status-Rr,
28
+ &.status-Rc {
26
29
  background-color: ${GlobalColors.reception};
27
30
  }
28
31
 
29
32
  &.status-AA,
30
33
  &.status-AP,
31
- &.status-ACA,
32
- &.status-AC {
34
+ &.status-AC,
35
+ &.status-AF {
33
36
  background-color: ${GlobalColors.finished};
34
37
  }
35
38
 
36
39
  &.status-RA,
37
- &.status-RC,
40
+ &.status-RF,
38
41
  &.status-RP,
39
- &.status-RCA {
42
+ &.status-RC {
40
43
  background-color: ${GlobalColors.rejected_status};
41
44
  }
42
45
 
@@ -70,7 +73,4 @@ export const Container = styled.div`
70
73
  &.oval-form {
71
74
  border-radius: 10px;
72
75
  }
73
- &.delThis {
74
- color: red;
75
- }
76
76
  `;
@@ -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 : "R");
29
+ element.push(sd.status ? sd.status : "RECEIVED");
30
30
  } else element.push("NA");
31
31
  rt["services"] = element;
32
32
  });
@@ -16,157 +16,171 @@ ProviderProductEditionDefault.args = {
16
16
  Imágenes: false,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIwOWQ1MDUzMy05NjA3LTQ5YTQtODRkNC0zMDk1OWNmNmY4NjUiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NjYwNzcyMSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTY2MTEzMjEsImlhdCI6MTY1NjYwNzcyMSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.Xung-7vGoB-YllkTIOn0DrNRd-GBD4lbQemGdMxRPFbE-nvvGXQsTWLstJ-8yQ4zoyGUoOIoGsR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21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjU2MTE2NzQ2LCJpYXQiOjE2NTYxMTMxNDYsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.kfMoKcxYDkpNZJibGdw50oOkRwPVl26YNAwwDoLEfQjOZB6WRCY95iHfU1maYcTTvA5KlT5ali8XZ-nLnxh60vZoLGTDOfCvEnwd1t94JtfE5CsWDr_jfH1U0AVidxihqKnkwvCezkHwU1DUFlbu2iBNo7MHQw4ydiK2sx4q0-QGltmE7W2JJ0sayRDuNchy2S6FQoyIWhsP3oaKTvJGDKCaJxwkFEKk-3antoMtfua9H8V4p2Kkqa_eDbFk8pLYGaYgImLlaia2orGgETkHZIWEMr4WJq1V_7qOg4lYq2BUUuMhWdmK6XUL_Jhmv05TUJ3Rp_Ti4_J2WE4zQqhbfQ",
20
+ articleId: 238,
21
+ category: 846,
22
+ version: 2,
23
23
  productSelected: {
24
- orderId: 89,
25
- status: "AA",
24
+ orderId: 55,
25
+ article_status: "AP",
26
26
  datasheet_status: "AP",
27
- prio: "none",
28
- version: 3,
29
- description_status: "AA",
27
+ description_status: "AP",
30
28
  images_status: "AP",
31
- brand: "123",
32
- retailerOrder: 0,
33
- missing: {
34
- datasheet: 17,
35
- descriptions: 4,
36
- images: 3,
37
- },
38
- services: {
39
- datasheets: 1,
40
- descriptions: 1,
41
- images: 1,
42
- },
29
+ prio: "none",
30
+ version: 2,
31
+ brand: null,
43
32
  article: {
44
- category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
45
- company_name: "COMPANY DEV",
33
+ category: "ILUMINACIÓN|FOCOS|FOCOS",
34
+ company_name: "THD Proveedor",
46
35
  country: "México",
47
- id_category: "4",
48
- id_datasheet_especialist: 54,
49
- id_datasheet_facilitator: 52,
50
- id_description_especialist: 54,
51
- id_description_facilitator: 52,
52
- id_images_especialist: 55,
53
- id_images_facilitator: 53,
54
- id_order: 89,
55
- id_article: 55157,
56
- id_auditor: 37,
57
- name: "testing",
58
- upc: "807526",
36
+ id_category: "2143",
37
+ id_article: 55118,
38
+ name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
39
+ upc: "145582",
59
40
  },
60
41
  retailers: [
61
42
  {
62
- id: 3,
63
- name: "Sam´s Club",
43
+ id: 58,
44
+ name: "The Home Depot Golden",
45
+ },
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",
64
57
  },
65
58
  ],
59
+ services: {
60
+ datasheets: 1,
61
+ descriptions: 1,
62
+ images: 1,
63
+ },
64
+ id_article: 55118,
66
65
  retailersAvailable: [
67
66
  {
68
- id: 3,
69
- name: "Sam´s Club",
67
+ id: 58,
68
+ name: "The Home Depot Golden",
69
+ },
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",
70
81
  },
71
82
  ],
72
- categoryName: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
73
- upc: "807526",
74
- id_article: 55157,
75
- id_order: 89,
76
83
  },
77
84
  productToEdit: {
78
- ArticleId: 55157,
79
- idCategory: "4",
85
+ ArticleId: 55118,
86
+ idCategory: "2143",
80
87
  product: {
81
- orderId: 89,
82
- status: "AA",
88
+ orderId: 55,
89
+ article_status: "AP",
83
90
  datasheet_status: "AP",
84
- prio: "none",
85
- version: 3,
86
- description_status: "AA",
91
+ description_status: "AP",
87
92
  images_status: "AP",
88
- brand: "123",
89
- retailerOrder: 0,
90
- missing: {
91
- datasheet: 17,
92
- descriptions: 4,
93
- images: 3,
94
- },
95
- services: {
96
- datasheets: 1,
97
- descriptions: 1,
98
- images: 1,
99
- },
93
+ prio: "none",
94
+ version: 2,
95
+ brand: null,
100
96
  article: {
101
- category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
102
- company_name: "COMPANY DEV",
97
+ category: "ILUMINACIÓN|FOCOS|FOCOS",
98
+ company_name: "THD Proveedor",
103
99
  country: "México",
104
- id_category: "4",
105
- id_datasheet_especialist: 54,
106
- id_datasheet_facilitator: 52,
107
- id_description_especialist: 54,
108
- id_description_facilitator: 52,
109
- id_images_especialist: 55,
110
- id_images_facilitator: 53,
111
- id_order: 89,
112
- id_article: 55157,
113
- id_auditor: 37,
114
- name: "testing",
115
- upc: "807526",
100
+ id_category: "2143",
101
+ id_article: 55118,
102
+ name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
103
+ upc: "145582",
116
104
  },
117
105
  retailers: [
118
106
  {
119
- id: 3,
120
- name: "Sam´s Club",
107
+ id: 58,
108
+ name: "The Home Depot Golden",
109
+ },
110
+ {
111
+ id: 59,
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",
121
121
  },
122
122
  ],
123
+ services: {
124
+ datasheets: 1,
125
+ descriptions: 1,
126
+ images: 1,
127
+ },
128
+ id_article: 55118,
123
129
  retailersAvailable: [
124
130
  {
125
- id: 3,
126
- name: "Sam´s Club",
131
+ id: 58,
132
+ name: "The Home Depot Golden",
133
+ },
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",
127
145
  },
128
146
  ],
129
- categoryName: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
130
- upc: "807526",
131
- id_article: 55157,
132
- id_order: 89,
133
147
  },
134
148
  },
135
149
  location: {
136
- product: { articleId: 55157, versionId: 3 },
150
+ product: { articleId: 109485, versionId: 3 },
137
151
  state: { origin: "Contentoh" },
138
152
  },
139
153
  user: {
140
- id_user: 28,
141
- name: "Proveedor",
142
- last_name: "Colgate",
143
- email: "ilopez@contentoh.com",
144
- position: "Prueba Admin",
154
+ id_user: 59,
155
+ name: "The Home",
156
+ last_name: "Depot",
157
+ email: "cadena.ismael@allfreemail.net",
158
+ position: "Admin",
145
159
  telephone: "+523111366336",
146
160
  country: "México",
147
- id_company: 1,
148
- id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
161
+ id_company: 7,
162
+ id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
149
163
  birth_Date: null,
150
164
  about_me: null,
151
165
  zip_code: null,
152
166
  address: null,
153
167
  job: null,
154
- id_stripe: "cus_KuEt6R6vwmN09f",
168
+ id_stripe: "",
155
169
  id_role: 0,
156
170
  active: 1,
157
171
  is_retailer: 0,
158
- email_notify: 0,
172
+ email_notify: 1,
159
173
  membership: {
160
- id: 38,
161
- start_date: "2022-01-18T17:25:35.000Z",
162
- end_date: "2023-01-18T17:25:35.000Z",
163
- planID: 8,
164
- plan: "prod_KtlhECVSFG2iro",
165
- name: "Plan Pro",
166
- user_limit: "20",
167
- products_limit: "5000",
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",
168
182
  type: "Enterprise",
169
183
  },
170
- src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1656607722122",
184
+ src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1656113146885",
171
185
  },
172
186
  };