contentoh-components-library 21.2.10 → 21.2.13

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.
@@ -38,11 +38,13 @@ var GalleryElement = function GalleryElement(_ref) {
38
38
  imageInputs = _ref.imageInputs,
39
39
  imageType = _ref.imageType,
40
40
  imagePackagingType = _ref.imagePackagingType,
41
+ imageShotType = _ref.imageShotType,
41
42
  changeImage = _ref.changeImage,
42
43
  selectedImages = _ref.selectedImages,
43
44
  setSelectedImages = _ref.setSelectedImages,
44
45
  setCheckAll = _ref.setCheckAll,
45
- setSocketType = _ref.setSocketType;
46
+ setSocketType = _ref.setSocketType,
47
+ shotThd = _ref.shotThd;
46
48
 
47
49
  var _useState = (0, _react.useState)(validation),
48
50
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -149,6 +151,19 @@ var GalleryElement = function GalleryElement(_ref) {
149
151
  index: number
150
152
  });
151
153
  }
154
+ }), shotThd && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, {
155
+ width: "100%",
156
+ placeholder: "Tipo de imagen THD",
157
+ options: imageShotType,
158
+ valueSelected: image.image_shot_type,
159
+ onChange: function onChange(e) {
160
+ changeImage({
161
+ action: "changeShotType",
162
+ attribute: "image_shot_type",
163
+ value: +e.target.value,
164
+ index: number
165
+ });
166
+ }
152
167
  })]
153
168
  })]
154
169
  })]
@@ -13,7 +13,8 @@ var _jsxRuntime = require("react/jsx-runtime");
13
13
 
14
14
  var GalleryHeader = function GalleryHeader(_ref) {
15
15
  var setCheckAll = _ref.setCheckAll,
16
- setSelectedImages = _ref.setSelectedImages;
16
+ setSelectedImages = _ref.setSelectedImages,
17
+ shotThd = _ref.shotThd;
17
18
 
18
19
  var checkAll = function checkAll(e) {
19
20
  var checkboxList = document.querySelectorAll("[id^='gallery-element-']");
@@ -53,6 +54,9 @@ var GalleryHeader = function GalleryHeader(_ref) {
53
54
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
54
55
  className: "",
55
56
  children: "Tipo de empaque"
57
+ }), shotThd && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
58
+ className: "",
59
+ children: "Tipo de imagen THD"
56
60
  })]
57
61
  });
58
62
  };
@@ -20,7 +20,7 @@ var _LabelToInput = _interopRequireDefault(require("../../atoms/LabelToInput"));
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
21
 
22
22
  var ImageDataTable = function ImageDataTable(_ref) {
23
- var _lists$inputs, _lists$inputs$find, _lists$imagePackaging, _lists$imagePackaging2, _lists$imageType, _lists$imageType$find, _lists$attrForImgs, _lists$attrForImgs$ge;
23
+ var _lists$inputs, _lists$inputs$find, _lists$imagePackaging, _lists$imagePackaging2, _lists$imageType, _lists$imageType$find, _lists$imageShotType, _lists$imageShotType$, _lists$attrForImgs, _lists$attrForImgs$ge;
24
24
 
25
25
  var activeImage = _ref.activeImage,
26
26
  darkMode = _ref.darkMode,
@@ -34,7 +34,8 @@ var ImageDataTable = function ImageDataTable(_ref) {
34
34
  onClickSave = _ref.onClickSave,
35
35
  showSaveButton = _ref.showSaveButton,
36
36
  version = _ref.version,
37
- setShowVersionSelector = _ref.setShowVersionSelector;
37
+ setShowVersionSelector = _ref.setShowVersionSelector,
38
+ shotThd = _ref.shotThd;
38
39
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
39
40
  darkMode: darkMode,
40
41
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TableHeader.TableHeader, {
@@ -77,6 +78,16 @@ var ImageDataTable = function ImageDataTable(_ref) {
77
78
  return f.id === +(activeImage === null || activeImage === void 0 ? void 0 : activeImage.image_type);
78
79
  })) === null || _lists$imageType$find === void 0 ? void 0 : _lists$imageType$find.name) || "-"
79
80
  })]
81
+ }), shotThd && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles2.Container, {
82
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
83
+ headerType: "table-row-text",
84
+ text: "Tipo de imagen THD"
85
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
86
+ headerType: "table-row-text gray-table-row",
87
+ text: (lists === null || lists === void 0 ? void 0 : (_lists$imageShotType = lists.imageShotType) === null || _lists$imageShotType === void 0 ? void 0 : (_lists$imageShotType$ = _lists$imageShotType.find(function (f) {
88
+ return f.id === +(activeImage === null || activeImage === void 0 ? void 0 : activeImage.image_shot_type);
89
+ })) === null || _lists$imageShotType$ === void 0 ? void 0 : _lists$imageShotType$.type_shot) || "-"
90
+ })]
80
91
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles2.Container, {
81
92
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
82
93
  headerType: "table-row-text",
@@ -1545,10 +1545,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1545
1545
 
1546
1546
  case 8:
1547
1547
  evalResponse = _context13.sent;
1548
- console.log(evalResponse.map(function (_ref15) {
1549
- var data = _ref15.data;
1550
- return JSON.parse(data.body);
1551
- }));
1552
1548
  userType = user.is_retailer === 1 ? "CA" : "P";
1553
1549
  productTemp = product;
1554
1550
  productTemp.article_status = "".concat(result).concat(userType);
@@ -1577,24 +1573,24 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1577
1573
  idCategory: productTemp.article.id_category,
1578
1574
  product: productTemp
1579
1575
  }));
1580
- _context13.next = 26;
1576
+ _context13.next = 25;
1581
1577
  return loadData();
1582
1578
 
1583
- case 26:
1584
- _context13.next = 31;
1579
+ case 25:
1580
+ _context13.next = 30;
1585
1581
  break;
1586
1582
 
1587
- case 28:
1588
- _context13.prev = 28;
1583
+ case 27:
1584
+ _context13.prev = 27;
1589
1585
  _context13.t0 = _context13["catch"](0);
1590
1586
  console.log(_context13.t0);
1591
1587
 
1592
- case 31:
1588
+ case 30:
1593
1589
  case "end":
1594
1590
  return _context13.stop();
1595
1591
  }
1596
1592
  }
