contentoh-components-library 21.4.4 → 21.4.5
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/Avatar/index.js +3 -2
- package/dist/components/atoms/CheckBox/index.js +4 -1
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +90 -0
- package/dist/components/atoms/ImageCarousel/index.js +120 -0
- package/dist/components/atoms/ImageCarousel/styles.js +18 -0
- package/dist/components/atoms/PercentTag/PercentTag.stories.js +31 -0
- package/dist/components/atoms/PercentTag/index.js +23 -0
- package/dist/components/atoms/PercentTag/styles.js +22 -0
- package/dist/components/atoms/RatingStars/RatingStars.stories.js +30 -0
- package/dist/components/atoms/RatingStars/index.js +53 -0
- package/dist/components/atoms/RatingStars/styles.js +18 -0
- package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +48 -0
- package/dist/components/atoms/RetailerCatalog/index.js +69 -0
- package/dist/components/atoms/RetailerCatalog/styles.js +20 -0
- package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +33 -0
- package/dist/components/atoms/RetailerOption/index.js +62 -0
- package/dist/components/atoms/RetailerOption/styles.js +20 -0
- package/dist/components/atoms/RetailersList/RetailersList.stories.js +45 -0
- package/dist/components/atoms/RetailersList/index.js +46 -0
- package/dist/components/atoms/RetailersList/styles.js +18 -0
- package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +73 -0
- package/dist/components/atoms/UserCatalog/index.js +101 -0
- package/dist/components/atoms/UserCatalog/styles.js +18 -0
- package/dist/components/atoms/UserOption/UserOption.stories.js +40 -0
- package/dist/components/atoms/UserOption/index.js +130 -0
- package/dist/components/atoms/UserOption/styles.js +20 -0
- package/dist/components/atoms/UserSelector/UserSelector.stories.js +40 -0
- package/dist/components/atoms/UserSelector/index.js +98 -0
- package/dist/components/atoms/UserSelector/styles.js +32 -0
- package/dist/components/molecules/GridItem/GridItem.stories.js +123 -0
- package/dist/components/molecules/GridItem/index.js +143 -0
- package/dist/components/molecules/GridItem/styles.js +20 -0
- package/dist/components/molecules/HeaderItem/ColumnItem.js +23 -0
- package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +70 -0
- package/dist/components/molecules/HeaderItem/index.js +42 -0
- package/dist/components/molecules/HeaderItem/styles.js +30 -0
- package/dist/components/molecules/RowItem/ColumnItem.js +23 -0
- package/dist/components/molecules/RowItem/RowItem.stories.js +5242 -0
- package/dist/components/molecules/RowItem/index.js +58 -0
- package/dist/components/molecules/RowItem/styles.js +30 -0
- package/dist/components/organisms/GridProducts/GridProducts.stories.js +5097 -0
- package/dist/components/organisms/GridProducts/index.js +63 -0
- package/dist/components/organisms/GridProducts/styles.js +18 -0
- package/dist/components/organisms/GridProducts/utils.js +149 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +41 -28
- package/dist/components/pages/RetailerProductEdition/index.js +23 -0
- package/dist/index.js +201 -58
- package/package.json +2 -1
- package/src/components/atoms/Avatar/index.js +8 -2
- package/src/components/atoms/CheckBox/index.js +2 -1
- package/src/components/atoms/CheckBox/styles.js +2 -0
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +76 -0
- package/src/components/atoms/ImageCarousel/index.js +103 -0
- package/src/components/atoms/ImageCarousel/styles.js +79 -0
- package/src/components/atoms/PercentTag/PercentTag.stories.js +7 -0
- package/src/components/atoms/PercentTag/index.js +9 -0
- package/src/components/atoms/PercentTag/styles.js +69 -0
- package/src/components/atoms/RatingStars/RatingStars.stories.js +10 -0
- package/src/components/atoms/RatingStars/index.js +31 -0
- package/src/components/atoms/RatingStars/styles.js +28 -0
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +36 -0
- package/src/components/atoms/RetailerCatalog/index.js +49 -0
- package/src/components/atoms/RetailerCatalog/styles.js +30 -0
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +15 -0
- package/src/components/atoms/RetailerOption/index.js +53 -0
- package/src/components/atoms/RetailerOption/styles.js +41 -0
- package/src/components/atoms/RetailersList/RetailersList.stories.js +33 -0
- package/src/components/atoms/RetailersList/index.js +20 -0
- package/src/components/atoms/RetailersList/styles.js +19 -0
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +67 -0
- package/src/components/atoms/UserCatalog/index.js +94 -0
- package/src/components/atoms/UserCatalog/styles.js +24 -0
- package/src/components/atoms/UserOption/UserOption.stories.js +25 -0
- package/src/components/atoms/UserOption/index.js +95 -0
- package/src/components/atoms/UserOption/styles.js +61 -0
- package/src/components/atoms/UserSelector/UserSelector.stories.js +25 -0
- package/src/components/atoms/UserSelector/index.js +86 -0
- package/src/components/atoms/UserSelector/styles.js +55 -0
- package/src/components/molecules/GridItem/GridItem.stories.js +126 -0
- package/src/components/molecules/GridItem/index.js +97 -0
- package/src/components/molecules/GridItem/styles.js +104 -0
- package/src/components/molecules/HeaderItem/ColumnItem.js +9 -0
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +24 -0
- package/src/components/molecules/HeaderItem/index.js +26 -0
- package/src/components/molecules/HeaderItem/styles.js +27 -0
- package/src/components/molecules/RowItem/ColumnItem.js +9 -0
- package/src/components/molecules/RowItem/RowItem.stories.js +5660 -0
- package/src/components/molecules/RowItem/index.js +45 -0
- package/src/components/molecules/RowItem/styles.js +40 -0
- package/src/components/organisms/GridProducts/GridProducts.stories.js +5485 -0
- package/src/components/organisms/GridProducts/index.js +50 -0
- package/src/components/organisms/GridProducts/styles.js +15 -0
- package/src/components/organisms/GridProducts/utils.js +111 -0
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +39 -21
- package/src/components/pages/RetailerProductEdition/index.js +12 -0
- package/src/index.js +12 -0
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GridProducts = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var _GridItem = require("../../molecules/GridItem");
|
|
11
|
+
|
|
12
|
+
var _HeaderItem = require("../../molecules/HeaderItem");
|
|
13
|
+
|
|
14
|
+
var _RowItem = require("../../molecules/RowItem");
|
|
15
|
+
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
|
|
18
|
+
var GridProducts = function GridProducts(_ref) {
|
|
19
|
+
var _ref$products = _ref.products,
|
|
20
|
+
products = _ref$products === void 0 ? [] : _ref$products,
|
|
21
|
+
_ref$columnsArray = _ref.columnsArray,
|
|
22
|
+
columnsArray = _ref$columnsArray === void 0 ? [] : _ref$columnsArray,
|
|
23
|
+
_ref$gridView = _ref.gridView,
|
|
24
|
+
gridView = _ref$gridView === void 0 ? true : _ref$gridView,
|
|
25
|
+
chkOnChange = _ref.chkOnChange,
|
|
26
|
+
_ref$selected = _ref.selected,
|
|
27
|
+
selected = _ref$selected === void 0 ? [] : _ref$selected,
|
|
28
|
+
chkChecked = _ref.chkChecked,
|
|
29
|
+
checkAll = _ref.checkAll,
|
|
30
|
+
chkCheckedAll = _ref.chkCheckedAll,
|
|
31
|
+
onGridClick = _ref.onGridClick;
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
33
|
+
children: !gridView ? products === null || products === void 0 ? void 0 : products.map(function (_ref2, i) {
|
|
34
|
+
var gridElement = _ref2.gridElement,
|
|
35
|
+
product = _ref2.product,
|
|
36
|
+
id = _ref2.id;
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridItem.GridItem, {
|
|
38
|
+
id: id,
|
|
39
|
+
index: i,
|
|
40
|
+
product: product,
|
|
41
|
+
gridElement: gridElement,
|
|
42
|
+
chkOnChange: chkOnChange,
|
|
43
|
+
onGridClick: onGridClick,
|
|
44
|
+
selected: selected,
|
|
45
|
+
chkChecked: chkChecked
|
|
46
|
+
}, i);
|
|
47
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
48
|
+
className: "table-view",
|
|
49
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderItem.HeaderItem, {
|
|
50
|
+
columnsArray: columnsArray,
|
|
51
|
+
checkAll: checkAll,
|
|
52
|
+
chkCheckedAll: chkCheckedAll
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowItem.RowItem, {
|
|
54
|
+
productsArray: products,
|
|
55
|
+
chkOnChange: chkOnChange,
|
|
56
|
+
onGridClick: onGridClick,
|
|
57
|
+
chkChecked: chkChecked
|
|
58
|
+
})]
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
exports.GridProducts = GridProducts;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _templateObject;
|
|
15
|
+
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n height: 100%;\n overflow: auto;\n padding: 20px;\n\n .table-view {\n height: 100%;\n width: 100%;\n }\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getProductsToTable = void 0;
|
|
7
|
+
|
|
8
|
+
var _RetailerCatalog = require("../../atoms/RetailerCatalog");
|
|
9
|
+
|
|
10
|
+
var _UserCatalog = require("../../atoms/UserCatalog");
|
|
11
|
+
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
|
|
14
|
+
var getProductsToTable = function getProductsToTable() {
|
|
15
|
+
var products = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
16
|
+
var textSpecialists = arguments.length > 1 ? arguments[1] : undefined;
|
|
17
|
+
var imagesSpecialists = arguments.length > 2 ? arguments[2] : undefined;
|
|
18
|
+
var auditors = arguments.length > 3 ? arguments[3] : undefined;
|
|
19
|
+
var images = arguments.length > 4 ? arguments[4] : undefined;
|
|
20
|
+
var onAssign = arguments.length > 5 ? arguments[5] : undefined;
|
|
21
|
+
var productsTableArray = [];
|
|
22
|
+
products.forEach(function (product) {
|
|
23
|
+
var article = product.article,
|
|
24
|
+
orderId = product.orderId,
|
|
25
|
+
upc = product.upc,
|
|
26
|
+
status = product.status,
|
|
27
|
+
version = product.version;
|
|
28
|
+
var id = (article === null || article === void 0 ? void 0 : article.id_article) + "-" + orderId;
|
|
29
|
+
var imgArray = images[(article === null || article === void 0 ? void 0 : article.id_article) + "-" + version];
|
|
30
|
+
var element = {
|
|
31
|
+
id: id,
|
|
32
|
+
cols: [{
|
|
33
|
+
name: (article === null || article === void 0 ? void 0 : article.country) || "-",
|
|
34
|
+
flex: 1,
|
|
35
|
+
minWidth: 100
|
|
36
|
+
}, {
|
|
37
|
+
name: orderId || "-",
|
|
38
|
+
flex: 1,
|
|
39
|
+
minWidth: 100
|
|
40
|
+
}, {
|
|
41
|
+
name: upc || "-",
|
|
42
|
+
flex: 1,
|
|
43
|
+
minWidth: 100
|
|
44
|
+
}, {
|
|
45
|
+
name: (article === null || article === void 0 ? void 0 : article.name) || "-",
|
|
46
|
+
flex: 1,
|
|
47
|
+
minWidth: 200
|
|
48
|
+
}, {
|
|
49
|
+
name: "S/M" || "-",
|
|
50
|
+
flex: 1,
|
|
51
|
+
minWidth: 100
|
|
52
|
+
}, {
|
|
53
|
+
name: status || "-",
|
|
54
|
+
flex: 1,
|
|
55
|
+
minWidth: 100
|
|
56
|
+
}, {
|
|
57
|
+
name: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailerCatalog.RetailerCatalog, {
|
|
58
|
+
id: "retailers-" + id,
|
|
59
|
+
article: product,
|
|
60
|
+
retailers: product.retailers
|
|
61
|
+
}),
|
|
62
|
+
flex: 1,
|
|
63
|
+
minWidth: 100
|
|
64
|
+
}, {
|
|
65
|
+
name: product.prio,
|
|
66
|
+
flex: 1,
|
|
67
|
+
minWidth: 100
|
|
68
|
+
}, {
|
|
69
|
+
name: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserCatalog.UserCatalog, {
|
|
70
|
+
datasheet: article.id_datasheet_especialist,
|
|
71
|
+
description: article.id_description_especialist,
|
|
72
|
+
images: article.id_images_especialist,
|
|
73
|
+
auditor: article.id_auditor,
|
|
74
|
+
textSpecialists: textSpecialists,
|
|
75
|
+
imagesSpecialists: imagesSpecialists,
|
|
76
|
+
auditors: auditors,
|
|
77
|
+
id: "users-" + id,
|
|
78
|
+
product: product,
|
|
79
|
+
onAssign: onAssign
|
|
80
|
+
}),
|
|
81
|
+
flex: 1,
|
|
82
|
+
minWidth: 100
|
|
83
|
+
}, {
|
|
84
|
+
name: "Cont.",
|
|
85
|
+
flex: 1,
|
|
86
|
+
minWidth: 100
|
|
87
|
+
}],
|
|
88
|
+
gridElement: {
|
|
89
|
+
images: imgArray,
|
|
90
|
+
info: [{
|
|
91
|
+
title: "name",
|
|
92
|
+
value: (article === null || article === void 0 ? void 0 : article.name) || "-"
|
|
93
|
+
}, {
|
|
94
|
+
title: "order",
|
|
95
|
+
value: orderId || "-"
|
|
96
|
+
}, {
|
|
97
|
+
title: "category",
|
|
98
|
+
value: (article === null || article === void 0 ? void 0 : article.category) || "-"
|
|
99
|
+
}, {
|
|
100
|
+
title: "company",
|
|
101
|
+
value: (article === null || article === void 0 ? void 0 : article.company_name) || "-"
|
|
102
|
+
}, {
|
|
103
|
+
title: "price",
|
|
104
|
+
value: (article === null || article === void 0 ? void 0 : article.price) || "-"
|
|
105
|
+
}],
|
|
106
|
+
status: [{
|
|
107
|
+
title: "datasheet",
|
|
108
|
+
value: product === null || product === void 0 ? void 0 : product.datasheet_status,
|
|
109
|
+
percent: 80
|
|
110
|
+
}, {
|
|
111
|
+
title: "description",
|
|
112
|
+
value: product === null || product === void 0 ? void 0 : product.description_status,
|
|
113
|
+
percent: 80
|
|
114
|
+
}, {
|
|
115
|
+
title: "images",
|
|
116
|
+
value: product === null || product === void 0 ? void 0 : product.images_status,
|
|
117
|
+
percent: 80
|
|
118
|
+
}],
|
|
119
|
+
catalogs: {
|
|
120
|
+
leftSide: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailerCatalog.RetailerCatalog, {
|
|
121
|
+
id: "retailers-" + id,
|
|
122
|
+
limit: 2,
|
|
123
|
+
article: product,
|
|
124
|
+
retailers: product.retailers
|
|
125
|
+
}),
|
|
126
|
+
rightSide: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserCatalog.UserCatalog, {
|
|
127
|
+
datasheet: article.id_datasheet_especialist,
|
|
128
|
+
description: article.id_description_especialist,
|
|
129
|
+
images: article.id_images_especialist,
|
|
130
|
+
auditor: article.id_auditor,
|
|
131
|
+
textSpecialists: textSpecialists,
|
|
132
|
+
imagesSpecialists: imagesSpecialists,
|
|
133
|
+
auditors: auditors,
|
|
134
|
+
id: "users-" + id,
|
|
135
|
+
product: product,
|
|
136
|
+
onAssign: onAssign
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
showBottom: true,
|
|
141
|
+
product: product,
|
|
142
|
+
article: article
|
|
143
|
+
};
|
|
144
|
+
productsTableArray.push(element);
|
|
145
|
+
});
|
|
146
|
+
return productsTableArray;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
exports.getProductsToTable = getProductsToTable;
|
|
@@ -7,12 +7,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.RetailerProductEditionDefault = void 0;
|
|
9
9
|
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
11
|
+
|
|
10
12
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
13
|
|
|
12
14
|
var _index = require("./index");
|
|
13
15
|
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
|
|
18
|
+
var _productSelected;
|
|
19
|
+
|
|
16
20
|
var _default = {
|
|
17
21
|
title: "Components/pages/RetailerProductEdition",
|
|
18
22
|
component: _index.RetailerProductEdition
|
|
@@ -32,7 +36,7 @@ RetailerProductEditionDefault.args = {
|
|
|
32
36
|
Imágenes: false
|
|
33
37
|
},
|
|
34
38
|
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI5OGE0NzYxMy04ZGIyLTRlZjUtYjA0Mi01ZDU3MWRkZjIwMWIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4Mzg3NTIyNiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4Mzg3ODgyNiwiaWF0IjoxNjgzODc1MjI2LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.EtgmT_THMx-Zy_zB5yZK4gz6TXNTVVJEKFt5X0JK2UkGVrp_q_92YCEuejS4n976fyTez0jkwOee6IkVHLV71uZWRBDFt-3Yw4ZxfsZYPNJWhoHXGNxhMU8MCkSntfu597esBTk-VsUpstT5R7L-WJfN8viE7R-qVo-42RlPTG0TFrWA9q0oTcqjv8vbxLpOBUjiEpjmqRhg4blJZwgkGNta6MOlw1vfmisOVbo9wMvqwnCZ9xx9KMKoH9U4uNObK_JomjbvPmTmkcUXsE-wGSD7XcoSwtuhBngLC7-jiu1u8MvL_ff5Z0Qp70sSpLdUglcSS8d1Xf7j_fcZuJ5jKA",
|
|
35
|
-
productSelected: {
|
|
39
|
+
productSelected: (_productSelected = {
|
|
36
40
|
orderId: 14606,
|
|
37
41
|
status: "RA",
|
|
38
42
|
datasheet_status: "RA",
|
|
@@ -66,33 +70,42 @@ RetailerProductEditionDefault.args = {
|
|
|
66
70
|
description: "RA/AC",
|
|
67
71
|
images: "RA/AC"
|
|
68
72
|
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
73
|
+
}
|
|
74
|
+
}, (0, _defineProperty2.default)(_productSelected, "orderId", 15209), (0, _defineProperty2.default)(_productSelected, "status", "ACA"), (0, _defineProperty2.default)(_productSelected, "datasheet_status", "ACA"), (0, _defineProperty2.default)(_productSelected, "prio", "none"), (0, _defineProperty2.default)(_productSelected, "version", 3), (0, _defineProperty2.default)(_productSelected, "description_status", "ACA"), (0, _defineProperty2.default)(_productSelected, "images_status", "ACA"), (0, _defineProperty2.default)(_productSelected, "statusByRetailer", {
|
|
75
|
+
70: {
|
|
76
|
+
datasheet: "ACA",
|
|
77
|
+
description: "ACA",
|
|
78
|
+
images: "ACA"
|
|
79
|
+
}
|
|
80
|
+
}), (0, _defineProperty2.default)(_productSelected, "article", {
|
|
81
|
+
id_article: 39390,
|
|
82
|
+
id_category: "4311",
|
|
83
|
+
name: "test demo 1",
|
|
84
|
+
upc: "2312312313",
|
|
85
|
+
timestamp: "2023-05-12T20:07:42.000Z",
|
|
86
|
+
id_user: 133,
|
|
87
|
+
status: "NULL",
|
|
88
|
+
active: 1,
|
|
89
|
+
company_id: 912,
|
|
90
|
+
company_name: "GRUPO BRAHMA",
|
|
91
|
+
country: "México",
|
|
92
|
+
id_order: 15209,
|
|
93
|
+
id_datasheet_especialist: 232,
|
|
94
|
+
id_datasheet_facilitator: 52,
|
|
95
|
+
id_description_especialist: 232,
|
|
96
|
+
id_description_facilitator: 52,
|
|
97
|
+
id_images_especialist: 196,
|
|
98
|
+
id_images_facilitator: 53,
|
|
99
|
+
id_auditor: 195,
|
|
100
|
+
id_recepcionist: null,
|
|
101
|
+
category: "Ropa Interior Dama|Ropa Interior|Ropa Interior",
|
|
102
|
+
missingAttributes: 0,
|
|
103
|
+
missingDescriptions: 0,
|
|
104
|
+
missingImages: 0
|
|
105
|
+
}), (0, _defineProperty2.default)(_productSelected, "retailers", [{
|
|
106
|
+
id: 70,
|
|
107
|
+
name: "Bodega Aurrera"
|
|
108
|
+
}]), _productSelected),
|
|
96
109
|
location: {
|
|
97
110
|
product: {
|
|
98
111
|
articleId: 354,
|
|
@@ -487,6 +487,21 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
487
487
|
valRejAll = _useState84[0],
|
|
488
488
|
setValRejAll = _useState84[1];
|
|
489
489
|
|
|
490
|
+
var _useState85 = (0, _react.useState)([]),
|
|
491
|
+
_useState86 = (0, _slicedToArray2.default)(_useState85, 2),
|
|
492
|
+
desc = _useState86[0],
|
|
493
|
+
setDesc = _useState86[1];
|
|
494
|
+
|
|
495
|
+
var _useState87 = (0, _react.useState)([]),
|
|
496
|
+
_useState88 = (0, _slicedToArray2.default)(_useState87, 2),
|
|
497
|
+
fich = _useState88[0],
|
|
498
|
+
setFich = _useState88[1];
|
|
499
|
+
|
|
500
|
+
var _useState89 = (0, _react.useState)([]),
|
|
501
|
+
_useState90 = (0, _slicedToArray2.default)(_useState89, 2),
|
|
502
|
+
imag = _useState90[0],
|
|
503
|
+
setImag = _useState90[1];
|
|
504
|
+
|
|
490
505
|
(0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
491
506
|
var _ref3, id_article;
|
|
492
507
|
|
|
@@ -1023,6 +1038,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1023
1038
|
};
|
|
1024
1039
|
});
|
|
1025
1040
|
setSocketType(imageInputs);
|
|
1041
|
+
console.log(images);
|
|
1026
1042
|
}, [images]);
|
|
1027
1043
|
var updateImages = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
1028
1044
|
var _images$values3, _images$attrForImgs, _product$article14, _data$articleData, _data$articleData2, _data$updateImages;
|
|
@@ -1786,6 +1802,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1786
1802
|
};
|
|
1787
1803
|
|
|
1788
1804
|
(0, _react.useEffect)(function () {
|
|
1805
|
+
console.log(servicesData, "servicesData");
|
|
1789
1806
|
var status = getRetailerStatus(servicesData, activeTab);
|
|
1790
1807
|
setRetailerStatus(status);
|
|
1791
1808
|
}, [activeTab, servicesData, activeRetailer]);
|
|
@@ -1972,6 +1989,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1972
1989
|
isRetailer: isRetailer,
|
|
1973
1990
|
showSaveButton: auditorAssigned() || userAssigned(),
|
|
1974
1991
|
version: version,
|
|
1992
|
+
desc: desc,
|
|
1993
|
+
setDesc: setDesc,
|
|
1994
|
+
fich: fich,
|
|
1995
|
+
setFich: setFich,
|
|
1996
|
+
imag: imag,
|
|
1997
|
+
setImag: setImag,
|
|
1975
1998
|
updatedDescriptions: updatedDescriptions,
|
|
1976
1999
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
1977
2000
|
updatedDatasheets: updatedDatasheets,
|