contentoh-components-library 21.4.62 → 21.4.64
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/assets/fonts/roboto/LICENSE.txt +202 -0
- package/dist/components/atoms/Avatar/index.js +3 -2
- 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/InputFormatter/styles.js +1 -1
- 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/SliderToolTip/styles.js +1 -1
- 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/BoxAttribute/index.js +3 -3
- package/dist/components/molecules/BoxAttribute/styles.js +1 -1
- package/dist/components/molecules/BoxButtons/index.js +0 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/GridItem/GridItem.stories.js +123 -0
- package/dist/components/molecules/GridItem/index.js +152 -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/HeaderTop/index.js +68 -11
- 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/molecules/SignInLogin/index.js +36 -28
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/dist/components/organisms/Chat/Chat.stories.js +27 -8
- package/dist/components/organisms/Chat/ContainerItems/index.js +19 -3
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +350 -197
- package/dist/components/organisms/Chat/Footer/index.js +48 -39
- package/dist/components/organisms/Chat/index.js +49 -4
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/DashboardMetric/index.js +12 -6
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- 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/organisms/InputGroup/index.js +1 -10
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/pages/Dashboard/Dashboard.stories.js +33 -36
- package/dist/components/pages/Dashboard/index.js +35 -8
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +3 -3
- package/dist/components/pages/ProviderProductEdition/index.js +120 -144
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +7 -3
- package/dist/components/pages/RetailerProductEdition/index.js +276 -274
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/global-files/data.js +11 -3
- package/dist/global-files/variables.js +5 -1
- 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/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/InputFormatter/styles.js +2 -1
- 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/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/TabSection/styles.js +1 -1
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +67 -0
- package/src/components/atoms/UserCatalog/index.js +100 -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/BoxAttribute/index.js +32 -25
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +23 -22
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/GridItem/GridItem.stories.js +126 -0
- package/src/components/molecules/GridItem/index.js +105 -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/HeaderTop/index.js +52 -6
- 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/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/src/components/molecules/TagAndInput/index.js +6 -5
- package/src/components/organisms/Chat/Chat.stories.js +27 -7
- package/src/components/organisms/Chat/ContainerItems/index.js +18 -2
- package/src/components/organisms/Chat/ContainerItems/styles.js +14 -2
- package/src/components/organisms/Chat/ContentChat/index.js +88 -12
- package/src/components/organisms/Chat/Footer/index.js +11 -0
- package/src/components/organisms/Chat/index.js +46 -4
- package/src/components/organisms/Chat/styles.js +4 -0
- package/src/components/organisms/DashboardMetric/index.js +6 -3
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- 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 +14 -0
- package/src/components/organisms/GridProducts/utils.js +111 -0
- package/src/components/organisms/InputGroup/index.js +131 -119
- package/src/components/organisms/Modal/styles.js +4 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/pages/Dashboard/Dashboard.stories.js +33 -38
- package/src/components/pages/Dashboard/index.js +33 -5
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +100 -83
- package/src/components/pages/ProviderProductEdition/index.js +100 -131
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +6 -2
- package/src/components/pages/RetailerProductEdition/index.js +111 -142
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/global-files/data.js +7 -13
- package/src/global-files/variables.js +4 -0
- package/src/index.js +11 -0
|
@@ -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: calc(100% - 100px);\n overflow: auto;\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;
|
|
@@ -82,16 +82,7 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
82
82
|
setShowBox(false);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
}, [activeRetailer, inputGroup.groupId]);
|
|
86
|
-
// if (showBox) {
|
|
87
|
-
// // Realiza la acción que deseas cuando showBox es true
|
|
88
|
-
// console.log("showBox es true");
|
|
89
|
-
// } else {
|
|
90
|
-
// // Realiza la acción que deseas cuando showBox es false
|
|
91
|
-
// console.log("showBox es false");
|
|
92
|
-
// }
|
|
93
|
-
// }, [showBox]);
|
|
94
|
-
|
|
85
|
+
}, [activeRetailer, inputGroup.groupId]);
|
|
95
86
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
96
87
|
children: [inputGroup.groupId === "16" && (activeRetailer === null || activeRetailer === void 0 ? void 0 : (_activeRetailer$retai3 = activeRetailer.retailer) === null || _activeRetailer$retai3 === void 0 ? void 0 : _activeRetailer$retai3.id) === 68 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
97
88
|
className: activeSection === "Ficha técnica" ? "datasheets-layout" : "descriptions-layout",
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var ContainerModal = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n overflow: auto;\n display: grid;\n place-items: center;\n background-color: rgba(0, 0, 0, 0.4);\n\n .contentModal {\n width: fit-content;\n max-width: 80%;\n min-width: 80px;\n height: fit-content;\n max-height: 90%;\n min-height: 120px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: white;\n border-radius: 10px;\n padding: 25px 25px 20px 25px;\n box-shadow: 0px 2px 4px 0px #00000040;\n\n header {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 6px;\n
|
|
18
|
+
var ContainerModal = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n overflow: auto;\n display: grid;\n place-items: center;\n background-color: rgba(0, 0, 0, 0.4);\n\n .contentModal {\n width: fit-content;\n max-width: 80%;\n min-width: 80px;\n height: fit-content;\n max-height: 90%;\n min-height: 120px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: white;\n border-radius: 10px;\n padding: 25px 25px 20px 25px;\n box-shadow: 0px 2px 4px 0px #00000040;\n\n header {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 6px;\n\n .label-title {\n width: 100%;\n text-align: center;\n font-family: ", ", sans-serif;\n font-size: 17px;\n line-height: 1.2;\n color: #262626;\n white-space: pre-wrap;\n }\n\n & + * {\n margin-top: 20px;\n }\n }\n\n .iconModal {\n width: 50px;\n height: 50px;\n font-size: 30px;\n border-width: 4px;\n margin-bottom: 20px;\n overflow: hidden;\n\n &.iconModal-error {\n background-color: #953737;\n border-color: #953737;\n color: white;\n }\n &.iconModal-warning {\n font-size: 27px;\n padding-bottom: 8px;\n color: #af9647;\n border-color: #af9647;\n }\n &.iconModal-info {\n border-color: #9e3e26;\n color: #9e3e26;\n }\n &.iconModal-success {\n }\n }\n\n .label-message {\n width: 100%;\n text-align: center;\n font-family: ", ", sans-serif;\n font-size: 13px;\n color: #707070;\n white-space: pre-wrap;\n }\n\n .container-customComponent {\n width: 100%;\n max-height: 50vh;\n display: flex;\n flex-direction: column;\n margin-top: 20px;\n padding: 0px 0px;\n //border: 1px solid red;\n }\n\n .container-buttons {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 12px;\n margin-top: 20px;\n //border: 1px solid red;\n }\n }\n"])), _variables.FontFamily.RobotoMedium, _variables.FontFamily.RobotoRegular);
|
|
19
19
|
|
|
20
20
|
exports.ContainerModal = ContainerModal;
|
|
@@ -27,57 +27,54 @@ var DashboardDeafult = Template.bind({});
|
|
|
27
27
|
exports.DashboardDeafult = DashboardDeafult;
|
|
28
28
|
DashboardDeafult.args = {
|
|
29
29
|
user: {
|
|
30
|
-
id_user:
|
|
31
|
-
name: "
|
|
32
|
-
last_name: "
|
|
33
|
-
email: "
|
|
34
|
-
position: "
|
|
35
|
-
telephone: "",
|
|
30
|
+
id_user: 343,
|
|
31
|
+
name: "Jair",
|
|
32
|
+
last_name: "León",
|
|
33
|
+
email: "hleon@contentoh.com",
|
|
34
|
+
position: "Test States",
|
|
35
|
+
telephone: "+525555555555",
|
|
36
36
|
country: "México",
|
|
37
|
-
id_company:
|
|
38
|
-
id_cognito: "
|
|
37
|
+
id_company: 234,
|
|
38
|
+
id_cognito: "4512b5a5-366a-4bb5-916e-aafe05402992",
|
|
39
39
|
birth_Date: null,
|
|
40
40
|
about_me: "",
|
|
41
41
|
zip_code: "",
|
|
42
42
|
address: "",
|
|
43
43
|
job: "",
|
|
44
|
-
id_stripe: "",
|
|
45
|
-
id_role:
|
|
44
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
45
|
+
id_role: 0,
|
|
46
46
|
active: 1,
|
|
47
47
|
is_retailer: 0,
|
|
48
|
-
email_notify:
|
|
49
|
-
is_user_tech:
|
|
48
|
+
email_notify: 0,
|
|
49
|
+
is_user_tech: "ADMIN-AS",
|
|
50
50
|
membership: {
|
|
51
|
-
id:
|
|
52
|
-
start_date: "
|
|
53
|
-
end_date: "
|
|
54
|
-
planID:
|
|
55
|
-
plan: "
|
|
56
|
-
name: "Plan
|
|
57
|
-
user_limit: "
|
|
58
|
-
products_limit: "
|
|
59
|
-
type: "
|
|
51
|
+
id: 139,
|
|
52
|
+
start_date: "2023-10-04T15:46:14.000Z",
|
|
53
|
+
end_date: "2024-10-04T08:46:09.000Z",
|
|
54
|
+
planID: 9,
|
|
55
|
+
plan: "prod_KtlkzZVGq6bRTO",
|
|
56
|
+
name: "Plan Enterprise Full",
|
|
57
|
+
user_limit: "30",
|
|
58
|
+
products_limit: "10000",
|
|
59
|
+
type: "Enterprise"
|
|
60
60
|
},
|
|
61
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
61
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-343/343.png?1699470782542"
|
|
62
62
|
},
|
|
63
63
|
company: {
|
|
64
|
-
id_company:
|
|
65
|
-
trade_name: "
|
|
66
|
-
company_name: "
|
|
64
|
+
id_company: 234,
|
|
65
|
+
trade_name: "L'ORÉAL",
|
|
66
|
+
company_name: "L'ORÉAL",
|
|
67
67
|
rfc: "XAXX010101000",
|
|
68
68
|
adress: "AA",
|
|
69
|
-
about_company: "",
|
|
70
|
-
telephone: "",
|
|
71
|
-
web_site: "",
|
|
72
|
-
zip_code: "",
|
|
69
|
+
about_company: " ",
|
|
70
|
+
telephone: " ",
|
|
71
|
+
web_site: " ",
|
|
72
|
+
zip_code: " ",
|
|
73
73
|
email: null,
|
|
74
|
-
social_link: "",
|
|
74
|
+
social_link: " ",
|
|
75
75
|
is_retailer: 0,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
name: null,
|
|
79
|
-
country: null
|
|
80
|
-
}]
|
|
76
|
+
financedRetailers: [],
|
|
77
|
+
retailers: []
|
|
81
78
|
},
|
|
82
|
-
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
79
|
+
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI0NTEyYjVhNS0zNjZhLTRiYjUtOTE2ZS1hYWZlMDU0MDI5OTIiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjQ1MTJiNWE1LTM2NmEtNGJiNS05MTZlLWFhZmUwNTQwMjk5MiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIzYmY0NzAzZC1iMzlmLTRlNDQtYjRiMi03OWVjZGM0N2MyYjYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY5OTQ3MDc4MCwibmFtZSI6IkphaXIgTGXDs24iLCJwaG9uZV9udW1iZXIiOiIrNTI1NTU1NTU1NTU1IiwiZXhwIjoxNjk5NDc0MzgwLCJpYXQiOjE2OTk0NzA3ODAsImVtYWlsIjoiaGxlb25AY29udGVudG9oLmNvbSJ9.TWHLcBHgP91ROeYE2slm6xpxba7EMksrOZnBe0X49EXfFhPi8z3NzjomiH3mLTg-ZHR-Rrer_qHxPxv_SLfISYupKENiO7K5E3vqV1dXBzmZdQClcFQb_OskpbMlMBGrOEtGJdWaI37-c-w9an9c_PiNSruF_UuqktyxkUIfWP-UGjFAKp3dhh_Nr1ZjpjJX2PXtDH33qMopr1LLMI84x3Y4ej-pWkJpFcF-3EuUWeEZubQEmapoBj9xNPpaOKvCQ5i2DDe46779YDoyIy0fhIiBEYtMVlHLa2-JqqDvJef29byJPXqebOGZJRSOKAxZyqlaXtUqL8LUFSLeZMwkjw"
|
|
83
80
|
};
|
|
@@ -141,6 +141,16 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
141
141
|
_useState34 = (0, _slicedToArray2.default)(_useState33, 1),
|
|
142
142
|
isProviderFinanced = _useState34[0];
|
|
143
143
|
|
|
144
|
+
var _useState35 = (0, _react.useState)([]),
|
|
145
|
+
_useState36 = (0, _slicedToArray2.default)(_useState35, 2),
|
|
146
|
+
trades = _useState36[0],
|
|
147
|
+
setTrades = _useState36[1];
|
|
148
|
+
|
|
149
|
+
var _useState37 = (0, _react.useState)([]),
|
|
150
|
+
_useState38 = (0, _slicedToArray2.default)(_useState37, 2),
|
|
151
|
+
tradesSelected = _useState38[0],
|
|
152
|
+
setTradesSelected = _useState38[1];
|
|
153
|
+
|
|
144
154
|
var loadProductVersions = /*#__PURE__*/function () {
|
|
145
155
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(queryObject) {
|
|
146
156
|
var keys, string, query, endpoint, response;
|
|
@@ -231,7 +241,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
231
241
|
|
|
232
242
|
var loadProductsByStatus = /*#__PURE__*/function () {
|
|
233
243
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(orderByStatus) {
|
|
234
|
-
var isRetailer, isProvider, isCollaborator, _ref5, ordersBydate, ordersByStatus, _ordersByStatus$total, total, _ordersByStatus$R, R, _ordersByStatus$PA, PA, _ordersByStatus$Ex, Ex, _ordersByStatus$ACA, ACA, productsFinished, inProcess, metricsArray;
|
|
244
|
+
var isRetailer, isProvider, isCollaborator, _ref5, ordersBydate, ordersByStatus, ordersByActive, companyTrades, _ordersByStatus$total, total, _ordersByStatus$R, R, _ordersByStatus$PA, PA, _ordersByStatus$Ex, Ex, _ordersByStatus$ACA, ACA, productsFinished, inProcess, registeredProducts, metricsArray;
|
|
235
245
|
|
|
236
246
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
237
247
|
while (1) {
|
|
@@ -257,6 +267,9 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
257
267
|
_ref5 = _context3.t0;
|
|
258
268
|
ordersBydate = _ref5.ordersBydate;
|
|
259
269
|
ordersByStatus = _ref5.ordersByStatus;
|
|
270
|
+
ordersByActive = _ref5.ordersByActive;
|
|
271
|
+
companyTrades = _ref5.companyTrades;
|
|
272
|
+
if (trades.length === 0) setTrades(companyTrades);
|
|
260
273
|
_ordersByStatus$total = ordersByStatus.total, total = _ordersByStatus$total === void 0 ? 0 : _ordersByStatus$total, _ordersByStatus$R = ordersByStatus.R, R = _ordersByStatus$R === void 0 ? 0 : _ordersByStatus$R, _ordersByStatus$PA = ordersByStatus.PA, PA = _ordersByStatus$PA === void 0 ? 0 : _ordersByStatus$PA, _ordersByStatus$Ex = ordersByStatus.Ex, Ex = _ordersByStatus$Ex === void 0 ? 0 : _ordersByStatus$Ex, _ordersByStatus$ACA = ordersByStatus.ACA, ACA = _ordersByStatus$ACA === void 0 ? 0 : _ordersByStatus$ACA;
|
|
261
274
|
productsFinished = 0;
|
|
262
275
|
if (isRetailer) productsFinished = Ex;
|
|
@@ -265,11 +278,16 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
265
278
|
inProcess = Object.keys(ordersByStatus).reduce(function (prev, curr) {
|
|
266
279
|
return !["total", "PA", "R", "Ex", "ACA"].includes(curr) ? prev + ordersByStatus[curr] : prev;
|
|
267
280
|
}, 0);
|
|
281
|
+
registeredProducts = ordersByActive.registered;
|
|
268
282
|
metricsArray = [metricsData[0] ? metricsData[0] : {
|
|
269
283
|
label: "Productos totales",
|
|
270
284
|
value: total
|
|
271
285
|
}];
|
|
286
|
+
console.log(registeredProducts);
|
|
272
287
|
metricsArray.push({
|
|
288
|
+
label: "Productos activos",
|
|
289
|
+
value: registeredProducts
|
|
290
|
+
}, {
|
|
273
291
|
label: "Productos filtrados",
|
|
274
292
|
value: total
|
|
275
293
|
}, {
|
|
@@ -288,7 +306,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
288
306
|
setRequiredProducts(ordersBydate);
|
|
289
307
|
setProductsByStatus(ordersByStatus);
|
|
290
308
|
|
|
291
|
-
case
|
|
309
|
+
case 29:
|
|
292
310
|
case "end":
|
|
293
311
|
return _context3.stop();
|
|
294
312
|
}
|
|
@@ -433,20 +451,21 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
433
451
|
startDate: startDate,
|
|
434
452
|
endDate: endDate
|
|
435
453
|
};
|
|
436
|
-
companyId.length > 0
|
|
437
|
-
retailerId.length > 0
|
|
438
|
-
categoryId.length > 0
|
|
454
|
+
if (companyId.length > 0) queryObject["companyId"] = companyId.join(",");
|
|
455
|
+
if (retailerId.length > 0) queryObject["retailerId"] = retailerId.join(",");
|
|
456
|
+
if (categoryId.length > 0) queryObject["categoryId"] = categoryId.join(",");
|
|
457
|
+
if (tradesSelected.length > 0) queryObject["trades"] = encodeURIComponent(tradesSelected.join(","));
|
|
439
458
|
applicantsFilter.length > 0 && (queryObject["requestedBy"] = applicantsFilter.join(","));
|
|
440
|
-
_context5.next =
|
|
459
|
+
_context5.next = 9;
|
|
441
460
|
return loadProductsByStatus(queryObject, true);
|
|
442
461
|
|
|
443
|
-
case
|
|
462
|
+
case 9:
|
|
444
463
|
case "end":
|
|
445
464
|
return _context5.stop();
|
|
446
465
|
}
|
|
447
466
|
}
|
|
448
467
|
}, _callee5);
|
|
449
|
-
})), [companyId, retailerId, categoryId, datesRange, applicantsFilter]);
|
|
468
|
+
})), [companyId, retailerId, categoryId, datesRange, applicantsFilter, tradesSelected]);
|
|
450
469
|
return loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
451
470
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
452
471
|
className: "filters",
|
|
@@ -497,6 +516,14 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
497
516
|
parameterArray: applicantsFilter,
|
|
498
517
|
setParameterArray: setApplicantsFilter,
|
|
499
518
|
defaultOption: "Todos los solicitantes"
|
|
519
|
+
}), user.id_role === 0 && (trades === null || trades === void 0 ? void 0 : trades.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomSelect.CustomSelect, {
|
|
520
|
+
showSearchBar: true,
|
|
521
|
+
options: trades,
|
|
522
|
+
selectLabel: "Todas las marcas",
|
|
523
|
+
placeHolder: "Buscar marca",
|
|
524
|
+
customSelectId: "trade-select",
|
|
525
|
+
parameterArray: tradesSelected,
|
|
526
|
+
setParameterArray: setTradesSelected
|
|
500
527
|
})]
|
|
501
528
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
502
529
|
className: "metric-cards",
|
|
@@ -45,10 +45,10 @@ ProviderProductEditionDefault.args = {
|
|
|
45
45
|
version: 1,
|
|
46
46
|
retailersAvailable: [{
|
|
47
47
|
name: "The Home Depot Golden",
|
|
48
|
-
|
|
48
|
+
id: 58
|
|
49
49
|
}, {
|
|
50
50
|
name: "The Home Depot Onboarding",
|
|
51
|
-
|
|
51
|
+
id: 68
|
|
52
52
|
}],
|
|
53
53
|
percentage: "89"
|
|
54
54
|
},
|
|
@@ -146,7 +146,7 @@ ProviderProductEditionDefault.args = {
|
|
|
146
146
|
name: "The Home Depot Onboarding",
|
|
147
147
|
country: "México",
|
|
148
148
|
id_region: 1,
|
|
149
|
-
|
|
149
|
+
active: 1,
|
|
150
150
|
flow: 1
|
|
151
151
|
}]
|
|
152
152
|
},
|