1597
- }, _callee13, null, [[0, 28]]);
1593
+ }, _callee13, null, [[0, 27]]);
1598
1594
  }));
1599
1595
 
1600
1596
  return function validateAll(_x8) {
@@ -1603,7 +1599,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1603
1599
  }();
1604
1600
 
1605
1601
  var evaluationToRetailer = /*#__PURE__*/function () {
1606
- var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(result) {
1602
+ var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(result) {
1607
1603
  var data, prod, statusComplete;
1608
1604
  return _regenerator.default.wrap(function _callee14$(_context14) {
1609
1605
  while (1) {
@@ -1645,7 +1641,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1645
1641
  }));
1646
1642
 
1647
1643
  return function evaluationToRetailer(_x9) {
1648
- return _ref16.apply(this, arguments);
1644
+ return _ref15.apply(this, arguments);
1649
1645
  };
1650
1646
  }();
1651
1647
 
@@ -31,46 +31,46 @@ RetailerProductEditionDefault.args = {
31
31
  "Ficha técnica": false,
32
32
  Imágenes: false
33
33
  },
34
- token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwYjY2YTRhOS03NzkwLTQwMzQtYTMwYS1jMDA4MDg5NjI4NjciLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjBiNjZhNGE5LTc3OTAtNDAzNC1hMzBhLWMwMDgwODk2Mjg2NyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiIzNmIxMmUwMy0xOWJhLTRiMDktYWJiYS1kZjk3ZTFkNThjZTQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MDE4MjgzNywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MDE4NjQzNywiaWF0IjoxNjYwMTgyODM3LCJlbWFpbCI6ImJheWFkaTE1MzhAbW5xbG0uY29tIn0.MM9nIHkrRIS2o8_s4BR6VTLgyw3ryvPrr-mf6RtnQ4smng2Q3fmtK07zInNcvcrv8EXO5J9z47_NZ5MOJDo1Pz1CV2cOYM7PT5tEn3F-W4SitqDbBw3KxfkqSMxdZUIHLWECGL-u2ATCYU2J4KRVQi8XSP1qbfv1hu9dh-vID8Fq641ccQwEqUDC13pshDPlR08legg7AAPJqoilV7wuvxqTYAK6fGqMS5jcdW2iDmU0ti9gkydXkYRIC-jg446VOmRCpwzKsk4UAPwlrGeodQ0LV1bfWn_-KVspWCRQd6U5WbFxHn0umYe3CvvPpyVmHzD3F_EMxaVyqV5aW5IoIQ",
34
+ token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTNhNzQ1Ny1mOTQzLTRiYzktOGViMC04NmI0MWY1YmQ0ZjgiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjcxM2E3NDU3LWY5NDMtNGJjOS04ZWIwLTg2YjQxZjViZDRmOCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlM2ExZmQ2OC02OTAwLTRjNWYtYjM5MC1jNjY0MDZhZjkyMGYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MTU0ODI4NSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MTU1MTg4NSwiaWF0IjoxNjYxNTQ4Mjg1LCJlbWFpbCI6ImhjYXJyaWxsb0Bjb250ZW50b2guY29tIn0.GUmPbOrd8-llRODdaidjReKHBwrVbGV5LP37aD_o14BQ67VSmH2pxLvrZRBNsZhvP0vZuetXt19pyiFgCr1-SF5CMHD3dcnPq2Ka0PUEf8raNEoseCPGaDUugu-waz1qPadZN1OrlhQTm9mOWoGj4u0gQv5FGAbC6xMcRernAo4QX41-Pfjvp2u7p62BYkp6rafzTjazUHZiG-ueqPI9QQQ-2zkbTo46l7TFYz6ATNSiZEvezc52L1nzWDhI5Q8xbNA546WC-leLr30SV9vrXBTGdvLdCKeqEYPrVG1L3nXXZ9CvtHJjdkb60irWZjXT1LbpulfL3IqO2_PKHTUpHQ",
35
35
  productSelected: {
36
36
  "services": {
37
37
  "datasheets": 1,
38
38
  "descriptions": 1,
39
39
  "images": 1
40
40
  },
41
- "orderId": 1810,
42
- "status": "RP",
43
- "datasheet_status": "RP",
41
+ "orderId": 2674,
42
+ "status": "PA",
43
+ "datasheet_status": "PA",
44
44
  "prio": "none",
45
45
  "version": 2,
46
- "description_status": "RP",
47
- "images_status": "RP",
46
+ "description_status": "PA",
47
+ "images_status": "PA",
48
48
  "article": {
49
- "id_article": 68934,
50
- "id_category": "2290",
51
- "name": "SCOTCHBLUE  3PACK MASKING TAPE 24MMX55M",
52
- "upc": "167907",
53
- "timestamp": "2022-06-22T15:44:57.000Z",
54
- "id_user": 704,
49
+ "id_article": 80969,
50
+ "id_category": "2044",
51
+ "name": "CABLE IUSA THWLS/THHWLS 10 AWG COLOR VERDE EN CARRETE DE 100 M",
52
+ "upc": "168594",
53
+ "timestamp": "2022-08-26T21:11:06.000Z",
54
+ "id_user": 651,
55
55
  "status": "NULL",
56
56
  "active": 1,
57
- "company_id": 437,
57
+ "company_id": 388,
58
58
  "SKU": null,
59
59
  "Descripcion": null,
60
60
  "Proveedor": null,
61
61
  "id_proveedor": 0,
62
62
  "company_name": "",
63
63
  "country": null,
64
- "id_order": 1810,
65
- "id_datasheet_especialist": 1248,
66
- "id_datasheet_facilitator": 1252,
67
- "id_description_especialist": 1248,
68
- "id_description_facilitator": 1252,
69
- "id_images_especialist": 1251,
70
- "id_images_facilitator": 1286,
71
- "id_auditor": 514,
64
+ "id_order": 2674,
65
+ "id_datasheet_especialist": null,
66
+ "id_datasheet_facilitator": null,
67
+ "id_description_especialist": null,
68
+ "id_description_facilitator": null,
69
+ "id_images_especialist": null,
70
+ "id_images_facilitator": null,
71
+ "id_auditor": null,
72
72
  "id_recepcionist": null,
73
- "category": "Pinturas|Herramientas y accesorios para pintar|Cintas",
73
+ "category": "Eléctrico|Cables Eléctricos|Cables Eléctricos",
74
74
  "missingAttributes": null,
75
75
  "missingDescriptions": null,
76
76
  "missingImages": null
@@ -83,7 +83,7 @@ RetailerProductEditionDefault.args = {
83
83
  "active": 1
84
84
  }],
85
85
  "country": null,
86
- "upc": "167907"
86
+ "upc": "168594"
87
87
  },
88
88
  location: {
89
89
  product: {
@@ -92,36 +92,36 @@ RetailerProductEditionDefault.args = {
92
92
  }
93
93
  },
94
94
  user: {
95
- id_user: 1248,
96
- name: "Facilitador Textos",
97
- last_name: " ",
98
- email: "bayadi1538@mnqlm.com",
99
- position: "Tester",
95
+ id_user: 65,
96
+ name: "Oscar",
97
+ last_name: "Arenas",
98
+ email: "oarenas@contentoh.com",
99
+ position: null,
100
100
  telephone: null,
101
101
  country: null,
102
- id_company: 254,
103
- id_cognito: "0b66a4a9-7790-4034-a30a-c00808962867",
102
+ id_company: 2,
103
+ id_cognito: "73cc8d40-c841-422a-a2f2-e69d7fe26ebf",
104
104
  birth_Date: null,
105
105
  about_me: null,
106
106
  zip_code: null,
107
107
  address: null,
108
108
  job: null,
109
109
  id_stripe: null,
110
- id_role: 7,
110
+ id_role: 1,
111
111
  active: 1,
112
112
  is_retailer: 0,
113
- email_notify: null,
113
+ email_notify: 0,
114
114
  membership: {
115
- id: 750,
116
- start_date: "2022-01-07T21:32:54.000Z",
117
- end_date: "2023-01-07T21:32:54.000Z",
118
- planID: 6,
119
- plan: "prod_KvGd6YSTJyR3AP",
120
- name: "Plan Small",
121
- user_limit: "10",
122
- products_limit: "1000",
123
- type: "Enterprise"
115
+ id: 2,
116
+ start_date: "2021-11-05T02:35:12.000Z",
117
+ end_date: "2022-11-05T02:34:49.000Z",
118
+ planID: 1,
119
+ plan: "prod_KtkvuFFLpOdP6e",
120
+ name: "Plan Free",
121
+ user_limit: "1",
122
+ products_limit: "3",
123
+ type: "PyMES"
124
124
  },
125
- src: "https://content-management-profile-prod.s3.amazonaws.com/id-423/423.png?1660182839373"
125
+ src: "https://content-management-profile.s3.amazonaws.com/id-65/65.png?1661554813155"
126
126
  }
127
127
  };
@@ -116,6 +116,12 @@ var reducerImages = function reducerImages(state, action) {
116
116
  values: values
117
117
  });
118
118
 
119
+ case "changeShotType":
120
+ values[action.index][action.attribute] = action.value;
121
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
122
+ values: values
123
+ });
124
+
119
125
  case "changeAttrValue":
