contentoh-components-library 21.5.84 → 21.5.86

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.
@@ -0,0 +1,85 @@
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.colors = exports.StyledTextArea = exports.StyledSelect = exports.StyledFormControl = exports.StyledDialog = exports.StatusPill = exports.StatusGrid = exports.SectionTitle = exports.Section = exports.ScopeButtonGroup = exports.ScopeButton = exports.ModalHeader = exports.MainSection = exports.ImpactSummary = exports.HelperText = exports.FooterActions = exports.BadgeCircle = exports.ActionButton = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ var _material = require("@mui/material");
15
+
16
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
17
+
18
+ var colors = {
19
+ background: 'rgba(0, 0, 0, 0.4)',
20
+ paper: '#FFFFFF',
21
+ primary: '#E039A7',
22
+ primaryHover: '#C82A91',
23
+ textMain: '#121212',
24
+ textMuted: '#666666',
25
+ border: '#E0E0E0',
26
+ inputBg: '#FFFFFF',
27
+ summaryBg: '#F9F9F9'
28
+ };
29
+ exports.colors = colors;
30
+ var StyledDialog = (0, _styledComponents.default)(_material.Dialog)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n .MuiDialog-container {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .MuiDialog-paper {\n background-color: ", ";\n color: ", ";\n border-radius: 5px;\n padding: 0;\n max-width: 38.5rem;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n width: 100%;\n box-shadow: 0 8px 32px rgba(0,0,0,0.15);\n font-family: \"Raleway\", sans-serif;\n }\n"])), colors.paper, colors.textMain);
31
+ exports.StyledDialog = StyledDialog;
32
+ var ModalHeader = (0, _styledComponents.default)(_material.Box)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n flex-shrink: 0;\n position: relative;\n display: flex;\n align-items: center;\n padding: 20px 24px 16px;\n gap: 1rem;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n margin-bottom: 0.5rem;\n\n .close-icon {\n position: absolute;\n top: 12px;\n right: 12px;\n color: ", ";\n }\n\n h2 {\n font-size: 1.35rem;\n font-weight: 600;\n }\n\n p {\n margin: 0;\n color: ", ";\n font-size: 0.8rem;\n }\n"])), colors.primary, colors.textMuted);
33
+ exports.ModalHeader = ModalHeader;
34
+ var BadgeCircle = (0, _styledComponents.default)(_material.Box)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 40px;\n height: 40px;\n border-radius: 50%;\n border: 2px solid ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n color: ", ";\n\n svg {\n font-size: 1.5rem;\n }\n"])), colors.primary, colors.paper, colors.primary);
35
+ exports.BadgeCircle = BadgeCircle;
36
+ var MainSection = (0, _styledComponents.default)(_material.Box)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n overflow-y: auto;\n padding-bottom: 20px;\n\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: #CCCCCC;\n border-radius: 4px;\n }\n &::-webkit-scrollbar-thumb:hover {\n background: #999999;\n }\n"])));
37
+ exports.MainSection = MainSection;
38
+ var Section = (0, _styledComponents.default)(_material.Box)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n padding: 10px 32px;\n"])));
39
+ exports.Section = Section;
40
+
41
+ var SectionTitle = _styledComponents.default.h3(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 0.9rem;\n font-family: \"Raleway-500\", \"Raleway\", sans-serif;\n color: ", ";\n margin-bottom: 12px;\n"])), colors.textMuted);
42
+
43
+ exports.SectionTitle = SectionTitle;
44
+ var ScopeButtonGroup = (0, _styledComponents.default)(_material.Box)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 12px;\n margin-bottom: 8px;\n"])));
45
+ exports.ScopeButtonGroup = ScopeButtonGroup;
46
+ var ScopeButton = (0, _styledComponents.default)(_material.Button)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n && {\n border-radius: 5px;\n text-transform: none;\n text-wrap: nowrap;\n font-weight: 600;\n font-size: 12px;\n padding: 0.4rem 1rem;\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n font-family: \"Raleway-500\", \"Raleway\", sans-serif;\n\n &:hover {\n background-color: ", ";\n }\n\n svg {\n margin-right: 8px;\n font-size: 18px;\n }\n }\n"])), function (props) {
47
+ return props.active ? colors.primary : 'transparent';
48
+ }, function (props) {
49
+ return props.active ? '#FFFFFF' : colors.textMuted;
50
+ }, function (props) {
51
+ return props.active ? colors.primary : colors.border;
52
+ }, function (props) {
53
+ return props.active ? colors.primaryHover : colors.summaryBg;
54
+ });
55
+ exports.ScopeButton = ScopeButton;
56
+
57
+ var HelperText = _styledComponents.default.p(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 0.8rem;\n color: ", ";\n margin: 8px 0 0;\n font-family: \"Raleway\", sans-serif;\n"])), colors.textMuted);
58
+
59
+ exports.HelperText = HelperText;
60
+ var StatusPill = (0, _styledComponents.default)(_material.Chip)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n && {\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n font-weight: 600;\n border-radius: 5px;\n opacity: 1 !important;\n cursor: ", ";\n font-family: \"Raleway\", sans-serif;\n\n &:hover {\n background-color: ", ";\n }\n }\n"])), function (props) {
61
+ return props.selected ? colors.primary : props.disabled ? '#603888' : 'transparent';
62
+ }, function (props) {
63
+ return props.selected ? '#FFFFFF' : props.disabled ? 'white' : 'rgba(0, 0, 0, 0.45)';
64
+ }, function (props) {
65
+ return props.selected ? colors.primary : 'rgba(0, 0, 0, 0.25)';
66
+ }, function (props) {
67
+ return props.disabled ? 'not-allowed' : 'pointer';
68
+ }, function (props) {
69
+ return props.disabled ? 'transparent' : props.selected ? colors.primaryHover : 'rgba(0, 0, 0, 0.05)';
70
+ });
71
+ exports.StatusPill = StatusPill;
72
+ var StatusGrid = (0, _styledComponents.default)(_material.Box)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n"])));
73
+ exports.StatusGrid = StatusGrid;
74
+ var StyledTextArea = (0, _styledComponents.default)(_material.TextField)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n && {\n width: 100%;\n background-color: ", ";\n border-radius: 8px;\n\n .MuiOutlinedInput-root {\n font-size: 14px;\n font-family: \"Raleway\", sans-serif;\n color: ", ";\n fieldset {\n border-color: ", ";\n }\n &:hover fieldset {\n border-color: #BDBDBD;\n }\n &.Mui-focused fieldset {\n border-color: ", ";\n }\n }\n }\n"])), colors.inputBg, colors.textMain, colors.border, colors.primary);
75
+ exports.StyledTextArea = StyledTextArea;
76
+ var StyledSelect = (0, _styledComponents.default)(_material.Select)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n && {\n width: 100%;\n background-color: ", ";\n border-radius: 5px;\n font-family: \"Raleway\", sans-serif;\n font-size: 0.85rem;\n margin-bottom: 12px;\n\n .MuiSelect-select {\n padding: 8px 12px;\n display: flex;\n align-items: center;\n min-height: auto !important;\n }\n\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #BDBDBD;\n }\n &.Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiSvgIcon-root {\n color: ", ";\n font-size: 1.2rem;\n }\n }\n"])), colors.inputBg, colors.border, colors.primary, colors.textMuted);
77
+ exports.StyledSelect = StyledSelect;
78
+ var StyledFormControl = (0, _styledComponents.default)(_material.FormControl)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n && {\n .MuiInputLabel-root {\n font-family: \"Raleway\", sans-serif;\n font-size: 0.85rem;\n color: ", ";\n transform: translate(14px, 10px) scale(1);\n\n &.MuiInputLabel-shrink {\n transform: translate(14px, -8px) scale(0.75);\n color: ", ";\n background-color: #fff;\n padding: 0 6px;\n }\n }\n }\n"])), colors.textMuted, colors.primary);
79
+ exports.StyledFormControl = StyledFormControl;
80
+ var FooterActions = (0, _styledComponents.default)(_material.Box)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n flex-shrink: 0;\n display: flex;\n justify-content: flex-end;\n gap: 16px;\n padding: 16px 32px;\n background-color: ", ";\n border-top: 1px solid ", ";\n"])), colors.paper, colors.border);
81
+ exports.FooterActions = FooterActions;
82
+ var ActionButton = (0, _styledComponents.default)(_material.Button)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n && {\n text-transform: none;\n font-family: \"Raleway-500\", \"Raleway\", sans-serif;\n padding: 4px 16px;\n border-radius: 5px;\n\n &.cancel {\n color: ", ";\n border: 1px solid ", ";\n &:hover {\n background-color: ", ";\n }\n }\n\n &.submit {\n background-color: ", ";\n color: #FFFFFF;\n &:hover {\n background-color: ", ";\n }\n &:disabled {\n opacity: 0.5;\n background-color: #CCCCCC;\n color: #888888;\n }\n }\n }\n"])), colors.textMain, colors.border, colors.summaryBg, colors.primary, colors.primaryHover);
83
+ exports.ActionButton = ActionButton;
84
+ var ImpactSummary = (0, _styledComponents.default)(_material.Box)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 32px 32px;\n padding: 20px;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 12px;\n\n .summary-title {\n font-family: \"Raleway-500\", \"Raleway\", sans-serif;\n font-size: 0.9rem;\n color: ", ";\n margin-bottom: 16px;\n display: block;\n }\n\n .status-flow {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 16px;\n color: ", ";\n }\n\n .impact-counts {\n display: flex;\n gap: 24px;\n color: ", ";\n font-size: 0.85rem;\n\n div {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n }\n"])), colors.summaryBg, colors.border, colors.textMuted, colors.textMain, colors.textMuted);
85
+ exports.ImpactSummary = ImpactSummary;
@@ -33,194 +33,71 @@ RetailerProductEditionDefault.args = {
33
33
  },
