contentoh-components-library 21.1.57 → 21.1.59
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/dist/components/atoms/GeneralInput/index.js +1 -0
- package/dist/components/molecules/HeaderTop/index.js +1 -4
- package/dist/components/molecules/RetailerSelector/index.js +0 -32
- package/dist/components/molecules/StatusAsignationInfo/index.js +2 -3
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
- package/dist/components/organisms/FullTabsMenu/index.js +1 -3
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +65 -115
- package/dist/components/pages/ProviderProductEdition/index.js +382 -333
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +86 -41
- package/dist/components/pages/RetailerProductEdition/index.js +210 -198
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +10 -9
- package/dist/index.js +0 -13
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +1 -0
- package/src/components/atoms/StatusTag/StatusTag.stories.js +28 -0
- package/src/components/molecules/HeaderTop/index.js +1 -6
- package/src/components/molecules/RetailerSelector/index.js +0 -15
- package/src/components/molecules/StatusAsignationInfo/index.js +2 -3
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/FullTabsMenu/index.js +0 -2
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +71 -133
- package/src/components/pages/ProviderProductEdition/index.js +222 -208
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +87 -38
- package/src/components/pages/RetailerProductEdition/index.js +140 -166
- package/src/components/pages/RetailerProductEdition/styles.js +1 -1
- package/src/global-files/data.js +10 -9
- package/src/index.js +0 -1
|
@@ -65,6 +65,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
65
65
|
if ((optionList === null || optionList === void 0 ? void 0 : optionList.length) > 0) {
|
|
66
66
|
var index = evt.target.selectedIndex;
|
|
67
67
|
var valueSelected = evt.target.value;
|
|
68
|
+
console.log(valueSelected);
|
|
68
69
|
generalValue = valueSelected;
|
|
69
70
|
setTextValue({
|
|
70
71
|
value: generalValue
|
|
@@ -26,10 +26,7 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
26
26
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
27
27
|
text: "Edici\xF3n de producto"
|
|
28
28
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
29
|
-
buttonType: "close-button"
|
|
30
|
-
onClick: function onClick() {
|
|
31
|
-
window.location.href = "/products";
|
|
32
|
-
}
|
|
29
|
+
buttonType: "close-button"
|
|
33
30
|
})]
|
|
34
31
|
});
|
|
35
32
|
};
|
|
@@ -7,10 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.RetailerSelector = void 0;
|
|
9
9
|
|
|
10
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
-
|
|
12
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
13
|
-
|
|
14
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
15
11
|
|
|
16
12
|
var _styles = require("./styles");
|
|
@@ -43,39 +39,11 @@ var RetailerSelector = function RetailerSelector(_ref) {
|
|
|
43
39
|
}
|
|
44
40
|
};
|
|
45
41
|
|
|
46
|
-
var getRetailerImage = /*#__PURE__*/function () {
|
|
47
|
-
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
48
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
49
|
-
while (1) {
|
|
50
|
-
switch (_context.prev = _context.next) {
|
|
51
|
-
case 0:
|
|
52
|
-
console.log("https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png"));
|
|
53
|
-
activeRetailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png");
|
|
54
|
-
retailers.forEach(function (retailer) {
|
|
55
|
-
return retailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(retailer.id, ".png");
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
case 3:
|
|
59
|
-
case "end":
|
|
60
|
-
return _context.stop();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}, _callee);
|
|
64
|
-
}));
|
|
65
|
-
|
|
66
|
-
return function getRetailerImage() {
|
|
67
|
-
return _ref2.apply(this, arguments);
|
|
68
|
-
};
|
|
69
|
-
}();
|
|
70
|
-
|
|
71
42
|
(0, _react.useEffect)(function () {
|
|
72
43
|
if (retailersPanel) {
|
|
73
44
|
document.addEventListener("click", closeRetailersPanel, false);
|
|
74
45
|
}
|
|
75
46
|
}, [retailersPanel]);
|
|
76
|
-
(0, _react.useEffect)(function () {
|
|
77
|
-
getRetailerImage();
|
|
78
|
-
}, [activeRetailer]);
|
|
79
47
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
80
48
|
id: "retailers-assignation",
|
|
81
49
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
|
|
@@ -54,8 +54,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
54
54
|
_ref$id = _ref.id,
|
|
55
55
|
id = _ref$id === void 0 ? "default-id" : _ref$id,
|
|
56
56
|
onClickSave = _ref.onClickSave,
|
|
57
|
-
showSaveButton = _ref.showSaveButton
|
|
58
|
-
canAssign = _ref.canAssign;
|
|
57
|
+
showSaveButton = _ref.showSaveButton;
|
|
59
58
|
|
|
60
59
|
var _useState = (0, _react.useState)(false),
|
|
61
60
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -147,7 +146,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
147
146
|
color: "#969696",
|
|
148
147
|
fontFamily: "Avenir Next",
|
|
149
148
|
headerType: "input-name-header"
|
|
150
|
-
}), showAsignationPanel &&
|
|
149
|
+
}), showAsignationPanel && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
151
150
|
className: "asignation-panel",
|
|
152
151
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
153
152
|
className: "asignation-header",
|
|
@@ -47,7 +47,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
47
47
|
var element = [];
|
|
48
48
|
servicesData.forEach(function (sd) {
|
|
49
49
|
if (sd.id_retailer === rt.id) {
|
|
50
|
-
element.push(sd.status ? sd.status : "
|
|
50
|
+
element.push(sd.status ? sd.status : "R");
|
|
51
51
|
} else element.push("NA");
|
|
52
52
|
|
|
53
53
|
rt["services"] = element;
|
|
@@ -32,8 +32,7 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
32
32
|
downloadImages = _ref.downloadImages,
|
|
33
33
|
askToDeleteImages = _ref.askToDeleteImages,
|
|
34
34
|
onClickSave = _ref.onClickSave,
|
|
35
|
-
showSaveButton = _ref.showSaveButton
|
|
36
|
-
canAssign = _ref.canAssign;
|
|
35
|
+
showSaveButton = _ref.showSaveButton;
|
|
37
36
|
|
|
38
37
|
var _useState = (0, _react.useState)(false),
|
|
39
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -46,7 +45,6 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
46
45
|
setImagesSection: setImagesSection,
|
|
47
46
|
setActiveTab: setActiveTab
|
|
48
47
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusAsignationInfo, {
|
|
49
|
-
canAssign: canAssign,
|
|
50
48
|
status: status,
|
|
51
49
|
activeTab: activeTab,
|
|
52
50
|
setImageLayout: setImageLayout,
|
|
@@ -31,115 +31,65 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,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oHcpQW-K_KOoVqsBfK6zZ5iVOa8UbFtBEjFnhhvJ76xxpDfpsZ7ywTdIN0618qA-GlG99sbmnG0es_2gwADB9awSyRL0-zEJyNmlPeUcrK59RI6VVQGey8mzUUvBbebeV_4NfkAt_wvBuYcVUMMSadnbw86l4fbHX9k3um_00hhwJd4wS8OYRGW2b8QsiRl7S9ocxuLwVdGRxcGEK2xFjJwIW2YPMe9IMY8euK59-Gl2rLFo2TgkR9lQMpSJOhd9Ujl-8zbsqY-Pc2wK9OmndhzlQaw2upmitFapGi2SStvT4DWP4NxvGsAZX8nmqWhf5iXeM7OSbCg",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
id_article: 76125,
|
|
40
|
+
id_category: "682",
|
|
41
|
+
name: "prueba 11",
|
|
42
|
+
upc: "35646655",
|
|
43
|
+
timestamp: "2022-07-01T16:21:23.000Z",
|
|
44
|
+
status: "NULL",
|
|
45
|
+
categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
|
|
46
|
+
asignations: [],
|
|
45
47
|
version: 2,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
version_status: "R",
|
|
49
|
+
retailersAvailable: [{
|
|
50
|
+
id: 2,
|
|
51
|
+
name: "Walmart Mercancías Generales",
|
|
50
52
|
country: "México",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
|
|
54
|
-
upc: "145582"
|
|
55
|
-
},
|
|
56
|
-
retailers: [{
|
|
57
|
-
id: 58,
|
|
58
|
-
name: "The Home Depot Golden"
|
|
59
|
-
}, {
|
|
60
|
-
id: 59,
|
|
61
|
-
name: "The Home Depot Platinum"
|
|
53
|
+
id_region: 1,
|
|
54
|
+
active: 1
|
|
62
55
|
}, {
|
|
63
|
-
id:
|
|
64
|
-
name: "
|
|
56
|
+
id: 3,
|
|
57
|
+
name: "Sam´s Club",
|
|
58
|
+
country: "México",
|
|
59
|
+
id_region: 1,
|
|
60
|
+
active: 1
|
|
65
61
|
}, {
|
|
66
|
-
id:
|
|
67
|
-
name: "
|
|
62
|
+
id: 5,
|
|
63
|
+
name: "Chedraui",
|
|
64
|
+
country: "México",
|
|
65
|
+
id_region: 1,
|
|
66
|
+
active: 1
|
|
68
67
|
}],
|
|
69
|
-
|
|
70
|
-
datasheets: 1,
|
|
71
|
-
descriptions: 1,
|
|
72
|
-
images: 1
|
|
73
|
-
},
|
|
74
|
-
id_article: 55118,
|
|
75
|
-
retailersAvailable: [{
|
|
76
|
-
id: 58,
|
|
77
|
-
name: "The Home Depot Golden"
|
|
78
|
-
}, {
|
|
79
|
-
id: 59,
|
|
80
|
-
name: "The Home Depot Platinum"
|
|
81
|
-
}, {
|
|
82
|
-
id: 60,
|
|
83
|
-
name: "The Home Depot Resizing"
|
|
84
|
-
}, {
|
|
85
|
-
id: 61,
|
|
86
|
-
name: "Home Depot TAB"
|
|
87
|
-
}]
|
|
68
|
+
missing: {}
|
|
88
69
|
},
|
|
89
70
|
productToEdit: {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
product: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
company_name: "THD Proveedor",
|
|
104
|
-
country: "México",
|
|
105
|
-
id_category: "2143",
|
|
106
|
-
id_article: 55118,
|
|
107
|
-
name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
|
|
108
|
-
upc: "145582"
|
|
109
|
-
},
|
|
110
|
-
retailers: [{
|
|
111
|
-
id: 58,
|
|
112
|
-
name: "The Home Depot Golden"
|
|
113
|
-
}, {
|
|
114
|
-
id: 59,
|
|
115
|
-
name: "The Home Depot Platinum"
|
|
116
|
-
}, {
|
|
117
|
-
id: 60,
|
|
118
|
-
name: "The Home Depot Resizing"
|
|
119
|
-
}, {
|
|
120
|
-
id: 61,
|
|
121
|
-
name: "Home Depot TAB"
|
|
122
|
-
}],
|
|
123
|
-
services: {
|
|
124
|
-
datasheets: 1,
|
|
125
|
-
descriptions: 1,
|
|
126
|
-
images: 1
|
|
127
|
-
},
|
|
128
|
-
id_article: 55118,
|
|
71
|
+
idCategory: "3028",
|
|
72
|
+
ArticleId: 76175,
|
|
73
|
+
product: [{
|
|
74
|
+
id_article: 76175,
|
|
75
|
+
id_category: "3028",
|
|
76
|
+
name: "Producto 1 C",
|
|
77
|
+
upc: "18072021",
|
|
78
|
+
timestamp: "2022-07-18T19:25:34.000Z",
|
|
79
|
+
status: "NULL",
|
|
80
|
+
categoryName: "Eléctrico|Casa Inteligente|Asistentes Inteligentes",
|
|
81
|
+
asignations: [],
|
|
82
|
+
version: 1,
|
|
83
|
+
version_status: null,
|
|
129
84
|
retailersAvailable: [{
|
|
130
85
|
id: 58,
|
|
131
|
-
name: "The Home Depot Golden"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}, {
|
|
139
|
-
id: 61,
|
|
140
|
-
name: "Home Depot TAB"
|
|
141
|
-
}]
|
|
142
|
-
}
|
|
86
|
+
name: "The Home Depot Golden",
|
|
87
|
+
country: "México",
|
|
88
|
+
id_region: 1,
|
|
89
|
+
active: 1
|
|
90
|
+
}],
|
|
91
|
+
missing: {}
|
|
92
|
+
}]
|
|
143
93
|
},
|
|
144
94
|
location: {
|
|
145
95
|
product: {
|
|
@@ -147,40 +97,40 @@ ProviderProductEditionDefault.args = {
|
|
|
147
97
|
versionId: 3
|
|
148
98
|
},
|
|
149
99
|
state: {
|
|
150
|
-
origin: "
|
|
100
|
+
origin: "RequestWithContentoh"
|
|
151
101
|
}
|
|
152
102
|
},
|
|
153
103
|
user: {
|
|
154
|
-
id_user:
|
|
155
|
-
name: "
|
|
156
|
-
last_name: "
|
|
157
|
-
email: "
|
|
158
|
-
position: "Admin",
|
|
104
|
+
id_user: 28,
|
|
105
|
+
name: "Proveedor",
|
|
106
|
+
last_name: "Colgate",
|
|
107
|
+
email: "ilopez@contentoh.com",
|
|
108
|
+
position: "Prueba Admin",
|
|
159
109
|
telephone: "+523111366336",
|
|
160
110
|
country: "México",
|
|
161
|
-
id_company:
|
|
162
|
-
id_cognito: "
|
|
111
|
+
id_company: 1,
|
|
112
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
163
113
|
birth_Date: null,
|
|
164
114
|
about_me: null,
|
|
165
115
|
zip_code: null,
|
|
166
116
|
address: null,
|
|
167
117
|
job: null,
|
|
168
|
-
id_stripe: "",
|
|
118
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
169
119
|
id_role: 0,
|
|
170
120
|
active: 1,
|
|
171
121
|
is_retailer: 0,
|
|
172
|
-
email_notify:
|
|
122
|
+
email_notify: 0,
|
|
173
123
|
membership: {
|
|
174
|
-
id:
|
|
175
|
-
start_date: "
|
|
176
|
-
end_date: "
|
|
177
|
-
planID:
|
|
178
|
-
plan: "
|
|
179
|
-
name: "Plan
|
|
180
|
-
user_limit: "
|
|
181
|
-
products_limit: "
|
|
124
|
+
id: 76,
|
|
125
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
126
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
127
|
+
planID: 8,
|
|
128
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
129
|
+
name: "Plan Pro",
|
|
130
|
+
user_limit: "20",
|
|
131
|
+
products_limit: "5000",
|
|
182
132
|
type: "Enterprise"
|
|
183
133
|
},
|
|
184
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
134
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1658189942624"
|
|
185
135
|
}
|
|
186
136
|
};
|