120
126
  var index = attrForImgs.general.findIndex(function (f) {
121
127
  return f.id === action.id;
@@ -445,6 +451,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
445
451
  showVersionSelector = _useCloseModal2[0],
446
452
  setShowVersionSelector = _useCloseModal2[1];
447
453
 
454
+ var shotThd = [58, 59, 60, 61].includes(activeRetailer.id);
448
455
  (0, _react.useEffect)(function () {
449
456
  checkAll && setSelectedImages(images.values);
450
457
  }, [checkAll]);
@@ -719,7 +726,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
719
726
  }, [activeRetailer, services]);
720
727
 
721
728
  var thumbs = function thumbs() {
722
- var _images$imageType, _images$imagePackagin, _images$values;
729
+ var _images$imageType, _images$imagePackagin, _images$imageShotType, _images$values;
723
730
 
724
731
  var imageInputs = socketType === null || socketType === void 0 ? void 0 : socketType.slice();
725
732
  var imageType = images === null || images === void 0 ? void 0 : (_images$imageType = images.imageType) === null || _images$imageType === void 0 ? void 0 : _images$imageType.map(function (e) {
@@ -734,6 +741,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
734
741
  name: e === null || e === void 0 ? void 0 : e.name
735
742
  };
736
743
  });
744
+ var imageShotType = images === null || images === void 0 ? void 0 : (_images$imageShotType = images.imageShotType) === null || _images$imageShotType === void 0 ? void 0 : _images$imageShotType.map(function (e) {
745
+ return {
746
+ value: e === null || e === void 0 ? void 0 : e.id,
747
+ name: e === null || e === void 0 ? void 0 : e.type_shot
748
+ };
749
+ });
737
750
  return images === null || images === void 0 ? void 0 : (_images$values = images.values) === null || _images$values === void 0 ? void 0 : _images$values.map(function (image, index) {
738
751
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryElement.GalleryElement, {
739
752
  setCheckAll: setCheckAll,
@@ -745,10 +758,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
745
758
  imageType: imageType,
746
759
  imagePackagingType: imagePackagingType,
747
760
  imageInputs: imageInputs,
761
+ imageShotType: imageShotType,
748
762
  setSocketType: setSocketType,
749
763
  changeImage: setImages,
750
764
  selectedImages: selectedImages,
751
- setSelectedImages: setSelectedImages
765
+ setSelectedImages: setSelectedImages,
766
+ shotThd: shotThd
752
767
  }, index + "-" + imageType.name);
753
768
  });
754
769
  };