34
34
  token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI4ZDAxMDIxNC01YmZhLTQzYzMtOTZmYi1jNTU2ZGMwNTc3NGIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjhkMDEwMjE0LTViZmEtNDNjMy05NmZiLWM1NTZkYzA1Nzc0YiIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI1MDgwMTVmMy1mZGVkLTQ2ODUtYTIxNy1mYzgyMTg0ZWRmNGMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTc2ODI1MzE3NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTc2ODI1Njc3NywiaWF0IjoxNzY4MjUzMTc3LCJlbWFpbCI6ImthcmFmZTMyMThAbW9tMmtpZC5jb20ifQ.QiZiscuTvrur0g328Zmh2bI-kZyg7YO_T5jT63096JNuSxGnX9wpK87cVTV1dED4ruD-2NMsgLShUIMcklAg17FL6i5_vCuB1dSIDY0LaybvSpriFJaVVdMUIMGFi_1Q7bI9qqyXYkevcf-HO33vVPdU-_-4-u8YRd-QganUk35vPYPh9vFJWbC0Qtvv25ZR4L2xuRIXx4e7StlTvZXysnYL8A84jkK1zn6d77V-9GqQQW8exO6sBW7R6cGt55vnF80NIfG_9lAqCK0PcZH4o50aqrAVhtfV5edlEmXBHeGK5R3Sz5iTeKb51QF3TWVFZCYGvQJ7FShulUWHcm3X2Q",
