contentoh-components-library 21.0.88 → 21.0.91

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.
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _templateObject;
15
15
 
16
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 22px;\n width: 10px;\n border-left: 1px solid #342b3f;\n padding-left: 3px;\n\n img {\n width: 7px;\n vertical-align: middle;\n }\n"])));
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 22px;\n width: 10px;\n border-left: 1px solid #342b3f;\n padding-left: 3px;\n\n img {\n width: 7px;\n vertical-align: middle;\n }\n\n &.active {\n img {\n transform: rotate(180deg);\n }\n }\n"])));
17
17
 
18
18
  exports.Container = Container;
@@ -13,10 +13,6 @@ var _react = require("react");
13
13
 
14
14
  var _styles = require("./styles");
15
15
 
16
- var _Avatar = require("../../atoms/Avatar");
17
-
18
- var _DropDownButton = require("../../atoms/DropDownButton");
19
-
20
16
  var _GeneralButton = require("../../atoms/GeneralButton");
21
17
 
22
18
  var _ValidationPanel = require("../../atoms/ValidationPanel");
@@ -64,10 +60,11 @@ var AvatarAndValidation = function AvatarAndValidation(_ref) {
64
60
  retailers: retailers,
65
61
  activeRetailer: activeRetailer,
66
62
  setActiveRetailer: setActiveRetailer
67
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DropDownButton.DropDownButton, {}), showValidationButtons && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
63
+ }), showValidationButtons && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
68
64
  buttonType: "circular-button ".concat(buttonType),
69
- onClick: function onClick() {
70
- return setShowValidationPanel(true);
65
+ onClick: function onClick(e) {
66
+ e.stopPropagation();
67
+ setShowValidationPanel(true);
71
68
  }
72
69
  })]
73
70
  }), showValidationPanel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ValidationPanel.ValidationPanel, {
@@ -17,6 +17,8 @@ var _react = require("react");
17
17
 
18
18
  var _AsignationOption = require("../../atoms/AsignationOption");
19
19
 
20
+ var _DropDownButton = require("../../atoms/DropDownButton");
21
+
20
22
  var _jsxRuntime = require("react/jsx-runtime");
21
23
 
22
24
  var RetailerSelector = function RetailerSelector(_ref) {
@@ -51,6 +53,8 @@ var RetailerSelector = function RetailerSelector(_ref) {
51
53
  (retailers === null || retailers === void 0 ? void 0 : retailers.length) > 0 && setRetailersPanel(!retailersPanel);
52
54
  if (retailersPanel) document.removeEventListener("click", closeRetailersPanel, false);
53
55
  }
56
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DropDownButton.DropDownButton, {
57
+ active: retailersPanel
54
58
  }), retailersPanel && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
55
59
  className: "retailers-panel",
56
60
  children: retailers.map(function (retailer, index) {
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n cursor: pointer;\n\n .retailers-panel {\n background: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n padding: 10px;\n position: absolute;\n top: calc(100% + 10px);\n right: 0;\n z-index: 10;\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s3);
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n cursor: pointer;\n display: flex;\n\n .retailers-panel {\n background: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n padding: 10px;\n position: absolute;\n top: calc(100% + 10px);\n right: 0;\n z-index: 10;\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s3);
19
19
 
20
20
  exports.Container = Container;
@@ -686,7 +686,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
686
686
  return (service === null || service === void 0 ? void 0 : service.id) === (activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id);
687
687
  });
688
688
 
689
- console.log(services[0], "services[0]");
690
689
  setDatasheets([datagroups, inputs]);
691
690
  setDescriptions(_descriptions);
692
691
  }
@@ -1416,7 +1415,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1416
1415
  }();
1417
1416
 