@@ -1098,11 +1113,11 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1098
1113
  switch (userId) {
1099
1114
  case 7:
1100
1115
  case 8:
1101
- return statusArray.includes(srvActive) && (["RA", "RC"].includes(product === null || product === void 0 ? void 0 : product.status) || srv.filter(function (serv) {
1116
+ return statusArray.includes(srvActive) && statusArray.includes(product === null || product === void 0 ? void 0 : product.status) || srv.filter(function (serv) {
1102
1117
  var _serv$status;
1103
1118
 
1104
- return ["CA"].includes((_serv$status = serv.status) === null || _serv$status === void 0 ? void 0 : _serv$status.replace(/.*\//, ""));
1105
- }).length === srv.length);
1119
+ return statusArray.includes((_serv$status = serv.status) === null || _serv$status === void 0 ? void 0 : _serv$status.replace(/.*\//, ""));
1120
+ }).length === srv.length;
1106
1121
 
1107
1122
  case 4:
1108
1123
  case 5:
@@ -1752,7 +1767,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1752
1767
  },
1753
1768
  showSaveButton: auditorAssigned() || userAssigned(),
1754
1769
  setShowVersionSelector: setShowVersionSelector,
1755
- version: version
1770
+ version: version,
1771
+ shotThd: shotThd
1756
1772
  })]
1757
1773
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1758
1774
  className: "product-information",
@@ -1858,7 +1874,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1858
1874
  children: [!imageLayout && activeTab === "Imágenes" && (product === null || product === void 0 ? void 0 : (_product$services2 = product.services) === null || _product$services2 === void 0 ? void 0 : _product$services2.images) === 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryHeader.GalleryHeader, {
1859
1875
  setSelectedImages: setSelectedImages,
1860
1876
  checkAll: checkAll,
1861
- setCheckAll: setCheckAll
1877
+ setCheckAll: setCheckAll,
1878
+ shotThd: shotThd
1862
1879
  }), activeTab === "Ficha técnica" && ((product === null || product === void 0 ? void 0 : product.datasheet_status) !== "NS" ? (_datasheets$ = datasheets[0]) === null || _datasheets$ === void 0 ? void 0 : (_datasheets$$data = _datasheets$.data) === null || _datasheets$$data === void 0 ? void 0 : _datasheets$$data.map(function (dataGroup, index) {
1863
1880
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
1864
1881
  articleId: product.article.id_article,
@@ -1897,7 +1914,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1897
1914
  headerType: "input-name-header"
1898
1915
  }))]
1899
1916
  })
1900
- }), console.log(userAssigned(activeTab), auditorAssigned()), (userAssigned(activeTab) || auditorAssigned()) && product["".concat(getConcept(activeTab), "_status")] !== "NS" && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1917
+ }), (userAssigned(activeTab) || auditorAssigned()) && product["".concat(getConcept(activeTab), "_status")] !== "NS" && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1901
1918
  className: "commentary-box",
1902
1919
  children: [!comment ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1903
1920
  className: "commentary",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.2.10",
3
+ "version": "21.2.13",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -16,11 +16,13 @@ export const GalleryElement = ({
16
16
  imageInputs,
17
17
  imageType,
18
18
  imagePackagingType,
19
+ imageShotType,
19
20
  changeImage,
20
21
  selectedImages,
21
22
  setSelectedImages,
22
23
  setCheckAll,
23
24
  setSocketType,
25
+ shotThd,
24
26
  }) => {
25
27
  const [statusValidation, setStatusValidation] = useState(validation);
26
28
  const [showValidationPanel, setShowValidationPanel] = useState(false);
@@ -118,6 +120,22 @@ export const GalleryElement = ({
118
120
  });
119
121
  }}
120
122
  />
123
+ {shotThd && (
124
+ <Select
125
+ width="100%"
126
+ placeholder="Tipo de imagen THD"
127
+ options={imageShotType}
128
+ valueSelected={image.image_shot_type}
129
+ onChange={(e) => {
130
+ changeImage({
131
+ action: "changeShotType",
132
+ attribute: "image_shot_type",
133
+ value: +e.target.value,
134
+ index: number,
135
+ });
136
+ }}
137
+ />
138
+ )}
121
139
  </>
122
140
  )}
123
141
  </div>
@@ -1,7 +1,7 @@
1
1
  import { Container } from "./styles";
2
2
  import { CheckBox } from "../../atoms/CheckBox";
3
3
 
