contentoh-components-library 21.2.4 → 21.2.7
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/.env.development +1 -3
- package/.env.production +1 -3
- package/dist/components/atoms/FeatureTag/styles.js +1 -1
- package/dist/components/atoms/Graphic/Graphic.stories.js +1 -9
- package/dist/components/atoms/Graphic/index.js +9 -4
- package/dist/components/atoms/Graphic/styles.js +1 -1
- package/dist/components/molecules/VersionItem/index.js +11 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
- package/dist/components/organisms/VersionSelector/index.js +2 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +121 -73
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +42 -216
- package/dist/components/pages/RetailerProductEdition/index.js +1 -1
- package/dist/index.js +0 -13
- package/package.json +1 -2
- package/src/components/atoms/FeatureTag/styles.js +0 -6
- package/src/components/atoms/Graphic/Graphic.stories.js +0 -8
- package/src/components/atoms/Graphic/index.js +9 -3
- package/src/components/atoms/Graphic/styles.js +2 -1
- package/src/components/molecules/VersionItem/index.js +8 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/VersionSelector/index.js +2 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +146 -80
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +41 -254
- package/src/components/pages/RetailerProductEdition/index.js +1 -1
- package/src/index.js +0 -1
- package/dist/components/atoms/MetricCard/MetricCard.stories.js +0 -31
- package/dist/components/atoms/MetricCard/index.js +0 -24
- package/dist/components/atoms/MetricCard/styles.js +0 -20
- package/dist/components/atoms/MetricSelect/MetricSelect.stories.js +0 -46
- package/dist/components/atoms/MetricSelect/index.js +0 -36
- package/dist/components/atoms/MetricSelect/styles.js +0 -20
- package/dist/components/organisms/Calendar/Calendar.stories.js +0 -28
- package/dist/components/organisms/Calendar/index.js +0 -33
- package/dist/components/organisms/Calendar/styles.js +0 -20
- package/dist/components/organisms/DashboardMetric/DashboardMetric.stories.js +0 -45
- package/dist/components/organisms/DashboardMetric/index.js +0 -168
- package/dist/components/organisms/DashboardMetric/styles.js +0 -20
- package/dist/components/pages/Dashboard/Dashboard.stories.js +0 -28
- package/dist/components/pages/Dashboard/index.js +0 -286
- package/dist/components/pages/Dashboard/styles.js +0 -18
- package/src/components/atoms/MetricCard/MetricCard.stories.js +0 -14
- package/src/components/atoms/MetricCard/index.js +0 -10
- package/src/components/atoms/MetricCard/styles.js +0 -30
- package/src/components/atoms/MetricSelect/MetricSelect.stories.js +0 -37
- package/src/components/atoms/MetricSelect/index.js +0 -22
- package/src/components/atoms/MetricSelect/styles.js +0 -20
- package/src/components/organisms/Calendar/Calendar.stories.js +0 -10
- package/src/components/organisms/Calendar/index.js +0 -17
- package/src/components/organisms/Calendar/styles.js +0 -851
- package/src/components/organisms/DashboardMetric/DashboardMetric.stories.js +0 -28
- package/src/components/organisms/DashboardMetric/index.js +0 -128
- package/src/components/organisms/DashboardMetric/styles.js +0 -60
- package/src/components/pages/Dashboard/Dashboard.stories.js +0 -10
- package/src/components/pages/Dashboard/index.js +0 -142
- package/src/components/pages/Dashboard/styles.js +0 -24
package/dist/index.js
CHANGED
|
@@ -758,19 +758,6 @@ Object.keys(_CustomerType).forEach(function (key) {
|
|
|
758
758
|
});
|
|
759
759
|
});
|
|
760
760
|
|
|
761
|
-
var _Dashboard = require("./components/pages/Dashboard");
|
|
762
|
-
|
|
763
|
-
Object.keys(_Dashboard).forEach(function (key) {
|
|
764
|
-
if (key === "default" || key === "__esModule") return;
|
|
765
|
-
if (key in exports && exports[key] === _Dashboard[key]) return;
|
|
766
|
-
Object.defineProperty(exports, key, {
|
|
767
|
-
enumerable: true,
|
|
768
|
-
get: function get() {
|
|
769
|
-
return _Dashboard[key];
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
});
|
|
773
|
-
|
|
774
761
|
var _EmailResetPassword = require("./components/pages/EmailResetPassword");
|
|
775
762
|
|
|
776
763
|
Object.keys(_EmailResetPassword).forEach(function (key) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.2.
|
|
3
|
+
"version": "21.2.7",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@aws-amplify/auth": "^4.5.3",
|
|
6
6
|
"@aws-amplify/datastore": "^3.11.0",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"prop-types": "^15.7.2",
|
|
23
23
|
"react": "^17.0.2",
|
|
24
24
|
"react-chartjs-2": "^4.0.1",
|
|
25
|
-
"react-datepicker": "^4.8.0",
|
|
26
25
|
"react-dom": "^17.0.2",
|
|
27
26
|
"react-draft-wysiwyg": "^1.14.7",
|
|
28
27
|
"react-dropzone": "^12.0.4",
|
|
@@ -2,11 +2,17 @@ import { Container } from "./styles";
|
|
|
2
2
|
import { Chart } from "react-chartjs-2";
|
|
3
3
|
import "chart.js/auto";
|
|
4
4
|
|
|
5
|
-
export const Graphic = ({ data
|
|
6
|
-
|
|
5
|
+
export const Graphic = ({ data }) => {
|
|
6
|
+
const options = {
|
|
7
|
+
plugins: {
|
|
8
|
+
legend: {
|
|
9
|
+
position: "left",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
7
13
|
return (
|
|
8
14
|
<Container>
|
|
9
|
-
<Chart type=
|
|
15
|
+
<Chart type="doughnut" data={data} options={options} />
|
|
10
16
|
</Container>
|
|
11
17
|
);
|
|
12
18
|
};
|
|
@@ -13,7 +13,14 @@ export const VersionItem = ({
|
|
|
13
13
|
currentVersion,
|
|
14
14
|
productOwner = "owner test",
|
|
15
15
|
setVersion,
|
|
16
|
+
timestamp,
|
|
16
17
|
}) => {
|
|
18
|
+
let textExportedDate = "";
|
|
19
|
+
if (timestamp !== null) {
|
|
20
|
+
const exportedDate = new Date(timestamp).toLocaleDateString();
|
|
21
|
+
textExportedDate = `Ùltima vez exportado: ${exportedDate}`;
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
return (
|
|
18
25
|
<Container>
|
|
19
26
|
<div className="header">
|
|
@@ -33,6 +40,7 @@ export const VersionItem = ({
|
|
|
33
40
|
headerType={"input-name-header"}
|
|
34
41
|
color={GlobalColors.magenta_s2}
|
|
35
42
|
/>
|
|
43
|
+
<p>{textExportedDate}</p>
|
|
36
44
|
<p>
|
|
37
45
|
{currentVersion
|
|
38
46
|
? "Version actual"
|
|
@@ -8,6 +8,7 @@ import closeIcon from "../../../assets/images/versionSelector/closeVersionSelect
|
|
|
8
8
|
import { GlobalColors } from "contentoh-components-library/dist/global-files/variables";
|
|
9
9
|
import { FontFamily } from "../../../global-files/variables";
|
|
10
10
|
import { VersionItem } from "../../molecules/VersionItem";
|
|
11
|
+
import { version } from "react";
|
|
11
12
|
|
|
12
13
|
export const VersionSelector = ({
|
|
13
14
|
modalId,
|
|
@@ -75,6 +76,7 @@ export const VersionSelector = ({
|
|
|
75
76
|
currentVersion={item.version === currentVersion}
|
|
76
77
|
productOwner={companyName}
|
|
77
78
|
setVersion={setVersion}
|
|
79
|
+
timestamp={item.timestamp}
|
|
78
80
|
/>
|
|
79
81
|
))}
|
|
80
82
|
</div>
|
|
@@ -21,106 +21,172 @@ ProviderProductEditionDefault.args = {
|
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
description_status: "AP",
|
|
28
|
-
images_status: "ACA",
|
|
29
|
-
prio: "none",
|
|
30
|
-
version: 2,
|
|
31
|
-
brand: null,
|
|
24
|
+
articleStatus: "ACA",
|
|
25
|
+
version: 5,
|
|
26
|
+
missing: {},
|
|
32
27
|
article: {
|
|
33
28
|
category:
|
|
34
|
-
"
|
|
35
|
-
company_name: "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
upc: "168462",
|
|
29
|
+
"Materiales de Construcción|Impermeabilizantes y Recubrimientos|Selladores",
|
|
30
|
+
company_name: "SIKA MEXICANA S.A. DE C.V.",
|
|
31
|
+
company_id: 383,
|
|
32
|
+
id_category: "2249",
|
|
33
|
+
id_article: 29457,
|
|
34
|
+
name: "SIKA TECHO FRESCO SUPER 15",
|
|
35
|
+
upc: "111187",
|
|
42
36
|
},
|
|
37
|
+
asignations: [],
|
|
43
38
|
retailers: [
|
|
44
39
|
{
|
|
45
40
|
id: 58,
|
|
46
41
|
name: "The Home Depot Golden",
|
|
42
|
+
country: "México",
|
|
43
|
+
id_region: 1,
|
|
44
|
+
active: 1,
|
|
47
45
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
statusByRetailer: {
|
|
55
|
-
58: {
|
|
56
|
-
datasheet: "AP",
|
|
57
|
-
description: "AP",
|
|
58
|
-
images: "ACA",
|
|
46
|
+
{
|
|
47
|
+
id: 59,
|
|
48
|
+
name: "The Home Depot Platinum",
|
|
49
|
+
country: "México",
|
|
50
|
+
id_region: 1,
|
|
51
|
+
active: 1,
|
|
59
52
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
{
|
|
54
|
+
id: 61,
|
|
55
|
+
name: "Home Depot TAB",
|
|
56
|
+
country: "México",
|
|
57
|
+
id_region: 1,
|
|
58
|
+
active: 1,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
percentage: 33.35,
|
|
63
62
|
retailersAvailable: [
|
|
64
63
|
{
|
|
65
64
|
id: 58,
|
|
66
65
|
name: "The Home Depot Golden",
|
|
66
|
+
country: "México",
|
|
67
|
+
id_region: 1,
|
|
68
|
+
active: 1,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 59,
|
|
72
|
+
name: "The Home Depot Platinum",
|
|
73
|
+
country: "México",
|
|
74
|
+
id_region: 1,
|
|
75
|
+
active: 1,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 61,
|
|
79
|
+
name: "Home Depot TAB",
|
|
80
|
+
country: "México",
|
|
81
|
+
id_region: 1,
|
|
82
|
+
active: 1,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
upc: "111187",
|
|
86
|
+
name: "SIKA TECHO FRESCO SUPER 15",
|
|
87
|
+
categoryName:
|
|
88
|
+
"Materiales de Construcción|Impermeabilizantes y Recubrimientos|Selladores",
|
|
89
|
+
id_category: "2249",
|
|
90
|
+
id_article: 29457,
|
|
91
|
+
services: [
|
|
92
|
+
{
|
|
93
|
+
id_article: 29457,
|
|
94
|
+
service: "datasheet",
|
|
95
|
+
quantity: 1,
|
|
96
|
+
price: 0,
|
|
97
|
+
id_user: 1237,
|
|
98
|
+
datasheet_common: null,
|
|
99
|
+
discount: null,
|
|
67
100
|
},
|
|
68
101
|
],
|
|
69
102
|
},
|
|
70
103
|
productToEdit: {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
product:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
country: null,
|
|
88
|
-
id_category: "2522",
|
|
89
|
-
id_article: 78773,
|
|
90
|
-
name: "RACK PARA ROPA DOBLE NEGRO",
|
|
91
|
-
upc: "168462",
|
|
92
|
-
},
|
|
93
|
-
retailers: [
|
|
94
|
-
{
|
|
95
|
-
id: 58,
|
|
96
|
-
name: "The Home Depot Golden",
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
services: {
|
|
100
|
-
datasheets: 1,
|
|
101
|
-
descriptions: 1,
|
|
102
|
-
images: 1,
|
|
103
|
-
},
|
|
104
|
-
statusByRetailer: {
|
|
105
|
-
58: {
|
|
106
|
-
datasheet: "AP",
|
|
107
|
-
description: "AP",
|
|
108
|
-
images: "ACA",
|
|
104
|
+
idCategory: "2249",
|
|
105
|
+
ArticleId: 29457,
|
|
106
|
+
product: [
|
|
107
|
+
{
|
|
108
|
+
articleStatus: "ACA",
|
|
109
|
+
version: 5,
|
|
110
|
+
missing: {},
|
|
111
|
+
article: {
|
|
112
|
+
category:
|
|
113
|
+
"Materiales de Construcción|Impermeabilizantes y Recubrimientos|Selladores",
|
|
114
|
+
company_name: "SIKA MEXICANA S.A. DE C.V.",
|
|
115
|
+
company_id: 383,
|
|
116
|
+
id_category: "2249",
|
|
117
|
+
id_article: 29457,
|
|
118
|
+
name: "SIKA TECHO FRESCO SUPER 15",
|
|
119
|
+
upc: "111187",
|
|
109
120
|
},
|
|
121
|
+
asignations: [],
|
|
122
|
+
retailers: [
|
|
123
|
+
{
|
|
124
|
+
id: 58,
|
|
125
|
+
name: "The Home Depot Golden",
|
|
126
|
+
country: "México",
|
|
127
|
+
id_region: 1,
|
|
128
|
+
active: 1,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: 59,
|
|
132
|
+
name: "The Home Depot Platinum",
|
|
133
|
+
country: "México",
|
|
134
|
+
id_region: 1,
|
|
135
|
+
active: 1,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: 61,
|
|
139
|
+
name: "Home Depot TAB",
|
|
140
|
+
country: "México",
|
|
141
|
+
id_region: 1,
|
|
142
|
+
active: 1,
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
percentage: 33.35,
|
|
146
|
+
retailersAvailable: [
|
|
147
|
+
{
|
|
148
|
+
id: 58,
|
|
149
|
+
name: "The Home Depot Golden",
|
|
150
|
+
country: "México",
|
|
151
|
+
id_region: 1,
|
|
152
|
+
active: 1,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: 59,
|
|
156
|
+
name: "The Home Depot Platinum",
|
|
157
|
+
country: "México",
|
|
158
|
+
id_region: 1,
|
|
159
|
+
active: 1,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 61,
|
|
163
|
+
name: "Home Depot TAB",
|
|
164
|
+
country: "México",
|
|
165
|
+
id_region: 1,
|
|
166
|
+
active: 1,
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
upc: "111187",
|
|
170
|
+
name: "SIKA TECHO FRESCO SUPER 15",
|
|
171
|
+
categoryName:
|
|
172
|
+
"Materiales de Construcción|Impermeabilizantes y Recubrimientos|Selladores",
|
|
173
|
+
id_category: "2249",
|
|
174
|
+
id_article: 29457,
|
|
175
|
+
services: [
|
|
176
|
+
{
|
|
177
|
+
id_article: 29457,
|
|
178
|
+
service: "datasheet",
|
|
179
|
+
quantity: 1,
|
|
180
|
+
price: 0,
|
|
181
|
+
id_user: 1237,
|
|
182
|
+
datasheet_common: null,
|
|
183
|
+
discount: null,
|
|
184
|
+
},
|
|
185
|
+
],
|
|
110
186
|
},
|
|
111
|
-
|
|
112
|
-
id_article: 78773,
|
|
113
|
-
retailersAvailable: [
|
|
114
|
-
{
|
|
115
|
-
id: 58,
|
|
116
|
-
name: "The Home Depot Golden",
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
location: {
|
|
122
|
-
state: { origin: "Contentoh" },
|
|
187
|
+
],
|
|
123
188
|
},
|
|
189
|
+
location: {},
|
|
124
190
|
user: {
|
|
125
191
|
id_user: 1237,
|
|
126
192
|
name: "The Home",
|