contentoh-components-library 21.2.9 → 21.2.12

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.
@@ -16,96 +16,92 @@ RetailerProductEditionDefault.args = {
16
16
  Imágenes: false,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwYjY2YTRhOS03NzkwLTQwMzQtYTMwYS1jMDA4MDg5NjI4NjciLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjBiNjZhNGE5LTc3OTAtNDAzNC1hMzBhLWMwMDgwODk2Mjg2NyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiIzNmIxMmUwMy0xOWJhLTRiMDktYWJiYS1kZjk3ZTFkNThjZTQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MDE4MjgzNywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MDE4NjQzNywiaWF0IjoxNjYwMTgyODM3LCJlbWFpbCI6ImJheWFkaTE1MzhAbW5xbG0uY29tIn0.MM9nIHkrRIS2o8_s4BR6VTLgyw3ryvPrr-mf6RtnQ4smng2Q3fmtK07zInNcvcrv8EXO5J9z47_NZ5MOJDo1Pz1CV2cOYM7PT5tEn3F-W4SitqDbBw3KxfkqSMxdZUIHLWECGL-u2ATCYU2J4KRVQi8XSP1qbfv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daidjReKHBwrVbGV5LP37aD_o14BQ67VSmH2pxLvrZRBNsZhvP0vZuetXt19pyiFgCr1-SF5CMHD3dcnPq2Ka0PUEf8raNEoseCPGaDUugu-waz1qPadZN1OrlhQTm9mOWoGj4u0gQv5FGAbC6xMcRernAo4QX41-Pfjvp2u7p62BYkp6rafzTjazUHZiG-ueqPI9QQQ-2zkbTo46l7TFYz6ATNSiZEvezc52L1nzWDhI5Q8xbNA546WC-leLr30SV9vrXBTGdvLdCKeqEYPrVG1L3nXXZ9CvtHJjdkb60irWZjXT1LbpulfL3IqO2_PKHTUpHQ",
20
20
  productSelected: {
21
- "services": {
22
- "datasheets": 1,
23
- "descriptions": 1,
24
- "images": 1
21
+ services: {
22
+ datasheets: 1,
23
+ descriptions: 1,
24
+ images: 1,
25
25
  },
26
- "orderId": 1810,
27
- "status": "RP",
28
- "datasheet_status": "RP",
29
- "prio": "none",
30
- "version": 2,
31
- "description_status": "RP",
32
- "images_status": "RP",
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,
40
- "status": "NULL",
41
- "active": 1,
42
- "company_id": 437,
43
- "SKU": null,
44
- "Descripcion": null,
45
- "Proveedor": null,
46
- "id_proveedor": 0,
47
- "company_name": "",
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,
57
- "id_recepcionist": null,
58
- "category": "Pinturas|Herramientas y accesorios para pintar|Cintas",
59
- "missingAttributes": null,
60
- "missingDescriptions": null,
61
- "missingImages": null
26
+ orderId: 127,
27
+ status: "AS",
28
+ datasheet_status: "AS",
29
+ prio: "none",
30
+ version: 2,
31
+ description_status: "AS",
32
+ images_status: "AS",
33
+ article: {
34
+ id_article: 76186,
35
+ id_category: "399",
36
+ name: "Croquetas Dog Chow",
37
+ upc: "4535354",
38
+ timestamp: "2022-07-21T15:20:25.000Z",
39
+ id_user: 28,
40
+ status: "NULL",
41
+ active: 1,
42
+ company_id: 1,
43
+ company_name: "COMPANY DEV",
44
+ country: "México",
45
+ id_order: 127,
46
+ id_datasheet_especialist: 54,
47
+ id_datasheet_facilitator: 52,
48
+ id_description_especialist: 54,
49
+ id_description_facilitator: 52,
50
+ id_images_especialist: 55,
51
+ id_images_facilitator: 53,
52
+ id_auditor: 30,
53
+ id_recepcionist: null,
54
+ category: "Mascotas|Alimentos y Premios|Alimento para Perros",
55
+ missingAttributes: null,
56
+ missingDescriptions: null,
57
+ missingImages: null,
62
58
  },
63
- "retailers": [
64
- {
65
- "id": 58,
66
- "name": "The Home Depot Golden",
67
- "country": "México",
68
- "id_region": 1,
69
- "active": 1
70
- }
59
+ retailers: [
60
+ {
61
+ id: 2,
62
+ name: "Walmart Mercancías Generales",
63
+ country: "México",
64
+ id_region: 1,
65
+ active: 1,
66
+ },
71
67
  ],
72
- "country": null,
73
- "upc": "167907"
74
- },
68
+ country: "México",
69
+ upc: "4535354",
70
+ },
75
71
  location: {
76
72
  product: { articleId: 109485, versionId: 3 },
77
73
  },
78
74
  user: {
79
- id_user: 1248,
80
- name: "Facilitador Textos",
81
- last_name: " ",
82
- email: "bayadi1538@mnqlm.com",
83
- position: "Tester",
75
+ id_user: 65,
76
+ name: "Oscar",
77
+ last_name: "Arenas",
78
+ email: "oarenas@contentoh.com",
79
+ position: null,
84
80
  telephone: null,
85
81
  country: null,
86
- id_company: 254,
87
- id_cognito: "0b66a4a9-7790-4034-a30a-c00808962867",
82
+ id_company: 2,
83
+ id_cognito: "73cc8d40-c841-422a-a2f2-e69d7fe26ebf",
88
84
  birth_Date: null,
89
85
  about_me: null,
90
86
  zip_code: null,
91
87
  address: null,
92
88
  job: null,
93
89
  id_stripe: null,
94
- id_role: 7,
90
+ id_role: 1,
95
91
  active: 1,
96
92
  is_retailer: 0,
97
- email_notify: null,
93
+ email_notify: 0,
98
94
  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",
95
+ id: 2,
96
+ start_date: "2021-11-05T02:35:12.000Z",
97
+ end_date: "2022-11-05T02:34:49.000Z",
98
+ planID: 1,
99
+ plan: "prod_KtkvuFFLpOdP6e",
100
+ name: "Plan Free",
101
+ user_limit: "1",
102
+ products_limit: "3",
103
+ type: "PyMES",
108
104
  },
109
- src: "https://content-management-profile-prod.s3.amazonaws.com/id-423/423.png?1660182839373",
105
+ src: "https://content-management-profile.s3.amazonaws.com/id-65/65.png?1661554813155",
110
106
  },
111
107
  };
@@ -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" &&
@@ -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
- };