35
35
  productSelected: {
36
- "articleId": 18193,
36
+ "articleId": 145186,
37
37
  "services": {
38
38
  "datasheets": 1,
39
39
  "descriptions": 1,
40
40
  "images": 1
41
41
  },
42
- "orderId": 10284,
43
- "city": "CDMX",
44
- "status": "AP",
45
- "datasheet_status": "AP",
42
+ "orderId": 10449,
43
+ "city": "CDMX, México",
44
+ "status": "AS",
45
+ "datasheet_status": "AC",
46
46
  "prio": "none",
47
- "version": 34,
48
- "description_status": "AP",
49
- "images_status": "AP",
47
+ "version": 3,
48
+ "description_status": "AS",
49
+ "images_status": "AC",
50
50
  "statusByRetailer": [{
51
- "status": "AP",
51
+ "status": "AC",
52
52
  "service": "datasheet",
53
- "retailer_id": 24,
54
- "task_user_group_id": 6
53
+ "retailer_id": 70,
54
+ "task_user_group_id": 4
55
55
  }, {
56
- "status": "AP",
56
+ "status": "AS",
57
57
  "service": "description",
58
- "retailer_id": 24,
59
- "task_user_group_id": 6
58
+ "retailer_id": 70,
59
+ "task_user_group_id": 2
60
60
  }, {
61
- "status": "AP",
61
+ "status": "AC",
62
62
  "service": "images",
63
- "retailer_id": 24,
64
- "task_user_group_id": 6
63
+ "retailer_id": 70,
64
+ "task_user_group_id": 4
65
65
  }],
66
66
  "article": {
67
- "id_article": 18193,
68
- "id_category": "157",
69
- "brand": "Axion",
70
- "name": "Detergente lavatrastes líquido Axion limón 900 ml",
71
- "upc": "7509546052977",
72
- "sku": null,
73
- "timestamp": "2021-10-09T16:33:17.000Z",
67
+ "id_article": 145186,
68
+ "id_category": "4007",
69
+ "brand": null,
70
+ "name": "Mayonesa",
71
+ "upc": "098928",
72
+ "sku": "899",
73
+ "timestamp": "2026-04-23T16:02:14.000Z",
74
74
  "active": 1,
75
- "company_id": 226,
76
- "company_name": "COLGATE PALMOLIVE S.A. DE C.V.",
75
+ "company_id": 291,
76
+ "company_name": "LATAM LOGISTICS",
77
77
  "country": "México",
78
- "id_order": 10284,
78
+ "id_order": 10449,
79
79
  "id_datasheet_especialist": 426,
80
80
  "id_datasheet_facilitator": null,
81
81
  "id_description_especialist": 426,
82
82
  "id_description_facilitator": null,
83
- "id_images_especialist": 3008,
83
+ "id_images_especialist": 427,
84
84
  "id_images_facilitator": null,
85
- "id_auditor": 495,
85
+ "id_auditor": 425,
86
86
  "id_recepcionist": null,
87
- "category": "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
87
+ "category": "Abarrotes Procesados|Abarrotes Básicos y Procesados|Abarrotes Básicos y Procesados",
88
88
  "categoryRetailer": [{
89
- "id_category": 157,
90
- "id_retailer": 17,
91
- "category_name": "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
92
- "retailer_name": "Genérico"
93
- }, {
94
- "id_category": 3430,
95
- "id_retailer": 12,
96
- "category_name": "Departamento General La Comer|Departamento General|Departamento General",
97
- "retailer_name": "La Comer"
98
- }, {
99
- "id_category": 3433,
100
- "id_retailer": 24,
101
- "category_name": "Limpieza Del Hogar|Limpieza Del Hogar|Limpieza Del Hogar",
102
- "retailer_name": "Alsuper"
103
- }, {
104
- "id_category": 3456,
105
- "id_retailer": 41,
106
- "category_name": "Categoría Genérica Chapa|Categoría Genérica|Categoría Genérica",
107
- "retailer_name": "Chapa"
108
- }, {
109
- "id_category": 3499,
110
- "id_retailer": 20,
111
- "category_name": "Consumibles Cornershop|Consumibles|Consumibles",
112
- "retailer_name": "Cornershop"
113
- }, {
114
- "id_category": 3507,
115
- "id_retailer": 38,
116
- "category_name": "Hogar|Artículos de Limpieza|Multiusos",
117
- "retailer_name": "Del Sol"
118
- }, {
119
- "id_category": 3562,
120
- "id_retailer": 29,
121
- "category_name": "Consumibles Farmacias del Ahorro|Consumibles|Consumibles",
122
- "retailer_name": "Farmacias del Ahorro"
123
- }, {
124
- "id_category": 3588,
125
- "id_retailer": 8,
126
- "category_name": "Hogar|Limpieza|Lavatrastes",
127
- "retailer_name": "Fragua"
128
- }, {
129
- "id_category": 3604,
130
- "id_retailer": 18,
131
- "category_name": "Categoría Genérica Google|Categoría Genérica|Categoría Genérica",
132
- "retailer_name": "Google"
133
- }, {
134
- "id_category": 3741,
135
- "id_retailer": 6,
136
- "category_name": "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
137
- "retailer_name": "HEB"
138
- }, {
139
- "id_category": 4780,
140
- "id_retailer": 27,
141
- "category_name": "Categoría Genérica IMPIRA México|Categoría Genérica|Categoría Genérica",
142
- "retailer_name": "IMPIRA México"
143
- }, {
144
- "id_category": 4796,
145
- "id_retailer": 39,
146
- "category_name": "Limpieza y Hogar|Limpieza General|Limpieza General",
147
- "retailer_name": "Justo"
148
- }, {
149
- "id_category": 4835,
150
- "id_retailer": 7,
151
- "category_name": "Categoría Genérica Mega|Categoría Genérica|Categoría Genérica",
152
- "retailer_name": "Mega"
153
- }, {
154
- "id_category": 4853,
155
- "id_retailer": 33,
156
- "category_name": "Cuidado Hogar|Lavatrastes|Lavatrastes Liquidos",
157
- "retailer_name": "Merza"
158
- }, {
159
- "id_category": 4873,
160
- "id_retailer": 36,
161
- "category_name": "Productos del Hogar|Productos del Hogar|Productos del Hogar",
162
- "retailer_name": "Oxxo"
163
- }, {
164
- "id_category": 4911,
165
- "id_retailer": 16,
166
- "category_name": "Categoría Genérica Rappi|Categoría Genérica|Categoría Genérica",
167
- "retailer_name": "Rappi"
168
- }, {
169
- "id_category": 5918,
170
- "id_retailer": 4,
171
- "category_name": "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
172
- "retailer_name": "Walmart Super y Superama"
173
- }, {
174
- "id_category": 7126,
175
- "id_retailer": 13,
176
- "category_name": "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
177
- "retailer_name": "Soriana"
178
- }, {
179
- "id_category": 7196,
180
- "id_retailer": 5,
181
- "category_name": "Categoría Consumibles Chedraui|Consumibles|Productos de Limpieza y Lavandería",
182
- "retailer_name": "Chedraui"
89
+ "id_category": 4007,
90
+ "id_retailer": 70,
91
+ "category_name": "Abarrotes Procesados|Abarrotes Básicos y Procesados|Abarrotes Básicos y Procesados",
92
+ "retailer_name": "Bodega Aurrera"
183
93
  }]
184
94
  },
185
95
  "retailers": [{
186
- "id": 4,
187
- "name": "Walmart Super y Superama"
188
- }, {
189
- "id": 5,
190
- "name": "Chedraui"
191
- }, {
192
- "id": 6,
193
- "name": "HEB"
194
- }, {
195
- "id": 8,
196
- "name": "Fragua"
197
- }, {
198
- "id": 12,
199
- "name": "La Comer"
200
- }, {
201
- "id": 13,
202
- "name": "Soriana"
203
- }, {
204
- "id": 16,
205
- "name": "Rappi"
206
- }, {
207
- "id": 17,
208
- "name": "Genérico"
209
- }, {
210
- "id": 20,
211
- "name": "Cornershop"
212
- }, {
213
- "id": 24,
214
- "name": "Alsuper"
215
- }, {
216
- "id": 29,
217
- "name": "Farmacias del Ahorro"
218
- }, {
219
- "id": 36,
220
- "name": "Oxxo"
96
+ "id": 70,
97
+ "name": "Bodega Aurrera"
221
98
  }],
222
99
  "country": "México",
223
- "upc": "7509546052977"
100
+ "upc": "098928"
224
101
  },