4
- export const GalleryHeader = ({ setCheckAll, setSelectedImages }) => {
4
+ export const GalleryHeader = ({ setCheckAll, setSelectedImages, shotThd }) => {
5
5
  const checkAll = (e) => {
6
6
  const checkboxList = document.querySelectorAll("[id^='gallery-element-']");
7
7
  checkboxList.forEach((chk) => (chk.checked = e.target.checked));
@@ -20,6 +20,7 @@ export const GalleryHeader = ({ setCheckAll, setSelectedImages }) => {
20
20
  <p className="">Tipo de toma</p>
21
21
  <p className="">Tipo de imagen</p>
22
22
  <p className="">Tipo de empaque</p>
23
+ {shotThd && <p className="">Tipo de imagen THD</p>}
23
24
  </Container>
24
25
  );
25
26
  };
@@ -18,6 +18,7 @@ export const ImageDataTable = ({
18
18
  showSaveButton,
19
19
  version,
20
20
  setShowVersionSelector,
21
+ shotThd,
21
22
  }) => {
22
23
  return (
23
24
  <Container darkMode={darkMode}>
@@ -63,6 +64,22 @@ export const ImageDataTable = ({
63
64
  }
64
65
  />
65
66
  </Row>
67
+ {shotThd && (
68
+ <Row>
69
+ <ScreenHeader
70
+ headerType={"table-row-text"}
71
+ text="Tipo de imagen THD"
72
+ />
73
+ <ScreenHeader
74
+ headerType={"table-row-text gray-table-row"}
75
+ text={
76
+ lists?.imageShotType?.find(
77
+ (f) => f.id === +activeImage?.image_shot_type
78
+ )?.type_shot || "-"
79
+ }
80
+ />
81
+ </Row>
82
+ )}
66
83
  <Row>
67
84
  <ScreenHeader headerType={"table-row-text"} text="Formato" />
68
85
  <ScreenHeader
@@ -938,7 +938,6 @@ export const ProviderProductEdition = ({
938
938
  );
939
939
  });
940
940
  const evalResponse = await Promise.all(evaluationArray);
941
- console.log(evalResponse.map(({ data }) => JSON.parse(data.body)));
942
941
  const userType = user.is_retailer === 1 ? "CA" : "P";
943
942
 
944
943
  const productTemp = product;
@@ -16,46 +16,46 @@ RetailerProductEditionDefault.args = {
16
16
  Imágenes: false,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwYjY2YTRhOS03NzkwLTQwMzQtYTMwYS1jMDA4MDg5NjI4NjciLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjBiNjZhNGE5LTc3OTAtNDAzNC1hMzBhLWMwMDgwODk2Mjg2NyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiIzNmIxMmUwMy0xOWJhLTRiMDktYWJiYS1kZjk3ZTFkNThjZTQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MDE4MjgzNywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MDE4NjQzNywiaWF0IjoxNjYwMTgyODM3LCJlbWFpbCI6ImJheWFkaTE1MzhAbW5xbG0uY29tIn0.MM9nIHkrRIS2o8_s4BR6VTLgyw3ryvPrr-mf6RtnQ4smng2Q3fmtK07zInNcvcrv8EXO5J9z47_NZ5MOJDo1Pz1CV2cOYM7PT5tEn3F-W4SitqDbBw3KxfkqSMxdZUIHLWECGL-u2ATCYU2J4KRVQi8XSP1qbfv1hu9dh-vID8Fq641ccQwEqUDC13pshDPlR08legg7AAPJqoilV7wuvxqTYAK6fGqMS5jcdW2iDmU0ti9gkydXkYRIC-jg446VOmRCpwzKsk4UAPwlrGeodQ0LV1bfWn_-KVspWCRQd6U5WbFxHn0umYe3CvvPpyVmHzD3F_EMxaVyqV5aW5IoIQ",
19
+ "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTNhNzQ1Ny1mOTQzLTRiYzktOGViMC04NmI0MWY1YmQ0ZjgiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjcxM2E3NDU3LWY5NDMtNGJjOS04ZWIwLTg2YjQxZjViZDRmOCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlM2ExZmQ2OC02OTAwLTRjNWYtYjM5MC1jNjY0MDZhZjkyMGYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MTU0ODI4NSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MTU1MTg4NSwiaWF0IjoxNjYxNTQ4Mjg1LCJlbWFpbCI6ImhjYXJyaWxsb0Bjb250ZW50b2guY29tIn0.GUmPbOrd8-llRODdaidjReKHBwrVbGV5LP37aD_o14BQ67VSmH2pxLvrZRBNsZhvP0vZuetXt19pyiFgCr1-SF5CMHD3dcnPq2Ka0PUEf8raNEoseCPGaDUugu-waz1qPadZN1OrlhQTm9mOWoGj4u0gQv5FGAbC6xMcRernAo4QX41-Pfjvp2u7p62BYkp6rafzTjazUHZiG-ueqPI9QQQ-2zkbTo46l7TFYz6ATNSiZEvezc52L1nzWDhI5Q8xbNA546WC-leLr30SV9vrXBTGdvLdCKeqEYPrVG1L3nXXZ9CvtHJjdkb60irWZjXT1LbpulfL3IqO2_PKHTUpHQ",
20
20
  productSelected: {
21
21
  "services": {
22
22
  "datasheets": 1,
23
23
  "descriptions": 1,
24
24
  "images": 1
25
25
  },
26
- "orderId": 1810,
27
- "status": "RP",
28
- "datasheet_status": "RP",
26
+ "orderId": 2674,
27
+ "status": "PA",
28
+ "datasheet_status": "PA",
29
29
  "prio": "none",
30
30
  "version": 2,
31
- "description_status": "RP",
32
- "images_status": "RP",
31
+ "description_status": "PA",
32
+ "images_status": "PA",
33
33
  "article": {
34
- "id_article": 68934,
35
- "id_category": "2290",
36
- "name": "SCOTCHBLUE  3PACK MASKING TAPE 24MMX55M",
37
- "upc": "167907",
38
- "timestamp": "2022-06-22T15:44:57.000Z",
39
- "id_user": 704,
34
+ "id_article": 80969,
35
+ "id_category": "2044",
36
+ "name": "CABLE IUSA THWLS/THHWLS 10 AWG COLOR VERDE EN CARRETE DE 100 M",
37
+ "upc": "168594",
38
+ "timestamp": "2022-08-26T21:11:06.000Z",
39
+ "id_user": 651,
40
40
  "status": "NULL",
41
41
  "active": 1,
42
- "company_id": 437,
42
+ "company_id": 388,
43
43
  "SKU": null,
44
44
  "Descripcion": null,
45
45
  "Proveedor": null,
46
46
  "id_proveedor": 0,
47
47
  "company_name": "",
48
48
  "country": null,
49
- "id_order": 1810,
50
- "id_datasheet_especialist": 1248,
51
- "id_datasheet_facilitator": 1252,
52
- "id_description_especialist": 1248,
53
- "id_description_facilitator": 1252,
54
- "id_images_especialist": 1251,
55
- "id_images_facilitator": 1286,
56
- "id_auditor": 514,
49
+ "id_order": 2674,
50
+ "id_datasheet_especialist": null,
51
+ "id_datasheet_facilitator": null,
52
+ "id_description_especialist": null,
53
+ "id_description_facilitator": null,
54
+ "id_images_especialist": null,
55
+ "id_images_facilitator": null,
56
+ "id_auditor": null,
57
57
  "id_recepcionist": null,
58
- "category": "Pinturas|Herramientas y accesorios para pintar|Cintas",
58
+ "category": "Eléctrico|Cables Eléctricos|Cables Eléctricos",
59
59
  "missingAttributes": null,
60
60
  "missingDescriptions": null,
61
61
  "missingImages": null
@@ -70,42 +70,42 @@ RetailerProductEditionDefault.args = {
70
70
  }
71
71
  ],
72
72
  "country": null,
73
- "upc": "167907"
73
+ "upc": "168594"
74
74
  },
75
75
  location: {
76
76
  product: { articleId: 109485, versionId: 3 },
77
77
  },
78
78
  user: {
79
- id_user: 1248,
80
- name: "Facilitador Textos",
81
- last_name: " ",
82
- email: "bayadi1538@mnqlm.com",
83
- position: "Tester",
79
+ id_user: 65,
80
+ name: "Oscar",
81
+ last_name: "Arenas",
82
+ email: "oarenas@contentoh.com",
83
+ position: null,
84
84
  telephone: null,
85
85
  country: null,
86
- id_company: 254,
87
- id_cognito: "0b66a4a9-7790-4034-a30a-c00808962867",
86
+ id_company: 2,
87
+ id_cognito: "73cc8d40-c841-422a-a2f2-e69d7fe26ebf",
88
88
  birth_Date: null,
89
89
  about_me: null,
90
90
  zip_code: null,
91
91
  address: null,
92
92
  job: null,
93
93
  id_stripe: null,
94
- id_role: 7,
94
+ id_role: 1,
95
95
  active: 1,
96
96
  is_retailer: 0,
97
- email_notify: null,
97
+ email_notify: 0,
98
98
  membership: {
99
- id: 750,
100
- start_date: "2022-01-07T21:32:54.000Z",
101
- end_date: "2023-01-07T21:32:54.000Z",
102
- planID: 6,
103
- plan: "prod_KvGd6YSTJyR3AP",
104
- name: "Plan Small",
105
- user_limit: "10",
106
- products_limit: "1000",
107
- type: "Enterprise",
99
+ id: 2,
100
+ start_date: "2021-11-05T02:35:12.000Z",
101
+ end_date: "2022-11-05T02:34:49.000Z",
102
+ planID: 1,
103
+ plan: "prod_KtkvuFFLpOdP6e",
104
+ name: "Plan Free",
105
+ user_limit: "1",
106
+ products_limit: "3",
107
+ type: "PyMES",
108
108
  },
109
- src: "https://content-management-profile-prod.s3.amazonaws.com/id-423/423.png?1660182839373",
109
+ src: "https://content-management-profile.s3.amazonaws.com/id-65/65.png?1661554813155",
110
110
  },
111
111
  };
@@ -59,6 +59,10 @@ const reducerImages = (state, action) => {
59
59
  case "changeImageInfo":
60
60
  values[action.index][action.attribute] = action.value;
61
61
  return { ...state, values };
62
+ case "changeShotType":
63
+ values[action.index][action.attribute] = action.value;
64
+ return { ...state, values };
65
+
62
66
  case "changeAttrValue":
63
67
  const index = attrForImgs.general.findIndex((f) => f.id === action.id);
64
68
  if (index !== -1) {
@@ -209,6 +213,7 @@ export const RetailerProductEdition = ({
209
213
  const [showCreateVersion, setShowCreateVersion] = useState(false);
210
214
  const [showVersionSelector, setShowVersionSelector] =
211
215
  useCloseModal("version-selector");
216
+ const shotThd = [58, 59, 60, 61].includes(activeRetailer.id);
212
217
 
213
218
  useEffect(() => {
214
219
  checkAll && setSelectedImages(images.values);
@@ -409,6 +414,10 @@ export const RetailerProductEdition = ({
409
414
  value: e?.id,
410
415
  name: e?.name,
411
416
  }));
417
+ const imageShotType = images?.imageShotType?.map((e) => ({
418
+ value: e?.id,
419
+ name: e?.type_shot,
420
+ }));
412
421
  return images?.values?.map((image, index) => (
413
422
  <GalleryElement
414
423
  setCheckAll={setCheckAll}
@@ -421,10 +430,12 @@ export const RetailerProductEdition = ({
421
430
  imageType={imageType}
422
431
  imagePackagingType={imagePackagingType}
423
432
  imageInputs={imageInputs}
433
+ imageShotType={imageShotType}
424
434
  setSocketType={setSocketType}
425
435
  changeImage={setImages}
426
436
  selectedImages={selectedImages}
427
437
  setSelectedImages={setSelectedImages}
438
+ shotThd={shotThd}
428
439
  />
429
440
  ));
430
441
  };
@@ -645,11 +656,11 @@ export const RetailerProductEdition = ({
645
656
  case 7:
646
657
  case 8:
647
658
  return (
648
- statusArray.includes(srvActive) &&
649
- (["RA", "RC"].includes(product?.status) ||
650
- srv.filter((serv) =>
651
- ["CA"].includes(serv.status?.replace(/.*\//, ""))
652
- ).length === srv.length)
659
+ (statusArray.includes(srvActive) &&
660
+ statusArray.includes(product?.status)) ||
661
+ srv.filter((serv) =>
662
+ statusArray.includes(serv.status?.replace(/.*\//, ""))
663
+ ).length === srv.length
653
664
  );
654
665
  case 4:
655
666
  case 5:
@@ -1187,6 +1198,7 @@ export const RetailerProductEdition = ({
1187
1198
  showSaveButton={auditorAssigned() || userAssigned()}
1188
1199
  setShowVersionSelector={setShowVersionSelector}
1189
1200
  version={version}
1201
+ shotThd={shotThd}
1190
1202
  />
1191
1203
  </div>
1192
1204
  <div className="product-information">
@@ -1330,6 +1342,7 @@ export const RetailerProductEdition = ({
1330
1342
  setSelectedImages={setSelectedImages}
1331
1343
  checkAll={checkAll}
1332
1344
  setCheckAll={setCheckAll}
1345
+ shotThd={shotThd}
1333
1346
  />
1334
1347
  )}
1335
1348
  {activeTab === "Ficha técnica" &&
@@ -1387,7 +1400,6 @@ export const RetailerProductEdition = ({
1387
1400
  </>
1388
1401
  )}
1389
1402
  </div>
1390
- {console.log(userAssigned(activeTab), auditorAssigned())}
1391
1403
  {(userAssigned(activeTab) || auditorAssigned()) &&
1392
1404
  product[`${getConcept(activeTab)}_status`] !== "NS" && (
1393
1405
  <div className="commentary-box">
@@ -1,48 +0,0 @@
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.default = exports.StatusTagDefault = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
-
12
- var _index = require("./index");
13
-
14
- var _variables = require("../../../global-files/variables");
15
-
16
- var _jsxRuntime = require("react/jsx-runtime");
17
-
18
- var status = _variables.GlobalStatus;
19
- var _default = {
20
- title: "Components/atoms/StatusTag",
21
- component: _index.StatusTag,
22
- argTypes: {
23
- statusType: {
24
- options: status,
25
- control: {
26
- type: "select"
27
- }
28
- },
29
- ovalForm: {
30
- options: [true, false],
31
- control: {
32
- type: "boolean"
33
- }
34
- }
35
- }
36
- };
37
- exports.default = _default;
38
-
39
- var Template = function Template(args) {
40
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.StatusTag, (0, _objectSpread2.default)({}, args));
41
- };
42
-
43
- var StatusTagDefault = Template.bind({});
44
- exports.StatusTagDefault = StatusTagDefault;
45
- StatusTagDefault.args = {
46
- statusType: "-",
47
- ovalForm: false
48
- };
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.StatusTag = void 0;
7
-
8
- var _styles = require("./styles");
9
-
10
- var _jsxRuntime = require("react/jsx-runtime");
11
-
12
- var StatusTag = function StatusTag(_ref) {
13
- var statusType = _ref.statusType,
14
- ovalForm = _ref.ovalForm;
15
-
16
- var getShortStatus = function getShortStatus(status) {
17
- switch (status) {
18
- case "COMPLETED":
19
- return "C";
20
-
21
- case "RECEPTION":
22
- return "Pr";
23
-
24
- case "NULL":
25
- return "-";
26
-
27
- case "RECEIVED":
28
- return "Rc";
29
-
30
- case "IN_PROGRESS":
31
- return "P";
32
-
33
- case "ASSIGNED":
34
- return "As";
35
-
36
- case "APPROVED":
37
- return "Ap";
38
-
39
- case "VALIDATING":
40
- return "V";
41
-
42
- case "PAID_OUT":
43
- return "Po";
44
-
45
- default:
46
- return status;
47
- }
48
- };
49
-
50
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
51
- className: "status-".concat(getShortStatus(statusType), " ").concat(ovalForm && "oval-form"),
52
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
53
- children: getShortStatus(statusType)
54
- })
55
- });
56
- };
57
-
58
- exports.StatusTag = StatusTag;
@@ -1,20 +0,0 @@
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 _variables = require("../../../global-files/variables");
15
-
16
- var _templateObject;
17
-
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n padding: 0 10px;\n height: 20px;\n background-color: ", ";\n border-radius: 3px;\n\n p {\n text-align: center;\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 20px;\n }\n\n &.status-As,\n &.status-P,\n &.status-IN_PROGRESS,\n &.status-QF {\n background-color: ", ";\n }\n\n &.status-Pr,\n &.status-Rr,\n &.status-Rc {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-AC,\n &.status-AF {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RF,\n &.status-RP,\n &.status-RC {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n\n &.oval-form {\n border-radius: 10px;\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.white, _variables.FontFamily.Lato, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
19
-
20
- exports.Container = Container;
@@ -1,37 +0,0 @@
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.default = exports.RegistrationLoginFirstStepDefault = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
-
12
- var _index = require("./index");
13
-
14
- var _loginImage = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/loginImage.svg"));
15
-
16
- var _login = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login2.svg"));
17
-
18
- var _login2 = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login3.svg"));
19
-
20
- var _jsxRuntime = require("react/jsx-runtime");
21
-
22
- var _default = {
23
- title: "Components/pages/RegistrationLoginFirstStep",
24
- component: _index.RegistrationLoginFirstStep
25
- };
26
- exports.default = _default;
27
-
28
- var Template = function Template(args) {
29
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.RegistrationLoginFirstStep, (0, _objectSpread2.default)({}, args));
30
- };
31
-
32
- var RegistrationLoginFirstStepDefault = Template.bind({});
33
- exports.RegistrationLoginFirstStepDefault = RegistrationLoginFirstStepDefault;
34
- RegistrationLoginFirstStepDefault.args = {
35
- imageArrayCarousel: [_loginImage.default, _login.default, _login2.default],
36
- textCarousel: "Elige la plataforma que conecta proovedores y retailers"
37
- };
@@ -1,269 +0,0 @@
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.RegistrationLoginFirstStep = void 0;
9
-
10
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
13
-
14
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
15
-
16
- var _styles = require("./styles");
17
-
18
- var _GradientPanel = require("../../atoms/GradientPanel");
19
-
20
- var _CarouselImagesLogin = require("../../molecules/CarouselImagesLogin");
21
-
22
- var _react = require("react");
23
-
24
- var _LogoImage = require("../../atoms/LogoImage");
25
-
26
- var _ScreenHeader = require("../../atoms/ScreenHeader");
27
-
28
- var _variables = require("../../../global-files/variables");
29
-
30
- var _TagAndInput = require("../../molecules/TagAndInput");
31
-
32
- var _GeneralButton = require("../../atoms/GeneralButton");
33
-
34
- var _GeneralInput = require("../../atoms/GeneralInput");
35
-
36
- var _jsxRuntime = require("react/jsx-runtime");
37
-
38
- var RegistrationLoginFirstStep = function RegistrationLoginFirstStep(_ref) {
39
- var _ref$imageArrayCarous = _ref.imageArrayCarousel,
40
- imageArrayCarousel = _ref$imageArrayCarous === void 0 ? [] : _ref$imageArrayCarous,
41
- textCarousel = _ref.textCarousel,
42
- backogroundColorCarousel = _ref.backogroundColorCarousel;
43
-
44
- var _useState = (0, _react.useState)(false),
45
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
46
- emptyName = _useState2[0],
47
- setEmptyName = _useState2[1];
48
-
49
- var _useState3 = (0, _react.useState)(false),
50
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
51
- emptyLastName = _useState4[0],
52
- setEmptyLastName = _useState4[1];
53
-
54
- var _useState5 = (0, _react.useState)(false),
55
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
56
- emptyEmail = _useState6[0],
57
- setEmptyEmail = _useState6[1];
58
-
59
- var _useState7 = (0, _react.useState)(false),
60
- _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
61
- emptyJob = _useState8[0],
62
- setEmptyJob = _useState8[1];
63
-
64
- var _useState9 = (0, _react.useState)(false),
65
- _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
66
- emptyPhone = _useState10[0],
67
- setEmptyPhone = _useState10[1];
68
-
69
- var _useState11 = (0, _react.useState)(false),
70
- _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
71
- invalidEmail = _useState12[0],
72
- setInvalidEmail = _useState12[1];
73
-
74
- var validate = /*#__PURE__*/function () {
75
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
76
- var name, lastName, email, job, phone;
77
- return _regenerator.default.wrap(function _callee$(_context) {
78
- while (1) {
79
- switch (_context.prev = _context.next) {
80
- case 0:
81
- e.preventDefault();
82
- name = document.querySelector("#nameInput").value;
83
- lastName = document.querySelector("#lastNameInput").value;
84
- email = document.querySelector("#emailInput").value;
85
- job = document.querySelector("#jobInput").value;
86
- phone = document.querySelector("#phoneInput").value;
87
- name === "" ? setEmptyName(true) : setEmptyName(false);
88
- lastName === "" ? setEmptyLastName(true) : setEmptyLastName(false);
89
- email === "" ? setEmptyEmail(true) : setEmptyEmail(false);
90
- job === "" ? setEmptyJob(true) : setEmptyJob(false);
91
- phone === "" ? setEmptyPhone(true) : setEmptyPhone(false);
92
- !/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(email) ? setInvalidEmail(true) : setInvalidEmail(false);
93
-
94
- case 12:
95
- case "end":
96
- return _context.stop();
97
- }
98
- }
99
- }, _callee);
100
- }));
101
-
102
- return function validate(_x) {
103
- return _ref2.apply(this, arguments);
104
- };
105
- }();
106
-
107
- var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
108
- className: "credenciales",
109
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
110
- fontFamily: _variables.FontFamily.AvenirNext,
111
- color: _variables.GlobalColors.s5,
112
- text: "Ingresa tus credenciales"
113
- })
114
- }, "2"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
115
- className: "user",
116
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
117
- className: "name-registration-user",
118
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
119
- inputType: "text",
120
- inputId: "nameInput",
121
- label: "Nombre",
122
- inputPlaceHolder: "Nombre"
123
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
124
- inputType: "text",
125
- inputId: "lastNameInput",
126
- label: "Apellido",
127
- inputPlaceHolder: "Apellido"
128
- })]
129
- }), emptyName && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
130
- children: "Ingrese su nombre"
131
- }), emptyLastName && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
132
- children: "Ingrese sus apellidos"
133
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
134
- inputType: "text",
135
- inputId: "emailInput",
136
- label: "Correo electrónico",
137
- inputPlaceHolder: "username@contentoh.com"
138
- }), emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
139
- children: "Ingrese su correo"
140
- }), invalidEmail && !emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
141
- children: "Ingrese un correo v\xE1lido"
142
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
143
- inputType: "text",
144
- inputId: "jobInput",
145
- label: "Puesto laboral",
146
- inputPlaceHolder: "Puesto dentro de la empresa"
147
- }), emptyJob && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
148
- children: "Ingrese su puesto"
149
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
150
- text: "Teléfono",
151
- headerType: "input-name-header"
152
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
153
- className: "phone-registration-user",
154
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("select", {
155
- name: "select",
156
- className: "phone-options",
157
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
158
- children: "+52"
159
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
160
- children: "+54"
161
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
162
- children: "+57"
163
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
164
- children: "+506"
165
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
166
- children: "+593"
167
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
168
- children: "+503"
169
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
170
- children: "+504"
171
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
172
- children: "+507"
173
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
174
- children: "+51"
175
- })]
176
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralInput.GeneralInput, {
177
- inputId: "phoneInput",
178
- inputType: "text",
179
- inputPlaceholder: "Teléfono"
180
- })]
181
- }), emptyPhone && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
182
- children: "Ingrese su n\xFAmero de tel\xE9fono"
183
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
184
- text: "País",
185
- headerType: "input-name-header"
186
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("select", {
187
- name: "select",
188
- className: "country-options",
189
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
190
- value: "value1",
191
- selected: true,
192
- children: "Selecciona tu pa\xEDs"
193
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
194
- value: "value2",
195
- children: "Argentina"
196
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
197
- value: "value3",
198
- children: "Colombia"
199
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
200
- value: "value2",
201
- children: "Ecuador"
202
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
203
- value: "value3",
204
- children: "El Salvador"
205
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
206
- value: "value2",
207
- children: "Honduras"
208
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
209
- value: "value3",
210
- children: "M\xE9xico"
211
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
212
- value: "value2",
213
- children: "Panam\xE1"
214
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
215
- value: "value3",
216
- children: "Per\xFA"
217
- })]
218
- }), emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
219
- children: "Seleccione su pa\xEDs"
220
- })]
221
- }, "3"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
222
- className: "button-end",
223
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
224
- buttonType: "general-default-button",
225
- label: "Enviar",
226
- onClick: function onClick(e) {
227
- return validate(e);
228
- }
229
- })
230
- }, "4"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
231
- className: "progress-bar",
232
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
233
- className: "progress-bar-first-step"
234
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
235
- className: "progress-bar-registration"
236
- })]
237
- }, "5"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
238
- text: "Paso 1",
239
- headerType: "date-header",
240
- color: _variables.GlobalColors.s4
241
- }, "6"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
242
- className: "new-login",
243
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
244
- className: "pre-registro",
245
- children: ["\xBFYa tienes una cuenta?", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
246
- children: " Inicia Sesi\xF3n"
247
- })]
248
- })
249
- }, "7")];
250
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
251
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
252
- className: "home-retailer",
253
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CarouselImagesLogin.CarouselImagesLogin, {
254
- panelImg: imageArrayCarousel,
255
- panelText: textCarousel,
256
- panelColor: backogroundColorCarousel
257
- })
258
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
259
- className: "home-login-retailer",
260
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
261
- componentsArray: loginRight,
262
- panelType: "home-login",
263
- panelColor: _variables.GlobalColors.white
264
- })
265
- })]
266
- });
267
- };
268
-
269
- exports.RegistrationLoginFirstStep = RegistrationLoginFirstStep;
@@ -1,20 +0,0 @@
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 _variables = require("../../../global-files/variables");
15
-
16
- var _templateObject;
17
-
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 100%;\n height: 100vh;\n .user {\n .name-registration-user {\n display: flex;\n justify-content: space-between;\n input {\n width: 160px;\n }\n }\n .input-name-header {\n margin-bottom: 4px;\n margin-top: 12px;\n }\n .phone-registration-user {\n display: flex;\n justify-content: space-between;\n .phone-options {\n width: 80px;\n }\n input {\n width: 100%;\n }\n & + * {\n margin-top: 10px;\n }\n }\n .country-options,\n .phone-options {\n width: 100%;\n border: 1px solid ", ";\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 2px;\n resize: none;\n &:focus {\n border: 1px solid ", ";\n }\n }\n }\n .button-end {\n text-align: end;\n .general-default-button {\n width: 160px;\n }\n & + * {\n margin-top: 10px;\n }\n }\n .progress-bar {\n width: 100%;\n height: 8px;\n display: flex;\n justify-content: space-between;\n .progress-bar-first-step {\n width: 33.33%;\n background-color: rgb(196, 196, 196);\n }\n .progress-bar-registration {\n background-color: rgb(226, 226, 226);\n width: 66.66%;\n }\n }\n .date-header {\n .new-login {\n & + * {\n margin-top: 20px;\n }\n }\n }\n .home-login-retailer,\n .home-retailer {\n width: 50%;\n }\n"])), _variables.GlobalColors.s2, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4, _variables.GlobalColors.magenta_s2);
19
-
20
- exports.Container = Container;