contentoh-components-library 21.3.4 → 21.3.6
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 +2 -2
- package/.env.production +25 -25
- package/dist/assets/fonts/{roboto → Roboto}/LICENSE.txt +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Black.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-BlackItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Bold.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-BoldItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Italic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Light.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-LightItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Medium.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-MediumItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Regular.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Thin.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-ThinItalic.ttf +0 -0
- package/dist/components/atoms/GeneralButton/index.js +6 -2
- package/dist/components/atoms/ProgressBar/index.js +36 -6
- package/dist/components/atoms/ProgressBar/styles.js +11 -3
- package/dist/components/atoms/Select/VersionSelect.js +2 -1
- package/dist/components/molecules/ProductNameHeader/index.js +5 -3
- package/dist/components/organisms/CreateVersion/RenderChilds.js +11 -11
- package/dist/components/organisms/CreateVersion/index.js +30 -89
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -0
- package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/dist/components/organisms/OrderDetail/index.js +20 -11
- package/dist/components/organisms/OrderDetail/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/utils.js +45 -15
- package/dist/components/organisms/VersionSelector/index.js +28 -2
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +69 -147
- package/dist/components/pages/ProviderProductEdition/index.js +27 -47
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +66 -82
- package/dist/components/pages/RetailerProductEdition/index.js +18 -36
- package/package.json +4 -4
- package/src/assets/fonts/{roboto → Roboto}/LICENSE.txt +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-Black.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-BlackItalic.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-Bold.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-BoldItalic.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-Italic.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-Light.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-LightItalic.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-Medium.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-MediumItalic.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-Regular.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-Thin.ttf +0 -0
- package/src/assets/fonts/{roboto → Roboto}/Roboto-ThinItalic.ttf +0 -0
- package/src/components/atoms/GeneralButton/index.js +4 -1
- package/src/components/atoms/ProgressBar/index.js +38 -5
- package/src/components/atoms/ProgressBar/styles.js +23 -0
- package/src/components/atoms/Select/VersionSelect.js +4 -2
- package/src/components/molecules/ProductNameHeader/index.js +6 -1
- package/src/components/organisms/CreateVersion/RenderChilds.js +28 -34
- package/src/components/organisms/CreateVersion/index.js +16 -36
- package/src/components/organisms/FullProductNameHeader/index.js +1 -0
- package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/src/components/organisms/OrderDetail/index.js +19 -12
- package/src/components/organisms/OrderDetail/styles.js +1 -0
- package/src/components/organisms/OrderDetail/utils/Table/styles.js +26 -0
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +30 -15
- package/src/components/organisms/VersionSelector/index.js +18 -3
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +75 -166
- package/src/components/pages/ProviderProductEdition/index.js +12 -28
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +71 -82
- package/src/components/pages/RetailerProductEdition/index.js +14 -24
- package/src/global-files/customHooks.js +2 -2
|
@@ -28,107 +28,91 @@ exports.RetailerProductEditionDefault = RetailerProductEditionDefault;
|
|
|
28
28
|
RetailerProductEditionDefault.args = {
|
|
29
29
|
tabsSections: {
|
|
30
30
|
Descripción: true,
|
|
31
|
-
"Ficha técnica":
|
|
32
|
-
Imágenes:
|
|
31
|
+
"Ficha técnica": true,
|
|
32
|
+
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJmMzY2YTdjYi02YjA0LTRiMzAtOTJmYy1iMzY0MmY3ZjEzNmEiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY3MTc0MzE0OSwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjcxNzQ2NzQ5LCJpYXQiOjE2NzE3NDMxNDksImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.J8kTv1sEotxoicaRclaK1r0tjVbwHPDxIzdDfxYo9J4XwBYYfS180__KYYE0Dh1AfUK_K0mrk2_78_rhTNxCQT85W7XS3ZEcxIOUekqoxaKFl8LSVN_eWz3SlsGG0yRflhJGt6d4gBVByXZbdNiyp1rkjgMln6fhwlRUnuGRbG1WKQvdAPli3qfH8mLzgoTz-6HWs1Jf2Ujheavf3ipGMNtj-OSUdQsh04Ov7jehDWdnPNn2s2DAl4eubgjdXrwIiBPCRkbuFeYZZJpzj1wy__a0nCM7bzly5uTZ2aWujgEJvf9bJb-Y4gkS8TxyJaggJ01ZsMki36aEpIt8J1tJag",
|
|
35
35
|
productSelected: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
images: 1
|
|
40
|
-
},
|
|
41
|
-
orderId: 3321,
|
|
42
|
-
status: "PA",
|
|
43
|
-
datasheet_status: "AC",
|
|
44
|
-
prio: "none",
|
|
45
|
-
version: 2,
|
|
46
|
-
description_status: "AC",
|
|
47
|
-
images_status: "PA",
|
|
48
|
-
statusByRetailer: {
|
|
49
|
-
58: {
|
|
50
|
-
datasheet: "AC",
|
|
51
|
-
description: "AC",
|
|
52
|
-
images: "PA"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
36
|
+
articleStatus: "AA",
|
|
37
|
+
version: 3,
|
|
38
|
+
missing: {},
|
|
55
39
|
article: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
active: 1,
|
|
64
|
-
company_id: 409,
|
|
65
|
-
SKU: null,
|
|
66
|
-
Descripcion: null,
|
|
67
|
-
Proveedor: null,
|
|
68
|
-
id_proveedor: 0,
|
|
69
|
-
company_name: "HIGHLINE-WARREN LLC",
|
|
70
|
-
country: null,
|
|
71
|
-
id_order: 3321,
|
|
72
|
-
id_datasheet_especialist: 1248,
|
|
73
|
-
id_datasheet_facilitator: null,
|
|
74
|
-
id_description_especialist: 1248,
|
|
75
|
-
id_description_facilitator: null,
|
|
76
|
-
id_images_especialist: null,
|
|
77
|
-
id_images_facilitator: null,
|
|
78
|
-
id_auditor: null,
|
|
79
|
-
id_recepcionist: null,
|
|
80
|
-
category: "Eléctrico|Extensiones y Multicontactos|Extensiones y Multicontactos",
|
|
81
|
-
missingAttributes: null,
|
|
82
|
-
missingDescriptions: null,
|
|
83
|
-
missingImages: null
|
|
40
|
+
category: "Ventilación y Calefacción|Ventiladores de Techo|Ventiladores de Techo",
|
|
41
|
+
company_name: "GRUPO BRAHMA",
|
|
42
|
+
company_id: 1,
|
|
43
|
+
id_category: "2416",
|
|
44
|
+
id_article: 221,
|
|
45
|
+
name: 'DEMO VENTILADOR DE TECHO TRIBECA 52"',
|
|
46
|
+
upc: "147259"
|
|
84
47
|
},
|
|
48
|
+
asignations: [],
|
|
85
49
|
retailers: [{
|
|
86
|
-
id:
|
|
87
|
-
name: "The Home Depot
|
|
50
|
+
id: 59,
|
|
51
|
+
name: "The Home Depot Platinum",
|
|
52
|
+
country: "México",
|
|
53
|
+
id_region: 1,
|
|
54
|
+
active: 1
|
|
55
|
+
}],
|
|
56
|
+
retailersAvailable: [{
|
|
57
|
+
id: 59,
|
|
58
|
+
name: "The Home Depot Platinum",
|
|
88
59
|
country: "México",
|
|
89
60
|
id_region: 1,
|
|
90
61
|
active: 1
|
|
91
62
|
}],
|
|
92
|
-
|
|
93
|
-
|
|
63
|
+
upc: "147259",
|
|
64
|
+
name: 'DEMO VENTILADOR DE TECHO TRIBECA 52"',
|
|
65
|
+
categoryName: "Ventilación y Calefacción|Ventiladores de Techo|Ventiladores de Techo",
|
|
66
|
+
id_category: "2416",
|
|
67
|
+
id_article: 221,
|
|
68
|
+
services: [{
|
|
69
|
+
id_article: 221,
|
|
70
|
+
service: "datasheet",
|
|
71
|
+
quantity: 1,
|
|
72
|
+
price: 0,
|
|
73
|
+
id_user: 59,
|
|
74
|
+
datasheet_common: null,
|
|
75
|
+
discount: null
|
|
76
|
+
}]
|
|
94
77
|
},
|
|
95
78
|
location: {
|
|
96
79
|
product: {
|
|
97
|
-
articleId:
|
|
80
|
+
articleId: 221,
|
|
98
81
|
versionId: 3
|
|
99
82
|
}
|
|
100
83
|
},
|
|
101
84
|
user: {
|
|
102
|
-
id_user:
|
|
103
|
-
name: "
|
|
104
|
-
last_name: "
|
|
105
|
-
email: "
|
|
106
|
-
position: "
|
|
107
|
-
telephone:
|
|
108
|
-
country:
|
|
109
|
-
id_company:
|
|
110
|
-
id_cognito: "
|
|
85
|
+
id_user: 59,
|
|
86
|
+
name: "The Home",
|
|
87
|
+
last_name: "Depot",
|
|
88
|
+
email: "cadena.ismael@allfreemail.net",
|
|
89
|
+
position: "Admin",
|
|
90
|
+
telephone: "+523111366336",
|
|
91
|
+
country: "México",
|
|
92
|
+
id_company: 817,
|
|
93
|
+
id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
|
|
111
94
|
birth_Date: null,
|
|
112
|
-
about_me:
|
|
113
|
-
zip_code:
|
|
114
|
-
address:
|
|
115
|
-
job:
|
|
116
|
-
id_stripe:
|
|
117
|
-
id_role:
|
|
95
|
+
about_me: "",
|
|
96
|
+
zip_code: "",
|
|
97
|
+
address: "",
|
|
98
|
+
job: "",
|
|
99
|
+
id_stripe: "",
|
|
100
|
+
id_role: 0,
|
|
118
101
|
active: 1,
|
|
119
|
-
is_retailer:
|
|
120
|
-
email_notify:
|
|
102
|
+
is_retailer: 1,
|
|
103
|
+
email_notify: 0,
|
|
104
|
+
is_user_tech: null,
|
|
121
105
|
membership: {
|
|
122
|
-
id:
|
|
123
|
-
start_date: "2022-
|
|
124
|
-
end_date: "2023-
|
|
125
|
-
planID:
|
|
126
|
-
plan: "
|
|
127
|
-
name: "Plan
|
|
128
|
-
user_limit: "
|
|
129
|
-
products_limit: "
|
|
130
|
-
type: "
|
|
106
|
+
id: 47,
|
|
107
|
+
start_date: "2022-05-25T14:31:12.000Z",
|
|
108
|
+
end_date: "2023-05-25T14:31:12.000Z",
|
|
109
|
+
planID: 5,
|
|
110
|
+
plan: "prod_Ktl6B5Ou2gqTB2",
|
|
111
|
+
name: "Plan Pro",
|
|
112
|
+
user_limit: "5",
|
|
113
|
+
products_limit: "500",
|
|
114
|
+
type: "PyMES"
|
|
131
115
|
},
|
|
132
|
-
src: "https://content-management-profile
|
|
116
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1671735033010"
|
|
133
117
|
}
|
|
134
118
|
};
|
|
@@ -77,8 +77,6 @@ var _VersionSelector = require("../../organisms/VersionSelector");
|
|
|
77
77
|
|
|
78
78
|
var _customHooks = require("../../../global-files/customHooks");
|
|
79
79
|
|
|
80
|
-
var _CreateVersion = require("../../organisms/CreateVersion");
|
|
81
|
-
|
|
82
80
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
83
81
|
|
|
84
82
|
var reducerImages = function reducerImages(state, action) {
|
|
@@ -190,8 +188,8 @@ var S3_BUCKET = process.env.REACT_APP_IMAGES_BUCKET;
|
|
|
190
188
|
var REGION = "us-east-1";
|
|
191
189
|
|
|
192
190
|
_awsSdk.default.config.update({
|
|
193
|
-
accessKeyId: process.env.
|
|
194
|
-
secretAccessKey: process.env.
|
|
191
|
+
accessKeyId: process.env.REACT_APP_KUTS3,
|
|
192
|
+
secretAccessKey: process.env.REACT_APP_AKUTS3
|
|
195
193
|
});
|
|
196
194
|
|
|
197
195
|
var myBucket = new _awsSdk.default.S3({
|
|
@@ -320,7 +318,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
320
318
|
})),
|
|
321
319
|
_useState24 = (0, _slicedToArray2.default)(_useState23, 2),
|
|
322
320
|
percentages = _useState24[0],
|
|
323
|
-
setPercentages = _useState24[1];
|
|
321
|
+
setPercentages = _useState24[1]; // const [percentages, setPercentages] = useState([{ retailers: {} }]);
|
|
322
|
+
|
|
324
323
|
|
|
325
324
|
var _useState25 = (0, _react.useState)(0),
|
|
326
325
|
_useState26 = (0, _slicedToArray2.default)(_useState25, 2),
|
|
@@ -433,22 +432,10 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
433
432
|
socketType = _useState66[0],
|
|
434
433
|
setSocketType = _useState66[1];
|
|
435
434
|
|
|
436
|
-
var _useState67 = (0, _react.useState)(
|
|
435
|
+
var _useState67 = (0, _react.useState)(loading),
|
|
437
436
|
_useState68 = (0, _slicedToArray2.default)(_useState67, 2),
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
var _useState69 = (0, _react.useState)(loading),
|
|
442
|
-
_useState70 = (0, _slicedToArray2.default)(_useState69, 2),
|
|
443
|
-
saving = _useState70[0],
|
|
444
|
-
setSaving = _useState70[1];
|
|
445
|
-
|
|
446
|
-
var isAuditor = user.id_role === 6;
|
|
447
|
-
|
|
448
|
-
var _useState71 = (0, _react.useState)(false),
|
|
449
|
-
_useState72 = (0, _slicedToArray2.default)(_useState71, 2),
|
|
450
|
-
showCreateVersion = _useState72[0],
|
|
451
|
-
setShowCreateVersion = _useState72[1];
|
|
437
|
+
saving = _useState68[0],
|
|
438
|
+
setSaving = _useState68[1];
|
|
452
439
|
|
|
453
440
|
var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
|
|
454
441
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
@@ -476,8 +463,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
476
463
|
_services = _context.sent;
|
|
477
464
|
//Converts the data inside the datasheets object to array
|
|
478
465
|
setServices(_services);
|
|
479
|
-
getServices();
|
|
480
|
-
|
|
466
|
+
getServices();
|
|
481
467
|
setImages({
|
|
482
468
|
action: "init",
|
|
483
469
|
init: _services[2]
|
|
@@ -486,7 +472,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
486
472
|
(0, _data.getPercentage)({
|
|
487
473
|
data: [product]
|
|
488
474
|
}).then(function (res) {
|
|
489
|
-
return setPercentages(res);
|
|
475
|
+
return setPercentages(res[0]);
|
|
490
476
|
});
|
|
491
477
|
setLoading(false);
|
|
492
478
|
_context.next = 15;
|
|
@@ -695,16 +681,17 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
695
681
|
loadAssignations(product);
|
|
696
682
|
}, [userGroups]);
|
|
697
683
|
(0, _react.useEffect)(function () {
|
|
698
|
-
var
|
|
684
|
+
var _Object$keys, _percentages$retailer, _retailers$;
|
|
699
685
|
|
|
700
|
-
product === null || product === void 0 ? void 0 :
|
|
701
|
-
var _percentages$filter$;
|
|
686
|
+
var retailers = (product === null || product === void 0 ? void 0 : product.retailersAvailable) || (product === null || product === void 0 ? void 0 : product.retailers);
|
|
702
687
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
688
|
+
if (((_Object$keys = Object.keys((_percentages$retailer = percentages === null || percentages === void 0 ? void 0 : percentages.retailers) !== null && _percentages$retailer !== void 0 ? _percentages$retailer : {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0) {
|
|
689
|
+
retailers === null || retailers === void 0 ? void 0 : retailers.forEach(function (retailer) {
|
|
690
|
+
retailer["percentage"] = Number(percentages === null || percentages === void 0 ? void 0 : percentages.retailers[retailer.id].percentageRequired);
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
setActivePercentage((_retailers$ = retailers[0]) === null || _retailers$ === void 0 ? void 0 : _retailers$.percentage);
|
|
708
695
|
}, [percentages]);
|
|
709
696
|
(0, _react.useEffect)(function () {
|
|
710
697
|
if (services.length > 0) {
|
|
@@ -2053,13 +2040,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2053
2040
|
setVersion: setVersion,
|
|
2054
2041
|
companyName: product.article.company_name,
|
|
2055
2042
|
currentVersion: version,
|
|
2056
|
-
setShowCreateVersion: setShowCreateVersion,
|
|
2057
2043
|
setShowVersionSelector: setShowVersionSelector,
|
|
2058
2044
|
jwt: token
|
|
2059
|
-
}), showCreateVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CreateVersion.CreateVersion, {
|
|
2060
|
-
idArticle: product.article.id_article,
|
|
2061
|
-
version: version,
|
|
2062
|
-
setShowCreateVersion: setShowCreateVersion
|
|
2063
2045
|
})]
|
|
2064
2046
|
});
|
|
2065
2047
|
};
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.3.
|
|
3
|
+
"version": "21.3.6",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@aws-amplify/auth": "^4.5.3",
|
|
6
6
|
"@aws-amplify/datastore": "^3.11.0",
|
|
7
7
|
"@aws-amplify/ui-react": "^2.17.0",
|
|
8
8
|
"@babel/runtime": "^7.17.2",
|
|
9
|
-
"@emotion/react": "^11.10.
|
|
10
|
-
"@emotion/styled": "^11.10.
|
|
9
|
+
"@emotion/react": "^11.10.5",
|
|
10
|
+
"@emotion/styled": "^11.10.5",
|
|
11
|
+
"@mui/material": "^5.11.1",
|
|
11
12
|
"@fortawesome/fontawesome-svg-core": "^6.2.0",
|
|
12
13
|
"@fortawesome/free-regular-svg-icons": "^6.2.0",
|
|
13
14
|
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
|
14
15
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
15
|
-
"@mui/material": "^5.10.8",
|
|
16
16
|
"@mui/styled-engine-sc": "^5.10.6",
|
|
17
17
|
"@storybook/addon-postcss": "^2.0.0",
|
|
18
18
|
"@testing-library/jest-dom": "^5.11.4",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -15,7 +15,10 @@ export const Button = ({
|
|
|
15
15
|
id={id}
|
|
16
16
|
className={buttonType}
|
|
17
17
|
buttonFont={buttonFont}
|
|
18
|
-
onClick={
|
|
18
|
+
onClick={(e) => {
|
|
19
|
+
e.stopPropagation();
|
|
20
|
+
onClick(e);
|
|
21
|
+
}}
|
|
19
22
|
key={`button-${buttonType}`}
|
|
20
23
|
disabled={buttonType === "general-button-disabled"}
|
|
21
24
|
>
|
|
@@ -1,9 +1,42 @@
|
|
|
1
|
-
import { Container } from "./styles";
|
|
1
|
+
import { Container, ContainerIcon } from "./styles";
|
|
2
|
+
import { Tooltip } from "../Tooltip";
|
|
2
3
|
|
|
3
|
-
export const ProgressBar = ({ percent, progressBarType }) => {
|
|
4
|
+
export const ProgressBar = ({ percent, progressBarType, percentRequired }) => {
|
|
4
5
|
return (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
<>
|
|
7
|
+
{percentRequired && (
|
|
8
|
+
<>
|
|
9
|
+
<Tooltip
|
|
10
|
+
componentTooltip={
|
|
11
|
+
<>
|
|
12
|
+
<p>
|
|
13
|
+
<b>Campos requeridos</b>
|
|
14
|
+
</p>
|
|
15
|
+
<p>
|
|
16
|
+
Este nuevo icono te indicará cuando <br></br> completes todos
|
|
17
|
+
los campos requeridos
|
|
18
|
+
</p>
|
|
19
|
+
</>
|
|
20
|
+
}
|
|
21
|
+
children={
|
|
22
|
+
<ContainerIcon
|
|
23
|
+
className="fondo"
|
|
24
|
+
percentageRequired={percentRequired}
|
|
25
|
+
>
|
|
26
|
+
<span class="hola">local_police</span>
|
|
27
|
+
</ContainerIcon>
|
|
28
|
+
}
|
|
29
|
+
classNameTooltip={"container-tooltip"}
|
|
30
|
+
position={undefined}
|
|
31
|
+
addArrow={undefined}
|
|
32
|
+
transitionType={undefined}
|
|
33
|
+
followCursor={undefined}
|
|
34
|
+
></Tooltip>
|
|
35
|
+
</>
|
|
36
|
+
)}
|
|
37
|
+
<Container className={`status-${progressBarType}`}>
|
|
38
|
+
<p>{percent}%</p>
|
|
39
|
+
</Container>
|
|
40
|
+
</>
|
|
8
41
|
);
|
|
9
42
|
};
|
|
@@ -68,3 +68,26 @@ export const Container = styled.div`
|
|
|
68
68
|
color: ${GlobalColors.s4};
|
|
69
69
|
}
|
|
70
70
|
`;
|
|
71
|
+
export const ContainerIcon = styled.div`
|
|
72
|
+
@font-face {
|
|
73
|
+
font-family: "Material Symbols Outlined";
|
|
74
|
+
font-style: normal;
|
|
75
|
+
font-weight: 100 700;
|
|
76
|
+
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)
|
|
77
|
+
format("woff2");
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.hola {
|
|
81
|
+
font-family: "Material Symbols Outlined";
|
|
82
|
+
font-size: 30px;
|
|
83
|
+
//line-height: 1;
|
|
84
|
+
margin-top: 10px;
|
|
85
|
+
}
|
|
86
|
+
.hola {
|
|
87
|
+
font-variation-settings: "FILL"
|
|
88
|
+
${(props) => (props.percentageRequired < 100 ? 0 : 1)},
|
|
89
|
+
"wght" 400, "GRAD" 0, "opsz" 48;
|
|
90
|
+
color: ${(props) =>
|
|
91
|
+
props.percentageRequired < 100 ? "#d4d1d7" : "#e33aa9"};
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
@@ -13,11 +13,13 @@ export const VersionSelect = ({
|
|
|
13
13
|
<select
|
|
14
14
|
id={id}
|
|
15
15
|
name={id}
|
|
16
|
-
value={
|
|
16
|
+
value={selectedVersions[id]}
|
|
17
17
|
onChange={onChange}
|
|
18
18
|
>
|
|
19
19
|
{versions.map((item, index) => (
|
|
20
|
-
<option key={`${id}-${index}`}
|
|
20
|
+
<option key={`${id}-${index}`} value={item.version}>
|
|
21
|
+
Version {item.version}
|
|
22
|
+
</option>
|
|
21
23
|
))}
|
|
22
24
|
</select>
|
|
23
25
|
</VrsnSelect>
|
|
@@ -10,12 +10,17 @@ export const ProductNameHeader = ({
|
|
|
10
10
|
percent,
|
|
11
11
|
priority,
|
|
12
12
|
date,
|
|
13
|
+
percentRequired,
|
|
13
14
|
}) => {
|
|
14
15
|
return (
|
|
15
16
|
<Container>
|
|
16
17
|
<ScreenHeader headerType={"product-name-header"} text={productName} />
|
|
17
18
|
<Status statusType={statusType} />
|
|
18
|
-
<ProgressBar
|
|
19
|
+
<ProgressBar
|
|
20
|
+
percent={percentRequired}
|
|
21
|
+
progressBarType={statusType}
|
|
22
|
+
percentRequired={percentRequired}
|
|
23
|
+
/>
|
|
19
24
|
<PriorityFlag priority={priority} />
|
|
20
25
|
<ScreenHeader headerType={"date-header"} text={date} />
|
|
21
26
|
</Container>
|
|
@@ -21,27 +21,25 @@ export const Children = (
|
|
|
21
21
|
<img src={createVersionImg} alt="create version icon" />
|
|
22
22
|
<ScreenHeader
|
|
23
23
|
fontFamily={FontFamily.Raleway_500}
|
|
24
|
-
headerType=
|
|
24
|
+
headerType="product-name-header"
|
|
25
25
|
color={GlobalColors.white}
|
|
26
|
-
text=
|
|
26
|
+
text="Crea una nueva versión"
|
|
27
27
|
/>
|
|
28
28
|
<ScreenHeader
|
|
29
29
|
fontFamily={FontFamily.Raleway}
|
|
30
|
-
headerType=
|
|
30
|
+
headerType="retailer-name-header"
|
|
31
31
|
color={GlobalColors.white}
|
|
32
|
-
text=
|
|
33
|
-
"Puedes elegir el contenido de versiones anteriores o crear una versión desde cero"
|
|
34
|
-
}
|
|
32
|
+
text="Puedes elegir el contenido de versiones anteriores o crear una versión desde cero"
|
|
35
33
|
/>
|
|
36
34
|
<div className="buttons-container">
|
|
37
35
|
<Button
|
|
38
|
-
label=
|
|
39
|
-
buttonType=
|
|
36
|
+
label="Versión desde cero"
|
|
37
|
+
buttonType="general-transparent-button"
|
|
40
38
|
onClick={() => setStep("empty-version")}
|
|
41
39
|
/>
|
|
42
40
|
<Button
|
|
43
|
-
label=
|
|
44
|
-
buttonType=
|
|
41
|
+
label="Versión personalizada"
|
|
42
|
+
buttonType="general-default-button"
|
|
45
43
|
onClick={() => setStep("create-version")}
|
|
46
44
|
/>
|
|
47
45
|
</div>
|
|
@@ -53,27 +51,25 @@ export const Children = (
|
|
|
53
51
|
<img src={genericModalWarning} alt="warning icon" />
|
|
54
52
|
<ScreenHeader
|
|
55
53
|
fontFamily={FontFamily.Raleway_500}
|
|
56
|
-
headerType=
|
|
54
|
+
headerType="product-name-header"
|
|
57
55
|
color={GlobalColors.white}
|
|
58
|
-
text=
|
|
59
|
-
"Si creas una versión desde cero perderas la información actual"
|
|
60
|
-
}
|
|
56
|
+
text="Si creas una versión desde cero perderas la información actual"
|
|
61
57
|
/>
|
|
62
58
|
<ScreenHeader
|
|
63
59
|
fontFamily={FontFamily.Raleway}
|
|
64
|
-
headerType=
|
|
60
|
+
headerType="retailer-name-header"
|
|
65
61
|
color={GlobalColors.white}
|
|
66
|
-
text=
|
|
62
|
+
text="¿Deseas Continuar?"
|
|
67
63
|
/>
|
|
68
64
|
<div className="buttons-container">
|
|
69
65
|
<Button
|
|
70
|
-
label=
|
|
71
|
-
buttonType=
|
|
66
|
+
label="Atrás"
|
|
67
|
+
buttonType="general-transparent-button"
|
|
72
68
|
onClick={() => setStep("version-options")}
|
|
73
69
|
/>
|
|
74
70
|
<Button
|
|
75
|
-
label=
|
|
76
|
-
buttonType=
|
|
71
|
+
label="Continuar"
|
|
72
|
+
buttonType="general-default-button"
|
|
77
73
|
onClick={() => createVersion(true)}
|
|
78
74
|
/>
|
|
79
75
|
</div>
|
|
@@ -84,18 +80,16 @@ export const Children = (
|
|
|
84
80
|
<CreateVersion>
|
|
85
81
|
<ScreenHeader
|
|
86
82
|
fontFamily={FontFamily.Raleway_500}
|
|
87
|
-
headerType=
|
|
83
|
+
headerType="retailer-name-header"
|
|
88
84
|
color={GlobalColors.white}
|
|
89
|
-
text=
|
|
90
|
-
"Elige el contenido que deseas utilizar de versiones anteriores"
|
|
91
|
-
}
|
|
85
|
+
text="Elige el contenido que deseas utilizar de versiones anteriores"
|
|
92
86
|
/>
|
|
93
87
|
<div className="version-selector">
|
|
94
88
|
<div className="selector">
|
|
95
89
|
<VersionSelect
|
|
96
90
|
versions={versions}
|
|
97
|
-
label=
|
|
98
|
-
id=
|
|
91
|
+
label="Ficha técnica"
|
|
92
|
+
id="datasheet"
|
|
99
93
|
selectedVersions={selectedVersions}
|
|
100
94
|
onChange={(e) => onChange(e)}
|
|
101
95
|
/>
|
|
@@ -103,8 +97,8 @@ export const Children = (
|
|
|
103
97
|
<div className="selector">
|
|
104
98
|
<VersionSelect
|
|
105
99
|
versions={versions}
|
|
106
|
-
label=
|
|
107
|
-
id=
|
|
100
|
+
label="Descripción"
|
|
101
|
+
id="description"
|
|
108
102
|
selectedVersions={selectedVersions}
|
|
109
103
|
onChange={(e) => onChange(e)}
|
|
110
104
|
/>
|
|
@@ -112,8 +106,8 @@ export const Children = (
|
|
|
112
106
|
<div className="selector">
|
|
113
107
|
<VersionSelect
|
|
114
108
|
versions={versions}
|
|
115
|
-
label=
|
|
116
|
-
id=
|
|
109
|
+
label="Imágenes"
|
|
110
|
+
id="image"
|
|
117
111
|
selectedVersions={selectedVersions}
|
|
118
112
|
onChange={(e) => onChange(e)}
|
|
119
113
|
/>
|
|
@@ -121,13 +115,13 @@ export const Children = (
|
|
|
121
115
|
</div>
|
|
122
116
|
<div className="buttons-container">
|
|
123
117
|
<Button
|
|
124
|
-
label=
|
|
125
|
-
buttonType=
|
|
118
|
+
label="Atrás"
|
|
119
|
+
buttonType="general-transparent-button"
|
|
126
120
|
onClick={() => setStep("version-options")}
|
|
127
121
|
/>
|
|
128
122
|
<Button
|
|
129
|
-
label=
|
|
130
|
-
buttonType=
|
|
123
|
+
label="Continuar"
|
|
124
|
+
buttonType="general-default-button"
|
|
131
125
|
onClick={() => createVersion()}
|
|
132
126
|
/>
|
|
133
127
|
</div>
|