225
102
  // location: {
226
103
  // product: { articleId: 126855, versionId: 3 },
@@ -230,42 +107,41 @@ RetailerProductEditionDefault.args = {
230
107
  // },
231
108
  // },
232
109
  // EDICION IMAGENES
233
- // user: {
234
- // "id_user": 427,
235
- // "name": "Especialista Edición",
236
- // "last_name": null,
237
- // "email": "kikije1467@mtlcz.com",
238
- // "position": "Tester",
239
- // "telephone": null,
240
- // "country": null,
241
- // "id_company": 254,
242
- // "id_cognito": "c7e5a6a4-2b3f-4d54-af98-9e09a4cbc01e",
243
- // "birth_Date": null,
244
- // "about_me": null,
245
- // "zip_code": null,
246
- // "address": null,
247
- // "job": null,
248
- // "id_stripe": null,
249
- // "id_role": 8,
250
- // "active": 1,
251
- // "is_retailer": 0,
252
- // "email_notify": null,
253
- // "is_user_tech": null,
254
- // "is_onboarding": 0,
255
- // "membership": {
256
- // "id": 750,
257
- // "start_date": "2022-01-07T21:32:54.000Z",
258
- // "end_date": "2023-01-07T21:32:54.000Z",
259
- // "planID": 6,
260
- // "plan": "prod_KvGd6YSTJyR3AP",
261
- // "name": "Plan Small",
262
- // "user_limit": "10",
263
- // "products_limit": "1000",
264
- // "type": "Enterprise"
265
- // },
266
- // "src": "https://content-management-profile-prod.s3.amazonaws.com/id-427/427.png?1775592220312"
267
- // },
268
- //TEXTOS
110
+ user: {
111
+ "id_user": 427,
112
+ "name": "Especialista Edición",
113
+ "last_name": null,
114
+ "email": "kikije1467@mtlcz.com",
115
+ "position": "Tester",
116
+ "telephone": null,
117
+ "country": null,
118
+ "id_company": 254,
119
+ "id_cognito": "c7e5a6a4-2b3f-4d54-af98-9e09a4cbc01e",
120
+ "birth_Date": null,
121
+ "about_me": null,
122
+ "zip_code": null,
123
+ "address": null,
124
+ "job": null,
125
+ "id_stripe": null,
126
+ "id_role": 8,
127
+ "active": 1,
128
+ "is_retailer": 0,
129
+ "email_notify": null,
130
+ "is_user_tech": null,
131
+ "is_onboarding": 0,
132
+ "membership": {
133
+ "id": 750,
134
+ "start_date": "2022-01-07T21:32:54.000Z",
135
+ "end_date": "2023-01-07T21:32:54.000Z",
136
+ "planID": 6,
137
+ "plan": "prod_KvGd6YSTJyR3AP",
138
+ "name": "Plan Small",
139
+ "user_limit": "10",
140
+ "products_limit": "1000",
141
+ "type": "Enterprise"
142
+ },
143
+ "src": "https://content-management-profile-prod.s3.amazonaws.com/id-427/427.png?1775592220312"
144
+ } //TEXTOS
269
145
  // user: {
270
146
  // "id_user": 442,
271
147
  // "name": "Especialista",
@@ -302,39 +178,40 @@ RetailerProductEditionDefault.args = {
302
178
  // },
303
179
  // "src": "https://content-management-profile.s3.amazonaws.com/id-442/442.png?1760636567736"
304
180
  // },
305
- user: {
306
- id_user: 426,
307
- name: "Especialista Textos",
308
- last_name: null,
309
- email: "karafe3218@mom2kid.com",
310
- position: "Tester",
311
- telephone: null,
312
- country: null,
313
- id_company: 254,
314
- id_cognito: "8d010214-5bfa-43c3-96fb-c556dc05774b",
315
- birth_Date: null,
316
- about_me: null,
317
- zip_code: null,
318
- address: null,
319
- job: null,
320
- id_stripe: null,
321
- id_role: 7,
322
- active: 1,
323
- is_retailer: 0,
324
- email_notify: null,
325
- is_user_tech: null,
326
- is_onboarding: 0,
327
- membership: {
328
- id: 750,
329
- start_date: "2022-01-07T21:32:54.000Z",
330
- end_date: "2023-01-07T21:32:54.000Z",
331
- planID: 6,
332
- plan: "prod_KvGd6YSTJyR3AP",
333
- name: "Plan Small",
334
- user_limit: "10",
335
- products_limit: "1000",
336
- type: "Enterprise"
337
- },
338
- src: "https://content-management-profile-prod.s3.amazonaws.com/id-426/426.png?1768253179478"
339
- }
181
+ // user: {
182
+ // id_user: 426,
183
+ // name: "Especialista Textos",
184
+ // last_name: null,
185
+ // email: "karafe3218@mom2kid.com",
186
+ // position: "Tester",
187
+ // telephone: null,
188
+ // country: null,
189
+ // id_company: 254,
190
+ // id_cognito: "8d010214-5bfa-43c3-96fb-c556dc05774b",
191
+ // birth_Date: null,
192
+ // about_me: null,
193
+ // zip_code: null,
194
+ // address: null,
195
+ // job: null,
196
+ // id_stripe: null,
197
+ // id_role: 7,
198
+ // active: 1,
199
+ // is_retailer: 0,
200
+ // email_notify: null,
201
+ // is_user_tech: null,
202
+ // is_onboarding: 0,
203
+ // membership: {
204
+ // id: 750,
205
+ // start_date: "2022-01-07T21:32:54.000Z",
206
+ // end_date: "2023-01-07T21:32:54.000Z",
207
+ // planID: 6,
208
+ // plan: "prod_KvGd6YSTJyR3AP",
209
+ // name: "Plan Small",
210
+ // user_limit: "10",
211
+ // products_limit: "1000",
212
+ // type: "Enterprise",
213
+ // },
214
+ // src: "https://content-management-profile-prod.s3.amazonaws.com/id-426/426.png?1768253179478",
215
+ // },
216
+
340
217
  };
@@ -9,6 +9,8 @@ exports.productReducer = exports.productInitialState = exports.PRODUCT_ACTIONS =
9
9
 
10
10
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
11
 
12
+ var _statusDictionary = require("../../../../../global-files/statusDictionary");
13
+
12
14
  var productInitialState = {
13
15
  product: null,
14
16
  services: null,
@@ -20,7 +22,8 @@ var PRODUCT_ACTIONS = {
20
22
  SET_SERVICES: "SET_SERVICES",
21
23
  SET_SERVICES_DATA: "SET_SERVICES_DATA",
22
24
  SET_PRODUCT_VERSION: "SET_PRODUCT_VERSION",
23
- SET_PERCENTAGES: "SET_PERCENTAGES"
25
+ SET_PERCENTAGES: "SET_PERCENTAGES",
26
+ SET_RETAILER_STATUS: "SET_RETAILER_STATUS"
24
27
  };
25
28
  exports.PRODUCT_ACTIONS = PRODUCT_ACTIONS;
26
29
 
@@ -40,6 +43,33 @@ var productReducer = function productReducer(state, action) {
40
43
  });
41
44
  }