1418
1417
  var evaluationComplete = function evaluationComplete(tab) {
1419
- console.log(servicesData, "servicesData");
1420
1418
  var concept = getConcept(tab);
1421
1419
  var serv = servicesData.filter(function (item) {
1422
1420
  return item.service === concept;
@@ -41,7 +41,7 @@ RetailerProductEditionDefault.args = {
41
41
  descriptions: 1,
42
42
  images: 1
43
43
  },
44
- orderId: 233,
44
+ orderId: 9,
45
45
  status: "QF",
46
46
  datasheet_status: "QF",
47
47
  prio: "none",
@@ -49,18 +49,18 @@ RetailerProductEditionDefault.args = {
49
49
  description_status: "QF",
50
50
  images_status: "QF",
51
51
  article: {
52
- id_article: 190965,
53
- id_category: "697",
54
- name: "Shampoo hidratante",
55
- upc: "6545345",
56
- timestamp: "2022-06-10T15:05:56.000Z",
57
- id_user: 28,
52
+ id_article: 35698,
53
+ id_category: "2143",
54
+ name: "FOCO LED A19 (60W) LUZ AMARILLA",
55
+ upc: "12087311",
56
+ timestamp: "2022-06-15T14:35:46.000Z",
57
+ id_user: 59,
58
58
  status: "NULL",
59
59
  active: 1,
60
60
  company_id: 1,
61
- company_name: "COMPANY DEV",
61
+ company_name: "Cadena Ismael",
62
62
  country: "México",
63
- id_order: 233,
63
+ id_order: 9,
64
64
  id_datasheet_especialist: 54,
65
65
  id_datasheet_facilitator: 52,
66
66
  id_description_especialist: 54,
@@ -69,28 +69,38 @@ RetailerProductEditionDefault.args = {
69
69
  id_images_facilitator: 53,
70
70
  id_auditor: 30,
71
71
  id_recepcionist: null,
72
- category: "SALUD Y BELLEZA|CUIDADO DEL CABELLO|SHAMPOOS Y ACONDICIONADORES",
73
- missingAttributes: null,
74
- missingDescriptions: null,
75
- missingImages: null
72
+ category: "ILUMINACIÓN|FOCOS|FOCOS",
73
+ missingAttributes: 0,
74
+ missingDescriptions: 0,
75
+ missingImages: -1
76
76
  },
77
77
  retailers: [{
78
- id: 4,
79
- name: "Walmart Super y Superama",
78
+ id: 58,
79
+ name: "The Home Depot Golden",
80
80
  country: "México",
81
81
  id_region: 1,
82
- active: 1,
83
- percentage: 100
82
+ active: 1
84
83
  }, {
85
- id: 26,
86
- name: "Mercado Libre",
84
+ id: 59,
85
+ name: "The Home Depot Platinum",
87
86
  country: "México",
88
87
  id_region: 1,
89
- active: 1,
90
- percentage: 100
88
+ active: 1
89
+ }, {
90
+ id: 60,
91
+ name: "The Home Depot Resizing",
92
+ country: "México",
93
+ id_region: 1,
94
+ active: 1
95
+ }, {
96
+ id: 61,
97
+ name: "Home Depot TAB",
98
+ country: "México",
99
+ id_region: 1,
100
+ active: 1
91
101
  }],
92
102
  country: "México",
93
- upc: "6545345"
103
+ upc: "12087311"
94
104
  },
95
105
  location: {
96
106
  product: {
@@ -99,22 +109,22 @@ RetailerProductEditionDefault.args = {
99
109
  }
100
110
  },
101
111
  user: {
102
- id_user: 53,
103
- name: "FACILITADOR ED PRUEBA",
112
+ id_user: 52,
113
+ name: "FACILITADOR TXT PRUEBA",
104
114
  last_name: "",
105
- email: "arojas@contentoh.com",
115
+ email: "azarate@contentoh.com",
106
116
  position: null,
107
117
  telephone: null,
108
118
  country: null,
109
119
  id_company: 2,
110
- id_cognito: "c106e141-e221-49e8-a382-ce99385c6d88",
120
+ id_cognito: "b2ce5b2a-609c-4e79-9ea9-2f74cff43889",
111
121
  birth_Date: null,
112
122
  about_me: null,
113
123
  zip_code: null,
114
124
  address: null,
115
125
  job: null,
116
126
  id_stripe: null,
117
- id_role: 5,
127
+ id_role: 4,
118
128
  active: 1,
119
129
  is_retailer: 0,
120
130
  membership: {
@@ -128,6 +138,6 @@ RetailerProductEditionDefault.args = {
128
138
  products_limit: "3",
129
139
  type: "PyMES"
130
140
  },
131
- src: "https://content-management-profile.s3.amazonaws.com/id-53/53.png?1655161876316"
141
+ src: "https://content-management-profile.s3.amazonaws.com/id-52/52.png?1655320339846"
132
142
  }
133
143
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.0.88",
3
+ "version": "21.0.91",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -10,4 +10,10 @@ export const Container = styled.div`
10
10
  width: 7px;
11
11
  vertical-align: middle;
12
12
  }
13
+
14
+ &.active {
15
+ img {
16
+ transform: rotate(180deg);
17
+ }
18
+ }
13
19
  `;
@@ -2,8 +2,6 @@ import { useState } from "react";
2
2
 
3
3
  //Components
4
4
  import { Container } from "./styles";
5
- import { Avatar } from "../../atoms/Avatar";
6
- import { DropDownButton } from "../../atoms/DropDownButton";
7
5
  import { Button } from "../../atoms/GeneralButton";
8
6
  import { ValidationPanel } from "../../atoms/ValidationPanel";
9
7
  import { useEffect } from "react";
@@ -47,11 +45,13 @@ export const AvatarAndValidation = ({
47
45
  activeRetailer={activeRetailer}
48
46
  setActiveRetailer={setActiveRetailer}
49
47
  />
50
- <DropDownButton />
51
48
  {showValidationButtons && (
52
49
  <Button
53
50
  buttonType={`circular-button ${buttonType}`}
54
- onClick={() => setShowValidationPanel(true)}
51
+ onClick={(e) => {
52
+ e.stopPropagation();
53
+ setShowValidationPanel(true);
54
+ }}
55
55
  />
56
56
  )}
57
57
  </div>
@@ -2,6 +2,7 @@ import { Container } from "./styles";
2
2
  import { Avatar } from "../../atoms/Avatar";
3
3
  import { useEffect, useState } from "react";
4
4
  import { AsignationOption } from "../../atoms/AsignationOption";
5
+ import { DropDownButton } from "../../atoms/DropDownButton";
5
6
 
6
7
  export const RetailerSelector = ({
7
8
  retailers,
@@ -35,6 +36,7 @@ export const RetailerSelector = ({
35
36
  document.removeEventListener("click", closeRetailersPanel, false);
36
37
  }}
37
38
  />
39
+ <DropDownButton active={retailersPanel} />
38
40
  {retailersPanel && (
39
41
  <div className="retailers-panel">
40
42
  {retailers.map((retailer, index) => (
@@ -4,6 +4,7 @@ import { GlobalColors } from "../../../global-files/variables";
4
4
  export const Container = styled.div`
5
5
  position: relative;
6
6
  cursor: pointer;
7
+ display: flex;
7
8
 
8
9
  .retailers-panel {
9
10
  background: ${GlobalColors.s2};
@@ -353,7 +353,6 @@ export const ProviderProductEdition = ({
353
353
  const descriptions = services[1]?.filter(
354
354
  (service) => service?.id === activeRetailer?.id
355
355
  );
356
- console.log(services[0], "services[0]");
357
356
  setDatasheets([datagroups, inputs]);
358
357
  setDescriptions(descriptions);
359
358
  }
@@ -923,7 +922,6 @@ export const ProviderProductEdition = ({
923
922
  };
924
923
 
925
924
  const evaluationComplete = (tab) => {
926
- console.log(servicesData, "servicesData");
927
925
  const concept = getConcept(tab);
928
926
  let serv = servicesData.filter((item) => item.service === concept);
929
927
  if (
@@ -26,7 +26,7 @@ RetailerProductEditionDefault.args = {
26
26
  descriptions: 1,
27
27
  images: 1,
28
28
  },
29
- orderId: 233,
29
+ orderId: 9,
30
30
  status: "QF",
31
31
  datasheet_status: "QF",
32
32
  prio: "none",
@@ -34,18 +34,18 @@ RetailerProductEditionDefault.args = {
34
34
  description_status: "QF",
35
35
  images_status: "QF",
36
36
  article: {
37
- id_article: 190965,
38
- id_category: "697",
39
- name: "Shampoo hidratante",
40
- upc: "6545345",
41
- timestamp: "2022-06-10T15:05:56.000Z",
42
- id_user: 28,
37
+ id_article: 35698,
38
+ id_category: "2143",
39
+ name: "FOCO LED A19 (60W) LUZ AMARILLA",
40
+ upc: "12087311",
41
+ timestamp: "2022-06-15T14:35:46.000Z",
42
+ id_user: 59,
43
43
  status: "NULL",
44
44
  active: 1,
45
45
  company_id: 1,
46
- company_name: "COMPANY DEV",
46
+ company_name: "Cadena Ismael",
47
47
  country: "México",
48
- id_order: 233,
48
+ id_order: 9,
49
49
  id_datasheet_especialist: 54,
50
50
  id_datasheet_facilitator: 52,
51
51
  id_description_especialist: 54,
@@ -54,53 +54,64 @@ RetailerProductEditionDefault.args = {
54
54
  id_images_facilitator: 53,
55
55
  id_auditor: 30,
56
56
  id_recepcionist: null,
57
- category:
58
- "SALUD Y BELLEZA|CUIDADO DEL CABELLO|SHAMPOOS Y ACONDICIONADORES",
59
- missingAttributes: null,
60
- missingDescriptions: null,
61
- missingImages: null,
57
+ category: "ILUMINACIÓN|FOCOS|FOCOS",
58
+ missingAttributes: 0,
59
+ missingDescriptions: 0,
60
+ missingImages: -1,
62
61
  },
63
62
  retailers: [
64
63
  {
65
- id: 4,
66
- name: "Walmart Super y Superama",
64
+ id: 58,
65
+ name: "The Home Depot Golden",
67
66
  country: "México",
68
67
  id_region: 1,
69
68
  active: 1,
70
- percentage: 100,
71
69
  },
72
70
  {
73
- id: 26,
74
- name: "Mercado Libre",
71
+ id: 59,
72
+ name: "The Home Depot Platinum",
73
+ country: "México",
74
+ id_region: 1,
75
+ active: 1,
76
+ },
77
+ {
78
+ id: 60,
79
+ name: "The Home Depot Resizing",
80
+ country: "México",
81
+ id_region: 1,
82
+ active: 1,
83
+ },
84
+ {
85
+ id: 61,
86
+ name: "Home Depot TAB",
75
87
  country: "México",
76
88
  id_region: 1,
77
89
  active: 1,
78
- percentage: 100,
79
90
  },
80
91
  ],
81
92
  country: "México",
82
- upc: "6545345",
93
+ upc: "12087311",
83
94
  },
84
95
  location: {
85
96
  product: { articleId: 109485, versionId: 3 },
86
97
  },
87
98
  user: {
88
- id_user: 53,
89
- name: "FACILITADOR ED PRUEBA",
99
+ id_user: 52,
100
+ name: "FACILITADOR TXT PRUEBA",
90
101
  last_name: "",
91
- email: "arojas@contentoh.com",
102
+ email: "azarate@contentoh.com",
92
103
  position: null,
93
104
  telephone: null,
94
105
  country: null,
95
106
  id_company: 2,
96
- id_cognito: "c106e141-e221-49e8-a382-ce99385c6d88",
107
+ id_cognito: "b2ce5b2a-609c-4e79-9ea9-2f74cff43889",
97
108
  birth_Date: null,
98
109
  about_me: null,
99
110
  zip_code: null,
100
111
  address: null,
101
112
  job: null,
102
113
  id_stripe: null,
103
- id_role: 5,
114
+ id_role: 4,
104
115
  active: 1,
105
116
  is_retailer: 0,
106
117
  membership: {
@@ -114,6 +125,6 @@ RetailerProductEditionDefault.args = {
114
125
  products_limit: "3",
115
126
  type: "PyMES",
116
127
  },
117
- src: "https://content-management-profile.s3.amazonaws.com/id-53/53.png?1655161876316",
128
+ src: "https://content-management-profile.s3.amazonaws.com/id-52/52.png?1655320339846",
118
129
  },
119
130
  };