contentoh-components-library 21.1.0 → 21.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/GeneralInput/index.js +1 -1
- package/dist/components/atoms/GenericModal/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/index.js +23 -20
- package/dist/components/atoms/InputFormatter/styles.js +1 -1
- package/dist/components/molecules/TagAndInput/index.js +4 -2
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +96 -98
- package/dist/components/pages/ProviderProductEdition/index.js +1 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +23 -23
- package/dist/components/pages/RetailerProductEdition/index.js +31 -6
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +5 -1
- package/src/components/atoms/GenericModal/styles.js +1 -1
- package/src/components/atoms/InputFormatter/index.js +18 -16
- package/src/components/atoms/InputFormatter/styles.js +1 -0
- package/src/components/molecules/TagAndInput/index.js +6 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +94 -108
- package/src/components/pages/ProviderProductEdition/index.js +1 -0
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +23 -23
- package/src/components/pages/RetailerProductEdition/index.js +38 -6
|
@@ -60,7 +60,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
60
60
|
setTextValue({
|
|
61
61
|
value: validateInput(evt, position, inputsArray)
|
|
62
62
|
});
|
|
63
|
-
} else if (updatedDatasheets || updatedDescriptions) {
|
|
63
|
+
} else if (updatedDatasheets || updatedDescriptions || inputType === "textarea") {
|
|
64
64
|
setTextValue({
|
|
65
65
|
value: inputType === "checkbox" ? evt.target.checked : evt.target.value
|
|
66
66
|
});
|
|
@@ -17,6 +17,6 @@ var _genericModalClose = _interopRequireDefault(require("../../../assets/images/
|
|
|
17
17
|
|
|
18
18
|
var _templateObject;
|
|
19
19
|
|
|
20
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n background-color: rgba(59, 59, 59, 0.53);\n backdrop-filter: blur(4px);\n top: 0;\n left: 0;\n z-index: 100;\n\n h2 {\n overflow: initial;\n }\n\n .global-styles {\n background-color: ", ";\n height: auto;\n width:
|
|
20
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n background-color: rgba(59, 59, 59, 0.53);\n backdrop-filter: blur(4px);\n top: 0;\n left: 0;\n z-index: 100;\n\n h2 {\n overflow: initial;\n }\n\n .global-styles {\n background-color: ", ";\n height: auto;\n width: 500px;\n position: relative;\n border-radius: 15px;\n padding: 40px;\n text-align: center;\n .close-button {\n background-image: url(", ");\n background-color: transparent;\n width: 14px;\n height: 14px;\n cursor: pointer;\n border: none;\n position: absolute;\n right: 20px;\n top: 20px;\n }\n .general-white-button {\n width: 160px;\n height: 40px;\n color: ", ";\n border: 1px solid ", ";\n background-color: transparent;\n & + * {\n margin-left: 45px;\n height: 40px;\n width: 161px;\n }\n }\n\n &.log-out {\n padding-bottom: 60px;\n img {\n & + * {\n margin-top: 20px;\n }\n }\n .with-bold-text {\n font-size: 24px;\n & + * {\n margin-top: 20px;\n }\n }\n }\n\n &.delete-product {\n img {\n height: 50px;\n width: 56px;\n & + * {\n margin-top: 30px;\n }\n }\n .product-name-header,\n .retailer-name-header {\n & + * {\n margin-top: 30px;\n }\n }\n }\n\n &.product-edition {\n padding-top: 50px;\n .product-name-header {\n & + * {\n margin-top: 25px;\n }\n }\n }\n\n &.send-invitation {\n width: 604px;\n img {\n & + * {\n margin-top: 40px;\n }\n }\n p {\n font-family: ", ";\n font-style: normal;\n font-size: 24px;\n color: ", ";\n line-height: 28px;\n span {\n font-family: ", ";\n }\n }\n }\n\n &.upload-image {\n width: 430px;\n padding: 50px;\n img {\n & + * {\n margin-top: 33px;\n }\n }\n .input-name-header {\n & + * {\n margin-top: 20px;\n }\n }\n .list-container {\n & + .general-button-default {\n margin-top: 40px;\n }\n }\n }\n }\n"])), _variables.GlobalColors.white, _variables.GlobalColors.deep_gray, _genericModalClose.default, _variables.GlobalColors.s2, _variables.GlobalColors.white, _variables.FontFamily.Raleway_500, _variables.GlobalColors.white, _variables.FontFamily.Raleway_700);
|
|
21
21
|
|
|
22
22
|
exports.Container = Container;
|
|
@@ -98,18 +98,27 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
98
98
|
|
|
99
99
|
setCharsCounter(h.getLength() - 1);
|
|
100
100
|
value = valueFormater(value);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
101
|
+
|
|
102
|
+
if (updatedDescriptions) {
|
|
103
|
+
var idInput = inputId;
|
|
104
|
+
var dataSave = updatedDescriptions === null || updatedDescriptions === void 0 ? void 0 : updatedDescriptions.slice();
|
|
105
|
+
|
|
106
|
+
if ((dataSave === null || dataSave === void 0 ? void 0 : dataSave.length) > 0) {
|
|
107
|
+
if (dataSave.filter(function (e) {
|
|
108
|
+
return e.attributeId === idInput;
|
|
109
|
+
}).length > 0) {
|
|
110
|
+
dataSave.forEach(function (e) {
|
|
111
|
+
if (e.attributeId === idInput) {
|
|
112
|
+
e.value = value;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
} else {
|
|
116
|
+
dataSave.push({
|
|
117
|
+
articleId: articleId,
|
|
118
|
+
attributeId: idInput,
|
|
119
|
+
value: value
|
|
120
|
+
});
|
|
121
|
+
}
|
|
113
122
|
} else {
|
|
114
123
|
dataSave.push({
|
|
115
124
|
articleId: articleId,
|
|
@@ -117,15 +126,9 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
117
126
|
value: value
|
|
118
127
|
});
|
|
119
128
|
}
|
|
120
|
-
} else {
|
|
121
|
-
dataSave.push({
|
|
122
|
-
articleId: articleId,
|
|
123
|
-
attributeId: idInput,
|
|
124
|
-
value: value
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
129
|
|
|
128
|
-
|
|
130
|
+
setUpdatedDescriptions(dataSave);
|
|
131
|
+
}
|
|
129
132
|
};
|
|
130
133
|
|
|
131
134
|
var getSelection = function getSelection(range, a, b) {
|
|
@@ -15,7 +15,7 @@ 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 .quill {\n border: 1px solid\n ", ";\n position: relative;\n border-radius: 2px;\n\n .ql-toolbar {\n background-color: ", ";\n position: absolute;\n z-index: 10;\n border: 1px solid ", ";\n width: 45px;\n height: 45px;\n border-radius: 4px;\n visibility: ", ";\n top: ", "px;\n left: ", "px;\n }\n\n .ql-container {\n border: none;\n font-family: ", ";\n color: ", ";\n strong {\n font-family: ", ";\n }\n }\n }\n .description-limit {\n font-size: 12px;\n font-family: ", ";\n color: ", ";\n text-align: right;\n }\n"])), function (_ref) {
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .quill {\n background-color: ", ";\n border: 1px solid\n ", ";\n position: relative;\n border-radius: 2px;\n\n .ql-toolbar {\n background-color: ", ";\n position: absolute;\n z-index: 10;\n border: 1px solid ", ";\n width: 45px;\n height: 45px;\n border-radius: 4px;\n visibility: ", ";\n top: ", "px;\n left: ", "px;\n }\n\n .ql-container {\n border: none;\n font-family: ", ";\n color: ", ";\n strong {\n font-family: ", ";\n }\n }\n }\n .description-limit {\n font-size: 12px;\n font-family: ", ";\n color: ", ";\n text-align: right;\n }\n"])), _variables.GlobalColors.white, function (_ref) {
|
|
19
19
|
var focus = _ref.focus,
|
|
20
20
|
isRequired = _ref.isRequired;
|
|
21
21
|
return focus ? _variables.GlobalColors.magenta_s2 : isRequired ? "red" : _variables.GlobalColors.s3;
|
|
@@ -34,7 +34,8 @@ var TagAndInput = function TagAndInput(_ref) {
|
|
|
34
34
|
required = _ref.required,
|
|
35
35
|
optionList = _ref.optionList,
|
|
36
36
|
description = _ref.description,
|
|
37
|
-
inputOnChange = _ref.inputOnChange
|
|
37
|
+
inputOnChange = _ref.inputOnChange,
|
|
38
|
+
color = _ref.color;
|
|
38
39
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
39
40
|
inputType: inputType,
|
|
40
41
|
className: "input-container",
|
|
@@ -42,7 +43,8 @@ var TagAndInput = function TagAndInput(_ref) {
|
|
|
42
43
|
className: "title-container",
|
|
43
44
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
44
45
|
text: label,
|
|
45
|
-
headerType: "input-name-header"
|
|
46
|
+
headerType: "input-name-header",
|
|
47
|
+
color: color
|
|
46
48
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
47
49
|
className: "tooltip",
|
|
48
50
|
children: label
|
|
@@ -36,109 +36,107 @@ ProviderProductEditionDefault.args = {
|
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
|
-
orderId:
|
|
40
|
-
|
|
41
|
-
datasheet_status: "
|
|
42
|
-
description_status: "AC",
|
|
43
|
-
images_status: "AP",
|
|
39
|
+
orderId: 47,
|
|
40
|
+
status: "AA",
|
|
41
|
+
datasheet_status: "AA",
|
|
44
42
|
prio: "none",
|
|
45
43
|
version: 2,
|
|
44
|
+
description_status: "AA",
|
|
45
|
+
images_status: "AA",
|
|
46
46
|
brand: null,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
id_article: 35705,
|
|
53
|
-
name: "FOCO LED A19 (60W) LUZ AMARILLA",
|
|
54
|
-
upc: "12087311111"
|
|
47
|
+
retailerOrder: 0,
|
|
48
|
+
missing: {
|
|
49
|
+
datasheet: 0,
|
|
50
|
+
descriptions: 1,
|
|
51
|
+
images: 0
|
|
55
52
|
},
|
|
56
|
-
retailers: [{
|
|
57
|
-
id: 58,
|
|
58
|
-
name: "The Home Depot Golden"
|
|
59
|
-
}, {
|
|
60
|
-
id: 59,
|
|
61
|
-
name: "The Home Depot Platinum"
|
|
62
|
-
}, {
|
|
63
|
-
id: 60,
|
|
64
|
-
name: "The Home Depot Resizing"
|
|
65
|
-
}, {
|
|
66
|
-
id: 61,
|
|
67
|
-
name: "Home Depot TAB"
|
|
68
|
-
}],
|
|
69
53
|
services: {
|
|
70
54
|
datasheets: 1,
|
|
71
55
|
descriptions: 1,
|
|
72
56
|
images: 1
|
|
73
57
|
},
|
|
74
|
-
|
|
58
|
+
article: {
|
|
59
|
+
category: "ABARROTES|ABARROTES SECOS|GALLETAS",
|
|
60
|
+
company_name: "COMPANY DEV",
|
|
61
|
+
country: "México",
|
|
62
|
+
id_category: "12",
|
|
63
|
+
id_datasheet_especialist: 54,
|
|
64
|
+
id_datasheet_facilitator: 52,
|
|
65
|
+
id_description_especialist: 54,
|
|
66
|
+
id_description_facilitator: 52,
|
|
67
|
+
id_images_especialist: 55,
|
|
68
|
+
id_images_facilitator: 53,
|
|
69
|
+
id_order: 47,
|
|
70
|
+
id_article: 55115,
|
|
71
|
+
id_auditor: 30,
|
|
72
|
+
name: "Galletas Oreo",
|
|
73
|
+
upc: "42334242"
|
|
74
|
+
},
|
|
75
|
+
retailers: [{
|
|
76
|
+
id: 4,
|
|
77
|
+
name: "Walmart Super y Superama"
|
|
78
|
+
}],
|
|
75
79
|
retailersAvailable: [{
|
|
76
|
-
id:
|
|
77
|
-
name: "
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
name: "The Home Depot Resizing"
|
|
84
|
-
}, {
|
|
85
|
-
id: 61,
|
|
86
|
-
name: "Home Depot TAB"
|
|
87
|
-
}]
|
|
80
|
+
id: 4,
|
|
81
|
+
name: "Walmart Super y Superama"
|
|
82
|
+
}],
|
|
83
|
+
categoryName: "ABARROTES|ABARROTES SECOS|GALLETAS",
|
|
84
|
+
upc: "42334242",
|
|
85
|
+
id_article: 55115,
|
|
86
|
+
id_order: 47
|
|
88
87
|
},
|
|
89
88
|
productToEdit: {
|
|
90
|
-
ArticleId:
|
|
91
|
-
idCategory: "
|
|
89
|
+
ArticleId: 55115,
|
|
90
|
+
idCategory: "12",
|
|
92
91
|
product: {
|
|
93
|
-
orderId:
|
|
94
|
-
|
|
95
|
-
datasheet_status: "
|
|
96
|
-
description_status: "AC",
|
|
97
|
-
images_status: "AP",
|
|
92
|
+
orderId: 47,
|
|
93
|
+
status: "AA",
|
|
94
|
+
datasheet_status: "AA",
|
|
98
95
|
prio: "none",
|
|
99
96
|
version: 2,
|
|
97
|
+
description_status: "AA",
|
|
98
|
+
images_status: "AA",
|
|
100
99
|
brand: null,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
id_article: 35705,
|
|
107
|
-
name: "FOCO LED A19 (60W) LUZ AMARILLA",
|
|
108
|
-
upc: "12087311111"
|
|
100
|
+
retailerOrder: 0,
|
|
101
|
+
missing: {
|
|
102
|
+
datasheet: 0,
|
|
103
|
+
descriptions: 1,
|
|
104
|
+
images: 0
|
|
109
105
|
},
|
|
110
|
-
retailers: [{
|
|
111
|
-
id: 58,
|
|
112
|
-
name: "The Home Depot Golden"
|
|
113
|
-
}, {
|
|
114
|
-
id: 59,
|
|
115
|
-
name: "The Home Depot Platinum"
|
|
116
|
-
}, {
|
|
117
|
-
id: 60,
|
|
118
|
-
name: "The Home Depot Resizing"
|
|
119
|
-
}, {
|
|
120
|
-
id: 61,
|
|
121
|
-
name: "Home Depot TAB"
|
|
122
|
-
}],
|
|
123
106
|
services: {
|
|
124
107
|
datasheets: 1,
|
|
125
108
|
descriptions: 1,
|
|
126
109
|
images: 1
|
|
127
110
|
},
|
|
128
|
-
|
|
111
|
+
article: {
|
|
112
|
+
category: "ABARROTES|ABARROTES SECOS|GALLETAS",
|
|
113
|
+
company_name: "COMPANY DEV",
|
|
114
|
+
country: "México",
|
|
115
|
+
id_category: "12",
|
|
116
|
+
id_datasheet_especialist: 54,
|
|
117
|
+
id_datasheet_facilitator: 52,
|
|
118
|
+
id_description_especialist: 54,
|
|
119
|
+
id_description_facilitator: 52,
|
|
120
|
+
id_images_especialist: 55,
|
|
121
|
+
id_images_facilitator: 53,
|
|
122
|
+
id_order: 47,
|
|
123
|
+
id_article: 55115,
|
|
124
|
+
id_auditor: 30,
|
|
125
|
+
name: "Galletas Oreo",
|
|
126
|
+
upc: "42334242"
|
|
127
|
+
},
|
|
128
|
+
retailers: [{
|
|
129
|
+
id: 4,
|
|
130
|
+
name: "Walmart Super y Superama"
|
|
131
|
+
}],
|
|
129
132
|
retailersAvailable: [{
|
|
130
|
-
id:
|
|
131
|
-
name: "
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
name: "The Home Depot Resizing"
|
|
138
|
-
}, {
|
|
139
|
-
id: 61,
|
|
140
|
-
name: "Home Depot TAB"
|
|
141
|
-
}]
|
|
133
|
+
id: 4,
|
|
134
|
+
name: "Walmart Super y Superama"
|
|
135
|
+
}],
|
|
136
|
+
categoryName: "ABARROTES|ABARROTES SECOS|GALLETAS",
|
|
137
|
+
upc: "42334242",
|
|
138
|
+
id_article: 55115,
|
|
139
|
+
id_order: 47
|
|
142
140
|
}
|
|
143
141
|
},
|
|
144
142
|
location: {
|
|
@@ -151,35 +149,35 @@ ProviderProductEditionDefault.args = {
|
|
|
151
149
|
}
|
|
152
150
|
},
|
|
153
151
|
user: {
|
|
154
|
-
id_user:
|
|
155
|
-
name: "
|
|
156
|
-
last_name: "
|
|
157
|
-
email: "
|
|
158
|
-
position: "Admin",
|
|
152
|
+
id_user: 28,
|
|
153
|
+
name: "Proveedor",
|
|
154
|
+
last_name: "Colgate",
|
|
155
|
+
email: "ilopez@contentoh.com",
|
|
156
|
+
position: "Prueba Admin",
|
|
159
157
|
telephone: "+523111366336",
|
|
160
158
|
country: "México",
|
|
161
|
-
id_company:
|
|
162
|
-
id_cognito: "
|
|
159
|
+
id_company: 1,
|
|
160
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
163
161
|
birth_Date: null,
|
|
164
162
|
about_me: null,
|
|
165
163
|
zip_code: null,
|
|
166
164
|
address: null,
|
|
167
165
|
job: null,
|
|
168
|
-
id_stripe: "",
|
|
166
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
169
167
|
id_role: 0,
|
|
170
168
|
active: 1,
|
|
171
|
-
is_retailer:
|
|
169
|
+
is_retailer: 0,
|
|
172
170
|
membership: {
|
|
173
|
-
id:
|
|
174
|
-
start_date: "
|
|
175
|
-
end_date: "
|
|
176
|
-
planID:
|
|
177
|
-
plan: "
|
|
178
|
-
name: "Plan
|
|
179
|
-
user_limit: "
|
|
180
|
-
products_limit: "
|
|
171
|
+
id: 38,
|
|
172
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
173
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
174
|
+
planID: 8,
|
|
175
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
176
|
+
name: "Plan Pro",
|
|
177
|
+
user_limit: "20",
|
|
178
|
+
products_limit: "5000",
|
|
181
179
|
type: "Enterprise"
|
|
182
180
|
},
|
|
183
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
181
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1655613379760"
|
|
184
182
|
}
|
|
185
183
|
};
|
|
@@ -1441,6 +1441,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1441
1441
|
|
|
1442
1442
|
var evaluationComplete = function evaluationComplete(tab) {
|
|
1443
1443
|
var concept = getConcept(tab);
|
|
1444
|
+
console.log(origin[concept], "origin[concept]");
|
|
1444
1445
|
var serv = servicesData.filter(function (item) {
|
|
1445
1446
|
return item.service === concept;
|
|
1446
1447
|
});
|
|
@@ -41,54 +41,54 @@ RetailerProductEditionDefault.args = {
|
|
|
41
41
|
descriptions: 1,
|
|
42
42
|
images: 1
|
|
43
43
|
},
|
|
44
|
-
orderId:
|
|
45
|
-
status: "
|
|
46
|
-
datasheet_status: "
|
|
44
|
+
orderId: 27,
|
|
45
|
+
status: "RC",
|
|
46
|
+
datasheet_status: "AC",
|
|
47
47
|
prio: "none",
|
|
48
48
|
version: 2,
|
|
49
|
-
description_status: "
|
|
50
|
-
images_status: "
|
|
49
|
+
description_status: "RC",
|
|
50
|
+
images_status: "AC",
|
|
51
51
|
article: {
|
|
52
|
-
id_article:
|
|
53
|
-
id_category: "
|
|
54
|
-
name: "
|
|
55
|
-
upc: "
|
|
56
|
-
timestamp: "2022-06-
|
|
57
|
-
id_user:
|
|
52
|
+
id_article: 55099,
|
|
53
|
+
id_category: "2004",
|
|
54
|
+
name: "Producto de prueba 1 THD",
|
|
55
|
+
upc: "SKU1235THD",
|
|
56
|
+
timestamp: "2022-06-17T23:41:20.000Z",
|
|
57
|
+
id_user: 102,
|
|
58
58
|
status: "NULL",
|
|
59
59
|
active: 1,
|
|
60
|
-
company_id:
|
|
61
|
-
company_name: "
|
|
60
|
+
company_id: 833,
|
|
61
|
+
company_name: "THD Proveedor",
|
|
62
62
|
country: "México",
|
|
63
|
-
id_order:
|
|
64
|
-
id_datasheet_especialist:
|
|
63
|
+
id_order: 27,
|
|
64
|
+
id_datasheet_especialist: 36,
|
|
65
65
|
id_datasheet_facilitator: 52,
|
|
66
|
-
id_description_especialist:
|
|
66
|
+
id_description_especialist: 36,
|
|
67
67
|
id_description_facilitator: 52,
|
|
68
68
|
id_images_especialist: 55,
|
|
69
69
|
id_images_facilitator: 53,
|
|
70
70
|
id_auditor: 30,
|
|
71
71
|
id_recepcionist: null,
|
|
72
|
-
category: "
|
|
72
|
+
category: "BAÑOS|ACCESORIOS PARA BAÑO|ACCESORIOS INDIVIDUALES",
|
|
73
73
|
missingAttributes: null,
|
|
74
74
|
missingDescriptions: null,
|
|
75
75
|
missingImages: null
|
|
76
76
|
},
|
|
77
77
|
retailers: [{
|
|
78
|
-
id:
|
|
79
|
-
name: "
|
|
78
|
+
id: 58,
|
|
79
|
+
name: "The Home Depot Golden",
|
|
80
80
|
country: "México",
|
|
81
81
|
id_region: 1,
|
|
82
82
|
active: 1
|
|
83
83
|
}, {
|
|
84
|
-
id:
|
|
85
|
-
name: "
|
|
84
|
+
id: 59,
|
|
85
|
+
name: "The Home Depot Platinum",
|
|
86
86
|
country: "México",
|
|
87
87
|
id_region: 1,
|
|
88
88
|
active: 1
|
|
89
89
|
}],
|
|
90
90
|
country: "México",
|
|
91
|
-
upc: "
|
|
91
|
+
upc: "SKU1235THD"
|
|
92
92
|
},
|
|
93
93
|
location: {
|
|
94
94
|
product: {
|
|
@@ -126,6 +126,6 @@ RetailerProductEditionDefault.args = {
|
|
|
126
126
|
products_limit: "3",
|
|
127
127
|
type: "PyMES"
|
|
128
128
|
},
|
|
129
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?
|
|
129
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655598361036"
|
|
130
130
|
}
|
|
131
131
|
};
|
|
@@ -73,6 +73,8 @@ var _Loading = require("../../atoms/Loading");
|
|
|
73
73
|
|
|
74
74
|
var _genericModalCheck = _interopRequireDefault(require("../../../assets/images/genericModal/genericModalCheck.svg"));
|
|
75
75
|
|
|
76
|
+
var _errorModal = _interopRequireDefault(require("../../../assets/images/genericModal/errorModal.svg"));
|
|
77
|
+
|
|
76
78
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
77
79
|
|
|
78
80
|
var reducerImages = function reducerImages(state, action) {
|
|
@@ -978,19 +980,22 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
978
980
|
switch (userId) {
|
|
979
981
|
case 7:
|
|
980
982
|
case 8:
|
|
981
|
-
return ["RA", "RF"].includes(product === null || product === void 0 ? void 0 : product.status) &&
|
|
983
|
+
return ["RA", "RF"].includes(product === null || product === void 0 ? void 0 : product.status) && //"IN_PROGRESS", "RF", "RA"
|
|
984
|
+
statusArray.includes(srvActive === null || srvActive === void 0 ? void 0 : srvActive.status) || statusArray.includes(product.status) && srv.filter(function (serv) {
|
|
982
985
|
return statusArray.includes(serv.status);
|
|
983
986
|
}).length === srv.length;
|
|
984
987
|
|
|
985
988
|
case 4:
|
|
986
989
|
case 5:
|
|
987
|
-
return unvalidated && ["IN_PROGRESS", "QF"].includes(product.status) &&
|
|
990
|
+
return unvalidated && ["IN_PROGRESS", "QF"].includes(product.status) && //"RF", "AF", "AA", "AP", "AC
|
|
991
|
+
srv.filter(function (serv) {
|
|
988
992
|
return statusArray.includes(serv.status);
|
|
989
993
|
}).length === srv.length;
|
|
990
994
|
|
|
991
995
|
case 6:
|
|
992
|
-
return statusArray.includes(product.status) &&
|
|
993
|
-
|
|
996
|
+
return statusArray.includes(product.status) && //RP, RC, AF
|
|
997
|
+
servicesData.every(function (serv) {
|
|
998
|
+
return ["RA", "AA", "AP", "AC"].includes(serv.status);
|
|
994
999
|
}) && auditorUnvalidated;
|
|
995
1000
|
|
|
996
1001
|
default:
|
|
@@ -1622,7 +1627,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1622
1627
|
sendToFacilitator("A");
|
|
1623
1628
|
},
|
|
1624
1629
|
reject: function reject() {
|
|
1625
|
-
sendToFacilitator("R");
|
|
1630
|
+
//sendToFacilitator("R");
|
|
1631
|
+
setMessage("Rechazado");
|
|
1632
|
+
setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
1633
|
+
src: _errorModal.default
|
|
1634
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1635
|
+
text: "Agrega tu comentarios para enviar el rechazo",
|
|
1636
|
+
headerType: "input-name-header",
|
|
1637
|
+
color: "white"
|
|
1638
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
1639
|
+
label: "Caja de Comentario",
|
|
1640
|
+
inputType: "textarea",
|
|
1641
|
+
inputId: "modal-commentary-box",
|
|
1642
|
+
index: 0,
|
|
1643
|
+
color: "white"
|
|
1644
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
1645
|
+
buttonType: "general-default-button",
|
|
1646
|
+
label: "Enviar comentario",
|
|
1647
|
+
onClick: function onClick(e) {
|
|
1648
|
+
return createComment(e, document.querySelector("#modal-commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
1649
|
+
}
|
|
1650
|
+
})]);
|
|
1626
1651
|
},
|
|
1627
1652
|
showValidationButtons: approveRejectButtons() && (auditorAssigned() || userAssigned())
|
|
1628
1653
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
@@ -1717,7 +1742,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1717
1742
|
buttonType: "general-transparent-button",
|
|
1718
1743
|
label: "Enviar comentario",
|
|
1719
1744
|
onClick: function onClick(e) {
|
|
1720
|
-
return createComment(e, document.querySelector("#
|
|
1745
|
+
return createComment(e, document.querySelector("#commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
1721
1746
|
}
|
|
1722
1747
|
})
|
|
1723
1748
|
})]
|
package/package.json
CHANGED
|
@@ -34,7 +34,11 @@ export const GeneralInput = ({
|
|
|
34
34
|
if (validateInput) {
|
|
35
35
|
console.log("here");
|
|
36
36
|
setTextValue({ value: validateInput(evt, position, inputsArray) });
|
|
37
|
-
} else if (
|
|
37
|
+
} else if (
|
|
38
|
+
updatedDatasheets ||
|
|
39
|
+
updatedDescriptions ||
|
|
40
|
+
inputType === "textarea"
|
|
41
|
+
) {
|
|
38
42
|
setTextValue({
|
|
39
43
|
value: inputType === "checkbox" ? evt.target.checked : evt.target.value,
|
|
40
44
|
});
|
|
@@ -59,15 +59,23 @@ export const InputFormatter = ({
|
|
|
59
59
|
setCharsCounter(h.getLength() - 1);
|
|
60
60
|
value = valueFormater(value);
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (dataSave
|
|
66
|
-
dataSave.
|
|
67
|
-
|
|
68
|
-
e.
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
if (updatedDescriptions) {
|
|
63
|
+
let idInput = inputId;
|
|
64
|
+
let dataSave = updatedDescriptions?.slice();
|
|
65
|
+
if (dataSave?.length > 0) {
|
|
66
|
+
if (dataSave.filter((e) => e.attributeId === idInput).length > 0) {
|
|
67
|
+
dataSave.forEach((e) => {
|
|
68
|
+
if (e.attributeId === idInput) {
|
|
69
|
+
e.value = value;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
} else {
|
|
73
|
+
dataSave.push({
|
|
74
|
+
articleId: articleId,
|
|
75
|
+
attributeId: idInput,
|
|
76
|
+
value: value,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
71
79
|
} else {
|
|
72
80
|
dataSave.push({
|
|
73
81
|
articleId: articleId,
|
|
@@ -75,14 +83,8 @@ export const InputFormatter = ({
|
|
|
75
83
|
value: value,
|
|
76
84
|
});
|
|
77
85
|
}
|
|
78
|
-
|
|
79
|
-
dataSave.push({
|
|
80
|
-
articleId: articleId,
|
|
81
|
-
attributeId: idInput,
|
|
82
|
-
value: value,
|
|
83
|
-
});
|
|
86
|
+
setUpdatedDescriptions(dataSave);
|
|
84
87
|
}
|
|
85
|
-
setUpdatedDescriptions(dataSave);
|
|
86
88
|
};
|
|
87
89
|
|
|
88
90
|
const getSelection = (range, a, b) => {
|
|
@@ -3,6 +3,7 @@ import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
|
3
3
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
5
|
.quill {
|
|
6
|
+
background-color: ${GlobalColors.white};
|
|
6
7
|
border: 1px solid
|
|
7
8
|
${({ focus, isRequired }) =>
|
|
8
9
|
focus ? GlobalColors.magenta_s2 : isRequired ? "red" : GlobalColors.s3};
|
|
@@ -24,6 +24,7 @@ export const TagAndInput = ({
|
|
|
24
24
|
optionList,
|
|
25
25
|
description,
|
|
26
26
|
inputOnChange,
|
|
27
|
+
color,
|
|
27
28
|
}) => {
|
|
28
29
|
return (
|
|
29
30
|
<Container
|
|
@@ -32,7 +33,11 @@ export const TagAndInput = ({
|
|
|
32
33
|
key={`generalTagInput-${inputType}`}
|
|
33
34
|
>
|
|
34
35
|
<div className="title-container">
|
|
35
|
-
<ScreenHeader
|
|
36
|
+
<ScreenHeader
|
|
37
|
+
text={label}
|
|
38
|
+
headerType={"input-name-header"}
|
|
39
|
+
color={color}
|
|
40
|
+
/>
|
|
36
41
|
<span className="tooltip">{label}</span>
|
|
37
42
|
</div>
|
|
38
43
|
<GeneralInput
|
|
@@ -21,129 +21,115 @@ ProviderProductEditionDefault.args = {
|
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
orderId:
|
|
25
|
-
|
|
26
|
-
datasheet_status: "
|
|
27
|
-
description_status: "AC",
|
|
28
|
-
images_status: "AP",
|
|
24
|
+
orderId: 47,
|
|
25
|
+
status: "AA",
|
|
26
|
+
datasheet_status: "AA",
|
|
29
27
|
prio: "none",
|
|
30
28
|
version: 2,
|
|
29
|
+
description_status: "AA",
|
|
30
|
+
images_status: "AA",
|
|
31
31
|
brand: null,
|
|
32
|
+
retailerOrder: 0,
|
|
33
|
+
missing: {
|
|
34
|
+
datasheet: 0,
|
|
35
|
+
descriptions: 1,
|
|
36
|
+
images: 0,
|
|
37
|
+
},
|
|
38
|
+
services: {
|
|
39
|
+
datasheets: 1,
|
|
40
|
+
descriptions: 1,
|
|
41
|
+
images: 1,
|
|
42
|
+
},
|
|
32
43
|
article: {
|
|
33
|
-
category: "
|
|
44
|
+
category: "ABARROTES|ABARROTES SECOS|GALLETAS",
|
|
34
45
|
company_name: "COMPANY DEV",
|
|
35
46
|
country: "México",
|
|
36
|
-
id_category: "
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
id_category: "12",
|
|
48
|
+
id_datasheet_especialist: 54,
|
|
49
|
+
id_datasheet_facilitator: 52,
|
|
50
|
+
id_description_especialist: 54,
|
|
51
|
+
id_description_facilitator: 52,
|
|
52
|
+
id_images_especialist: 55,
|
|
53
|
+
id_images_facilitator: 53,
|
|
54
|
+
id_order: 47,
|
|
55
|
+
id_article: 55115,
|
|
56
|
+
id_auditor: 30,
|
|
57
|
+
name: "Galletas Oreo",
|
|
58
|
+
upc: "42334242",
|
|
40
59
|
},
|
|
41
60
|
retailers: [
|
|
42
61
|
{
|
|
43
|
-
id:
|
|
44
|
-
name: "
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: 59,
|
|
48
|
-
name: "The Home Depot Platinum",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: 60,
|
|
52
|
-
name: "The Home Depot Resizing",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: 61,
|
|
56
|
-
name: "Home Depot TAB",
|
|
62
|
+
id: 4,
|
|
63
|
+
name: "Walmart Super y Superama",
|
|
57
64
|
},
|
|
58
65
|
],
|
|
59
|
-
services: {
|
|
60
|
-
datasheets: 1,
|
|
61
|
-
descriptions: 1,
|
|
62
|
-
images: 1,
|
|
63
|
-
},
|
|
64
|
-
id_article: 35705,
|
|
65
66
|
retailersAvailable: [
|
|
66
67
|
{
|
|
67
|
-
id:
|
|
68
|
-
name: "
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: 59,
|
|
72
|
-
name: "The Home Depot Platinum",
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: 60,
|
|
76
|
-
name: "The Home Depot Resizing",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: 61,
|
|
80
|
-
name: "Home Depot TAB",
|
|
68
|
+
id: 4,
|
|
69
|
+
name: "Walmart Super y Superama",
|
|
81
70
|
},
|
|
82
71
|
],
|
|
72
|
+
categoryName: "ABARROTES|ABARROTES SECOS|GALLETAS",
|
|
73
|
+
upc: "42334242",
|
|
74
|
+
id_article: 55115,
|
|
75
|
+
id_order: 47,
|
|
83
76
|
},
|
|
84
77
|
productToEdit: {
|
|
85
|
-
ArticleId:
|
|
86
|
-
idCategory: "
|
|
78
|
+
ArticleId: 55115,
|
|
79
|
+
idCategory: "12",
|
|
87
80
|
product: {
|
|
88
|
-
orderId:
|
|
89
|
-
|
|
90
|
-
datasheet_status: "
|
|
91
|
-
description_status: "AC",
|
|
92
|
-
images_status: "AP",
|
|
81
|
+
orderId: 47,
|
|
82
|
+
status: "AA",
|
|
83
|
+
datasheet_status: "AA",
|
|
93
84
|
prio: "none",
|
|
94
85
|
version: 2,
|
|
86
|
+
description_status: "AA",
|
|
87
|
+
images_status: "AA",
|
|
95
88
|
brand: null,
|
|
89
|
+
retailerOrder: 0,
|
|
90
|
+
missing: {
|
|
91
|
+
datasheet: 0,
|
|
92
|
+
descriptions: 1,
|
|
93
|
+
images: 0,
|
|
94
|
+
},
|
|
95
|
+
services: {
|
|
96
|
+
datasheets: 1,
|
|
97
|
+
descriptions: 1,
|
|
98
|
+
images: 1,
|
|
99
|
+
},
|
|
96
100
|
article: {
|
|
97
|
-
category: "
|
|
101
|
+
category: "ABARROTES|ABARROTES SECOS|GALLETAS",
|
|
98
102
|
company_name: "COMPANY DEV",
|
|
99
103
|
country: "México",
|
|
100
|
-
id_category: "
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
id_category: "12",
|
|
105
|
+
id_datasheet_especialist: 54,
|
|
106
|
+
id_datasheet_facilitator: 52,
|
|
107
|
+
id_description_especialist: 54,
|
|
108
|
+
id_description_facilitator: 52,
|
|
109
|
+
id_images_especialist: 55,
|
|
110
|
+
id_images_facilitator: 53,
|
|
111
|
+
id_order: 47,
|
|
112
|
+
id_article: 55115,
|
|
113
|
+
id_auditor: 30,
|
|
114
|
+
name: "Galletas Oreo",
|
|
115
|
+
upc: "42334242",
|
|
104
116
|
},
|
|
105
117
|
retailers: [
|
|
106
118
|
{
|
|
107
|
-
id:
|
|
108
|
-
name: "
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: 59,
|
|
112
|
-
name: "The Home Depot Platinum",
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
id: 60,
|
|
116
|
-
name: "The Home Depot Resizing",
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 61,
|
|
120
|
-
name: "Home Depot TAB",
|
|
119
|
+
id: 4,
|
|
120
|
+
name: "Walmart Super y Superama",
|
|
121
121
|
},
|
|
122
122
|
],
|
|
123
|
-
services: {
|
|
124
|
-
datasheets: 1,
|
|
125
|
-
descriptions: 1,
|
|
126
|
-
images: 1,
|
|
127
|
-
},
|
|
128
|
-
id_article: 35705,
|
|
129
123
|
retailersAvailable: [
|
|
130
124
|
{
|
|
131
|
-
id:
|
|
132
|
-
name: "
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
id: 59,
|
|
136
|
-
name: "The Home Depot Platinum",
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: 60,
|
|
140
|
-
name: "The Home Depot Resizing",
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
id: 61,
|
|
144
|
-
name: "Home Depot TAB",
|
|
125
|
+
id: 4,
|
|
126
|
+
name: "Walmart Super y Superama",
|
|
145
127
|
},
|
|
146
128
|
],
|
|
129
|
+
categoryName: "ABARROTES|ABARROTES SECOS|GALLETAS",
|
|
130
|
+
upc: "42334242",
|
|
131
|
+
id_article: 55115,
|
|
132
|
+
id_order: 47,
|
|
147
133
|
},
|
|
148
134
|
},
|
|
149
135
|
location: {
|
|
@@ -151,35 +137,35 @@ ProviderProductEditionDefault.args = {
|
|
|
151
137
|
state: { origin: "Contentoh" },
|
|
152
138
|
},
|
|
153
139
|
user: {
|
|
154
|
-
id_user:
|
|
155
|
-
name: "
|
|
156
|
-
last_name: "
|
|
157
|
-
email: "
|
|
158
|
-
position: "Admin",
|
|
140
|
+
id_user: 28,
|
|
141
|
+
name: "Proveedor",
|
|
142
|
+
last_name: "Colgate",
|
|
143
|
+
email: "ilopez@contentoh.com",
|
|
144
|
+
position: "Prueba Admin",
|
|
159
145
|
telephone: "+523111366336",
|
|
160
146
|
country: "México",
|
|
161
|
-
id_company:
|
|
162
|
-
id_cognito: "
|
|
147
|
+
id_company: 1,
|
|
148
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
163
149
|
birth_Date: null,
|
|
164
150
|
about_me: null,
|
|
165
151
|
zip_code: null,
|
|
166
152
|
address: null,
|
|
167
153
|
job: null,
|
|
168
|
-
id_stripe: "",
|
|
154
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
169
155
|
id_role: 0,
|
|
170
156
|
active: 1,
|
|
171
|
-
is_retailer:
|
|
157
|
+
is_retailer: 0,
|
|
172
158
|
membership: {
|
|
173
|
-
id:
|
|
174
|
-
start_date: "
|
|
175
|
-
end_date: "
|
|
176
|
-
planID:
|
|
177
|
-
plan: "
|
|
178
|
-
name: "Plan
|
|
179
|
-
user_limit: "
|
|
180
|
-
products_limit: "
|
|
159
|
+
id: 38,
|
|
160
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
161
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
162
|
+
planID: 8,
|
|
163
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
164
|
+
name: "Plan Pro",
|
|
165
|
+
user_limit: "20",
|
|
166
|
+
products_limit: "5000",
|
|
181
167
|
type: "Enterprise",
|
|
182
168
|
},
|
|
183
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
169
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1655613379760",
|
|
184
170
|
},
|
|
185
171
|
};
|
|
@@ -944,6 +944,7 @@ export const ProviderProductEdition = ({
|
|
|
944
944
|
|
|
945
945
|
const evaluationComplete = (tab) => {
|
|
946
946
|
const concept = getConcept(tab);
|
|
947
|
+
console.log(origin[concept], "origin[concept]");
|
|
947
948
|
let serv = servicesData.filter((item) => item.service === concept);
|
|
948
949
|
if (
|
|
949
950
|
["RequestWithContentoh", "RequestWithoutContentoh"].includes(
|
|
@@ -26,57 +26,57 @@ RetailerProductEditionDefault.args = {
|
|
|
26
26
|
descriptions: 1,
|
|
27
27
|
images: 1,
|
|
28
28
|
},
|
|
29
|
-
orderId:
|
|
30
|
-
status: "
|
|
31
|
-
datasheet_status: "
|
|
29
|
+
orderId: 27,
|
|
30
|
+
status: "RC",
|
|
31
|
+
datasheet_status: "AC",
|
|
32
32
|
prio: "none",
|
|
33
33
|
version: 2,
|
|
34
|
-
description_status: "
|
|
35
|
-
images_status: "
|
|
34
|
+
description_status: "RC",
|
|
35
|
+
images_status: "AC",
|
|
36
36
|
article: {
|
|
37
|
-
id_article:
|
|
38
|
-
id_category: "
|
|
39
|
-
name: "
|
|
40
|
-
upc: "
|
|
41
|
-
timestamp: "2022-06-
|
|
42
|
-
id_user:
|
|
37
|
+
id_article: 55099,
|
|
38
|
+
id_category: "2004",
|
|
39
|
+
name: "Producto de prueba 1 THD",
|
|
40
|
+
upc: "SKU1235THD",
|
|
41
|
+
timestamp: "2022-06-17T23:41:20.000Z",
|
|
42
|
+
id_user: 102,
|
|
43
43
|
status: "NULL",
|
|
44
44
|
active: 1,
|
|
45
|
-
company_id:
|
|
46
|
-
company_name: "
|
|
45
|
+
company_id: 833,
|
|
46
|
+
company_name: "THD Proveedor",
|
|
47
47
|
country: "México",
|
|
48
|
-
id_order:
|
|
49
|
-
id_datasheet_especialist:
|
|
48
|
+
id_order: 27,
|
|
49
|
+
id_datasheet_especialist: 36,
|
|
50
50
|
id_datasheet_facilitator: 52,
|
|
51
|
-
id_description_especialist:
|
|
51
|
+
id_description_especialist: 36,
|
|
52
52
|
id_description_facilitator: 52,
|
|
53
53
|
id_images_especialist: 55,
|
|
54
54
|
id_images_facilitator: 53,
|
|
55
55
|
id_auditor: 30,
|
|
56
56
|
id_recepcionist: null,
|
|
57
|
-
category: "
|
|
57
|
+
category: "BAÑOS|ACCESORIOS PARA BAÑO|ACCESORIOS INDIVIDUALES",
|
|
58
58
|
missingAttributes: null,
|
|
59
59
|
missingDescriptions: null,
|
|
60
60
|
missingImages: null,
|
|
61
61
|
},
|
|
62
62
|
retailers: [
|
|
63
63
|
{
|
|
64
|
-
id:
|
|
65
|
-
name: "
|
|
64
|
+
id: 58,
|
|
65
|
+
name: "The Home Depot Golden",
|
|
66
66
|
country: "México",
|
|
67
67
|
id_region: 1,
|
|
68
68
|
active: 1,
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
72
|
-
name: "
|
|
71
|
+
id: 59,
|
|
72
|
+
name: "The Home Depot Platinum",
|
|
73
73
|
country: "México",
|
|
74
74
|
id_region: 1,
|
|
75
75
|
active: 1,
|
|
76
76
|
},
|
|
77
77
|
],
|
|
78
78
|
country: "México",
|
|
79
|
-
upc: "
|
|
79
|
+
upc: "SKU1235THD",
|
|
80
80
|
},
|
|
81
81
|
location: {
|
|
82
82
|
product: { articleId: 109485, versionId: 3 },
|
|
@@ -111,6 +111,6 @@ RetailerProductEditionDefault.args = {
|
|
|
111
111
|
products_limit: "3",
|
|
112
112
|
type: "PyMES",
|
|
113
113
|
},
|
|
114
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?
|
|
114
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655598361036",
|
|
115
115
|
},
|
|
116
116
|
};
|
|
@@ -30,6 +30,7 @@ import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
|
30
30
|
import { Loading } from "../../atoms/Loading";
|
|
31
31
|
import succes from "../../../assets/images/genericModal/genericModalCheck.svg";
|
|
32
32
|
import { getNewStatus } from "../../../global-files/data";
|
|
33
|
+
import errorModal from "../../../assets/images/genericModal/errorModal.svg";
|
|
33
34
|
|
|
34
35
|
const reducerImages = (state, action) => {
|
|
35
36
|
let { values, attrForImgs } = state;
|
|
@@ -579,7 +580,7 @@ export const RetailerProductEdition = ({
|
|
|
579
580
|
case 7:
|
|
580
581
|
case 8:
|
|
581
582
|
return (
|
|
582
|
-
(["RA", "RF"].includes(product?.status) &&
|
|
583
|
+
(["RA", "RF"].includes(product?.status) && //"IN_PROGRESS", "RF", "RA"
|
|
583
584
|
statusArray.includes(srvActive?.status)) ||
|
|
584
585
|
(statusArray.includes(product.status) &&
|
|
585
586
|
srv.filter((serv) => statusArray.includes(serv.status)).length ===
|
|
@@ -589,14 +590,16 @@ export const RetailerProductEdition = ({
|
|
|
589
590
|
case 5:
|
|
590
591
|
return (
|
|
591
592
|
unvalidated &&
|
|
592
|
-
["IN_PROGRESS", "QF"].includes(product.status) &&
|
|
593
|
+
["IN_PROGRESS", "QF"].includes(product.status) && //"RF", "AF", "AA", "AP", "AC
|
|
593
594
|
srv.filter((serv) => statusArray.includes(serv.status)).length ===
|
|
594
595
|
srv.length
|
|
595
596
|
);
|
|
596
597
|
case 6:
|
|
597
598
|
return (
|
|
598
|
-
statusArray.includes(product.status) &&
|
|
599
|
-
servicesData.every((serv) =>
|
|
599
|
+
statusArray.includes(product.status) && //RP, RC, AF
|
|
600
|
+
servicesData.every((serv) =>
|
|
601
|
+
["RA", "AA", "AP", "AC"].includes(serv.status)
|
|
602
|
+
) &&
|
|
600
603
|
auditorUnvalidated
|
|
601
604
|
);
|
|
602
605
|
default:
|
|
@@ -1175,7 +1178,36 @@ export const RetailerProductEdition = ({
|
|
|
1175
1178
|
sendToFacilitator("A");
|
|
1176
1179
|
}}
|
|
1177
1180
|
reject={() => {
|
|
1178
|
-
sendToFacilitator("R");
|
|
1181
|
+
//sendToFacilitator("R");
|
|
1182
|
+
setMessage("Rechazado");
|
|
1183
|
+
setComponentsArray([
|
|
1184
|
+
<img src={errorModal} />,
|
|
1185
|
+
<ScreenHeader
|
|
1186
|
+
text={"Agrega tu comentarios para enviar el rechazo"}
|
|
1187
|
+
headerType={"input-name-header"}
|
|
1188
|
+
color={"white"}
|
|
1189
|
+
/>,
|
|
1190
|
+
<TagAndInput
|
|
1191
|
+
label={"Caja de Comentario"}
|
|
1192
|
+
inputType={"textarea"}
|
|
1193
|
+
inputId={"modal-commentary-box"}
|
|
1194
|
+
index={0}
|
|
1195
|
+
color={"white"}
|
|
1196
|
+
/>,
|
|
1197
|
+
<Button
|
|
1198
|
+
buttonType={"general-default-button"}
|
|
1199
|
+
label={"Enviar comentario"}
|
|
1200
|
+
onClick={(e) =>
|
|
1201
|
+
createComment(
|
|
1202
|
+
e,
|
|
1203
|
+
document.querySelector(
|
|
1204
|
+
"#modal-commentary-box .ql-container .ql-editor > p"
|
|
1205
|
+
).innerHTML,
|
|
1206
|
+
activeTab
|
|
1207
|
+
)
|
|
1208
|
+
}
|
|
1209
|
+
/>,
|
|
1210
|
+
]);
|
|
1179
1211
|
}}
|
|
1180
1212
|
showValidationButtons={
|
|
1181
1213
|
approveRejectButtons() && (auditorAssigned() || userAssigned())
|
|
@@ -1309,7 +1341,7 @@ export const RetailerProductEdition = ({
|
|
|
1309
1341
|
createComment(
|
|
1310
1342
|
e,
|
|
1311
1343
|
document.querySelector(
|
|
1312
|
-
"#
|
|
1344
|
+
"#commentary-box .ql-container .ql-editor > p"
|
|
1313
1345
|
).innerHTML,
|
|
1314
1346
|
activeTab
|
|
1315
1347
|
)
|