42
45
 
46
+ case PRODUCT_ACTIONS.SET_RETAILER_STATUS:
47
+ {
48
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
49
+ product: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state.product), {}, {
50
+ status: getMinorStatus(action.payload.map(function (status) {
51
+ return status === null || status === void 0 ? void 0 : status.status;
52
+ })),
53
+ description_status: action.payload.find(function (status) {
54
+ var _state$active_retaile;
55
+
56
+ return (status === null || status === void 0 ? void 0 : status.service) === "description" && (status === null || status === void 0 ? void 0 : status.retailer_id) === (state === null || state === void 0 ? void 0 : (_state$active_retaile = state.active_retailer) === null || _state$active_retaile === void 0 ? void 0 : _state$active_retaile.id_retailer);
57
+ }).status || "NS",
58
+ datasheet_status: action.payload.find(function (status) {
59
+ var _state$active_retaile2;
60
+
61
+ return (status === null || status === void 0 ? void 0 : status.service) === "datasheet" && (status === null || status === void 0 ? void 0 : status.retailer_id) === (state === null || state === void 0 ? void 0 : (_state$active_retaile2 = state.active_retailer) === null || _state$active_retaile2 === void 0 ? void 0 : _state$active_retaile2.id_retailer);
62
+ }).status || "NS",
63
+ images_status: action.payload.find(function (status) {
64
+ var _state$active_retaile3;
65
+
66
+ return (status === null || status === void 0 ? void 0 : status.service) === "images" && (status === null || status === void 0 ? void 0 : status.retailer_id) === (state === null || state === void 0 ? void 0 : (_state$active_retaile3 = state.active_retailer) === null || _state$active_retaile3 === void 0 ? void 0 : _state$active_retaile3.id_retailer);
67
+ }).status || "NS",
68
+ statusByRetailer: action.payload
69
+ })
70
+ });
71
+ }
72
+
43
73
  case PRODUCT_ACTIONS.SET_SERVICES_DATA:
44
74
  {
45
75
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
@@ -72,4 +102,20 @@ var productReducer = function productReducer(state, action) {
72
102
  }
73
103
  };
74
104
 
75
- exports.productReducer = productReducer;
105
+ exports.productReducer = productReducer;
106
+
107
+ function getMinorStatus() {
108
+ var servicesStatus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
109
+ if (!servicesStatus || servicesStatus.length === 0) return _statusDictionary.STATUS_DICTIONARY.NS.name;
110
+ console.log({
111
+ servicesStatus: servicesStatus
112
+ });
113
+ var winner = servicesStatus.reduce(function (minor, current) {
114
+ var currentObj = typeof current === "string" ? _statusDictionary.STATUS_DICTIONARY[current] : current;
115
+ var minorObj = typeof minor === "string" ? _statusDictionary.STATUS_DICTIONARY[minor] : minor;
116
+ if (!currentObj || typeof currentObj.weight === "undefined") return minor;
117
+ if (!minorObj || typeof minorObj.weight === "undefined") return current;
118
+ return currentObj.weight < minorObj.weight ? currentObj : minorObj;
119
+ }, servicesStatus[0] || _statusDictionary.STATUS_DICTIONARY.NS);
120
+ return (winner === null || winner === void 0 ? void 0 : winner.status) || _statusDictionary.STATUS_DICTIONARY.NS.status;
121
+ }