contentoh-components-library 9.0.0 → 12.0.0
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/.env.development +12 -10
- package/.env.production +2 -0
- package/dist/components/atoms/ActivedFilter/ActivedFilter.stories.js +7 -1
- package/dist/components/atoms/ActivedFilter/index.js +12 -4
- package/dist/components/atoms/AsignationOption/AsignationOptions.stories.js +7 -1
- package/dist/components/atoms/AsignationOption/index.js +29 -22
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/AtomList/AtomList.stories.js +7 -1
- package/dist/components/atoms/AtomList/index.js +14 -9
- package/dist/components/atoms/Avatar/AsignationImage.stories.js +7 -1
- package/dist/components/atoms/Avatar/index.js +11 -8
- package/dist/components/atoms/Card/Card.stories.js +7 -1
- package/dist/components/atoms/Card/index.js +8 -4
- package/dist/components/atoms/CheckBox/CheckBox.stories.js +7 -1
- package/dist/components/atoms/CheckBox/index.js +16 -12
- package/dist/components/atoms/Commentary/index.js +10 -2
- package/dist/components/atoms/Commentary/styles.js +4 -1
- package/dist/components/atoms/CustomerTypeImage/CustomerTypeImage.stories.js +7 -1
- package/dist/components/atoms/CustomerTypeImage/index.js +8 -6
- package/dist/components/atoms/DropDownButton/DropDownButton.stories.js +7 -1
- package/dist/components/atoms/DropDownButton/index.js +9 -6
- package/dist/components/atoms/EditField/EditField.stories.js +7 -1
- package/dist/components/atoms/EditField/index.js +17 -10
- package/dist/components/atoms/FeatureTag/FeatureTag.stories.js +7 -1
- package/dist/components/atoms/FeatureTag/index.js +11 -5
- package/dist/components/atoms/GeneralButton/GeneralButton.stories.js +7 -1
- package/dist/components/atoms/GeneralButton/index.js +13 -7
- package/dist/components/atoms/GeneralInput/GeneralInput.stories.js +7 -1
- package/dist/components/atoms/GeneralInput/index.js +23 -20
- package/dist/components/atoms/GeneralTextBox/GeneralTextBox.stories.js +7 -1
- package/dist/components/atoms/GeneralTextBox/index.js +12 -7
- package/dist/components/atoms/GenericModal/GenericModal.stories.js +46 -59
- package/dist/components/atoms/GenericModal/index.js +12 -7
- package/dist/components/atoms/GradientPanel/GradientPanel.stories.js +85 -80
- package/dist/components/atoms/GradientPanel/index.js +11 -7
- package/dist/components/atoms/Graphic/Graphic.stories.js +7 -1
- package/dist/components/atoms/Graphic/index.js +9 -5
- package/dist/components/atoms/Input/index.js +14 -7
- package/dist/components/atoms/LabelToInput/index.js +19 -13
- package/dist/components/atoms/LoadImageMenu/LoadImageMenu.stories.js +7 -1
- package/dist/components/atoms/LoadImageMenu/index.js +33 -22
- package/dist/components/atoms/LogoImage/LogoImage.stories.js +7 -1
- package/dist/components/atoms/LogoImage/index.js +8 -6
- package/dist/components/atoms/MenuNotification/MenuNotification.stories.js +7 -1
- package/dist/components/atoms/MenuNotification/index.js +21 -15
- package/dist/components/atoms/MenuProfile/MenuProfile.stories.js +7 -1
- package/dist/components/atoms/MenuProfile/index.js +25 -15
- package/dist/components/atoms/Notification/Notification.stories.js +5 -1
- package/dist/components/atoms/Notification/index.js +15 -9
- package/dist/components/atoms/Percent/Percent.stories.js +7 -1
- package/dist/components/atoms/Percent/index.js +21 -14
- package/dist/components/atoms/PriorityFlag/PriorityFlag.stories.js +7 -1
- package/dist/components/atoms/PriorityFlag/index.js +8 -4
- package/dist/components/atoms/ProductImage/ProductImage.stories.js +7 -1
- package/dist/components/atoms/ProductImage/index.js +11 -8
- package/dist/components/atoms/ProgressBar/ProgressBar.stories.js +7 -1
- package/dist/components/atoms/ProgressBar/index.js +8 -3
- package/dist/components/atoms/ScreenHeader/ScreenHeader.stories.js +7 -1
- package/dist/components/atoms/ScreenHeader/index.js +9 -3
- package/dist/components/atoms/Select/index.js +25 -20
- package/dist/components/atoms/SideMenuButton/SideMenuButton.stories.js +5 -1
- package/dist/components/atoms/SideMenuButton/index.js +10 -4
- package/dist/components/atoms/StatusTag/StatusTag.stories.js +7 -1
- package/dist/components/atoms/StatusTag/index.js +8 -3
- package/dist/components/atoms/TabSection/TabSection.stories.js +7 -1
- package/dist/components/atoms/TabSection/index.js +8 -3
- package/dist/components/atoms/ValidationPanel/ValidationPanel.stories.js +7 -1
- package/dist/components/atoms/ValidationPanel/index.js +39 -27
- package/dist/components/molecules/AddProvidersAndProducts/AddProvidersAndProducts.stories.js +5 -1
- package/dist/components/molecules/AddProvidersAndProducts/index.js +18 -12
- package/dist/components/molecules/AssignedWork/AssignedWork.stories.js +5 -1
- package/dist/components/molecules/AssignedWork/index.js +36 -30
- package/dist/components/molecules/AvatarAndValidation/AvatarAndValidation.stories.js +7 -1
- package/dist/components/molecules/AvatarAndValidation/index.js +22 -17
- package/dist/components/molecules/EditionActiveImage/EditionActiveImage.stories.js +7 -1
- package/dist/components/molecules/EditionActiveImage/index.js +14 -10
- package/dist/components/molecules/FeaturesBar/FeaturesBar.stories.js +7 -1
- package/dist/components/molecules/FeaturesBar/index.js +11 -9
- package/dist/components/molecules/GalleryElement/GalleryElement.stories.js +7 -1
- package/dist/components/molecules/GalleryElement/index.js +69 -55
- package/dist/components/molecules/GalleryHeader/GalleryHeader.stories.js +7 -1
- package/dist/components/molecules/GalleryHeader/index.js +28 -15
- package/dist/components/molecules/HeaderTop/HeaderTop.stories.js +7 -1
- package/dist/components/molecules/HeaderTop/index.js +10 -7
- package/dist/components/molecules/ImageSelector/ImageSelector.stories.js +7 -1
- package/dist/components/molecules/ImageSelector/index.js +15 -13
- package/dist/components/molecules/ParentComponent/ParentComponent.stories.js +10 -2
- package/dist/components/molecules/ParentComponent/index.js +9 -5
- package/dist/components/molecules/PayMethod/PayMethod.stories.js +7 -1
- package/dist/components/molecules/PayMethod/index.js +38 -33
- package/dist/components/molecules/PlanSelection/PlanSelection.stories.js +7 -1
- package/dist/components/molecules/PlanSelection/index.js +14 -11
- package/dist/components/molecules/ProductNameHeader/ProductNameHeader.stories.js +7 -1
- package/dist/components/molecules/ProductNameHeader/index.js +18 -14
- package/dist/components/molecules/ProductNotification/ProductNotification.stories.js +7 -1
- package/dist/components/molecules/ProductNotification/index.js +12 -9
- package/dist/components/molecules/ProfileHeader/ProfileHeader.stories.js +5 -1
- package/dist/components/molecules/ProfileHeader/index.js +21 -15
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +7 -1
- package/dist/components/molecules/RetailerSelector/index.js +27 -24
- package/dist/components/molecules/SidebarNotification/SidebarNotification.stories.js +5 -1
- package/dist/components/molecules/SidebarNotification/index.js +43 -37
- package/dist/components/molecules/StatusAsignationInfo/StatusAsignationInfo.stories.js +7 -1
- package/dist/components/molecules/StatusAsignationInfo/index.js +115 -88
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/TableHeader.stories.js +7 -1
- package/dist/components/molecules/TableHeader/index.js +17 -9
- package/dist/components/molecules/TableRow/TableRow.stories.js +7 -1
- package/dist/components/molecules/TableRow/index.js +11 -7
- package/dist/components/molecules/TabsMenu/TabsMenu.stories.js +7 -1
- package/dist/components/molecules/TabsMenu/index.js +13 -10
- package/dist/components/molecules/TagAndInput/TagAndInput.stories.js +7 -1
- package/dist/components/molecules/TagAndInput/index.js +24 -22
- package/dist/components/organisms/FullProductNameHeader/FullProductNameHeader.stories.js +7 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +35 -30
- package/dist/components/organisms/FullTabsMenu/FullTabsMenu.stories.js +7 -1
- package/dist/components/organisms/FullTabsMenu/index.js +26 -19
- package/dist/components/organisms/Fullplan/FullPlan.stories.js +7 -1
- package/dist/components/organisms/Fullplan/index.js +23 -15
- package/dist/components/organisms/ImageDataTable/ImageDataTable.stories.js +7 -1
- package/dist/components/organisms/ImageDataTable/index.js +79 -62
- package/dist/components/organisms/ImagePreviewer/ImagePreviewer.stories.js +7 -1
- package/dist/components/organisms/ImagePreviewer/index.js +12 -8
- package/dist/components/organisms/ImagesGroup/index.js +5 -1
- package/dist/components/organisms/InputGroup/InputGroup.stories.js +7 -1
- package/dist/components/organisms/InputGroup/index.js +39 -37
- package/dist/components/organisms/ProductImageModal/ProductImageModal.stories.js +7 -1
- package/dist/components/organisms/ProductImageModal/index.js +49 -43
- package/dist/components/pages/CustomerLogin/CustomerLogin.stories.js +52 -47
- package/dist/components/pages/CustomerLogin/index.js +18 -12
- package/dist/components/pages/CustomerPayMethod/CustomerPayMethod.stories.js +36 -28
- package/dist/components/pages/CustomerPayMethod/index.js +18 -12
- package/dist/components/pages/CustomerType/CustomerType.stories.js +21 -22
- package/dist/components/pages/CustomerType/index.js +18 -12
- package/dist/components/pages/OnboardPlan/OnboardPlan.stories.js +12 -9
- package/dist/components/pages/OnboardPlan/index.js +18 -12
- package/dist/components/pages/RetailerPlan/RetailerPlan.stories.js +13 -10
- package/dist/components/pages/RetailerPlan/index.js +18 -12
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +8 -1
- package/dist/components/pages/RetailerProductEdition/index.js +538 -244
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +51 -4
- package/package.json +8 -1
- package/src/components/atoms/AsignationOption/index.js +1 -1
- package/src/components/atoms/AsignationOption/styles.js +6 -0
- package/src/components/atoms/Commentary/index.js +2 -2
- package/src/components/atoms/Commentary/styles.js +1 -0
- package/src/components/atoms/GeneralButton/index.js +1 -0
- package/src/components/atoms/GeneralInput/index.js +12 -6
- package/src/components/molecules/StatusAsignationInfo/index.js +38 -24
- package/src/components/molecules/StatusAsignationInfo/styles.js +8 -2
- package/src/components/molecules/TableHeader/index.js +9 -1
- package/src/components/organisms/FullTabsMenu/index.js +6 -3
- package/src/components/organisms/ImageDataTable/index.js +4 -0
- package/src/components/organisms/ProductImageModal/index.js +0 -4
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -0
- package/src/components/pages/RetailerProductEdition/index.js +194 -54
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/global-files/data.js +29 -2
|
@@ -13,7 +13,7 @@ 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 display: flex;\n flex-direction: column;\n height: 100%;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 100%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n height: 100%;\n overflow: auto;\n }\n\n .image-services {\n aside {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n padding: 20px;\n }\n }\n\n .commentary-box {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n padding: 10px;\n padding-left: 0;\n\n .commentary {\n display: flex;\n align-items: flex-end;\n\n .input-container {\n & + * {\n margin-left: 5px;\n }\n }\n\n .buttons-box {\n display: flex;\n max-width: 201px;\n flex-wrap: wrap;\n\n .general-transparent-button {\n & + * {\n margin-top: 5px;\n }\n }\n\n .general-transparent-button,\n .general-green-button {\n width: 201px;\n height: 40px;\n }\n }\n }\n }\n }\n }\n .container {\n width: 100%;\n height: 100%;\n .dropzone {\n height: 100%;\n width: 100%;\n }\n }\n"])), function (_ref) {
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 100%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n height: 100%;\n overflow: auto;\n }\n\n .image-services {\n aside {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n padding: 20px;\n }\n }\n\n .commentary-box {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n padding: 10px;\n padding-left: 0;\n\n .commentary {\n display: flex;\n align-items: flex-end;\n\n .input-container {\n & + * {\n margin-left: 5px;\n }\n }\n\n .buttons-box {\n display: flex;\n max-width: 201px;\n flex-wrap: wrap;\n\n .general-transparent-button {\n & + * {\n margin-top: 5px;\n }\n }\n\n .general-transparent-button,\n .general-green-button {\n width: 201px;\n height: 40px;\n }\n }\n }\n }\n\n .feedback-box {\n display: flex;\n }\n }\n }\n .container {\n width: 100%;\n height: 100%;\n .dropzone {\n height: 100%;\n width: 100%;\n }\n }\n"])), function (_ref) {
|
|
17
17
|
var headerTop = _ref.headerTop;
|
|
18
18
|
return headerTop;
|
|
19
19
|
});
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.getRetailerServices = exports.getProfilePicture = exports.getPercentage = exports.getImage = void 0;
|
|
8
|
+
exports.getRetailerServices = exports.getProfilePicture = exports.getPercentage = exports.getImage = exports.fetchUsers = void 0;
|
|
9
9
|
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
|
|
@@ -33,7 +33,6 @@ var getRetailerServices = /*#__PURE__*/function () {
|
|
|
33
33
|
|
|
34
34
|
case 2:
|
|
35
35
|
responseArray = _context.sent;
|
|
36
|
-
console.log(JSON.parse(responseArray[0].data.body).data);
|
|
37
36
|
datasheets = JSON.parse(responseArray[0].data.body).data;
|
|
38
37
|
descriptions = JSON.parse(responseArray[1].data.body).data;
|
|
39
38
|
images = JSON.parse(responseArray[2].data.body).data;
|
|
@@ -45,7 +44,7 @@ var getRetailerServices = /*#__PURE__*/function () {
|
|
|
45
44
|
});
|
|
46
45
|
return _context.abrupt("return", [datasheets, descriptions, images]);
|
|
47
46
|
|
|
48
|
-
case
|
|
47
|
+
case 8:
|
|
49
48
|
case "end":
|
|
50
49
|
return _context.stop();
|
|
51
50
|
}
|
|
@@ -216,4 +215,52 @@ var getProfilePicture = function getProfilePicture(userId, width, height) {
|
|
|
216
215
|
}
|
|
217
216
|
};
|
|
218
217
|
|
|
219
|
-
exports.getProfilePicture = getProfilePicture;
|
|
218
|
+
exports.getProfilePicture = getProfilePicture;
|
|
219
|
+
|
|
220
|
+
var fetchUsers = /*#__PURE__*/function () {
|
|
221
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(auth) {
|
|
222
|
+
var usersPromises, usersGroups, header, usersResponse;
|
|
223
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
224
|
+
while (1) {
|
|
225
|
+
switch (_context4.prev = _context4.next) {
|
|
226
|
+
case 0:
|
|
227
|
+
usersPromises = [];
|
|
228
|
+
usersGroups = [];
|
|
229
|
+
header = {
|
|
230
|
+
headers: {
|
|
231
|
+
Authorization: auth
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* 7 will fetch all text specialists
|
|
236
|
+
* 8 will fetch all img specialists
|
|
237
|
+
* 4 will fetch all text facilitators
|
|
238
|
+
* 5 will fetch all img facilitators
|
|
239
|
+
* 6 will fetch all auditors
|
|
240
|
+
*/
|
|
241
|
+
|
|
242
|
+
usersPromises.push(_axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=7"), header), _axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=8"), header), _axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=4"), header), _axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=5"), header), _axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=6"), header));
|
|
243
|
+
_context4.next = 6;
|
|
244
|
+
return Promise.all(usersPromises);
|
|
245
|
+
|
|
246
|
+
case 6:
|
|
247
|
+
usersResponse = _context4.sent;
|
|
248
|
+
usersResponse.forEach(function (item, i) {
|
|
249
|
+
usersGroups.push(item.data.data);
|
|
250
|
+
});
|
|
251
|
+
return _context4.abrupt("return", usersGroups);
|
|
252
|
+
|
|
253
|
+
case 9:
|
|
254
|
+
case "end":
|
|
255
|
+
return _context4.stop();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}, _callee4);
|
|
259
|
+
}));
|
|
260
|
+
|
|
261
|
+
return function fetchUsers(_x4) {
|
|
262
|
+
return _ref4.apply(this, arguments);
|
|
263
|
+
};
|
|
264
|
+
}();
|
|
265
|
+
|
|
266
|
+
exports.fetchUsers = fetchUsers;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@babel/runtime": "^7.17.2",
|
|
6
6
|
"@storybook/addon-postcss": "^2.0.0",
|
|
@@ -52,6 +52,13 @@
|
|
|
52
52
|
{
|
|
53
53
|
"absoluteRuntime": false
|
|
54
54
|
}
|
|
55
|
+
],
|
|
56
|
+
"@babel/preset-env",
|
|
57
|
+
[
|
|
58
|
+
"@babel/preset-react",
|
|
59
|
+
{
|
|
60
|
+
"runtime": "automatic"
|
|
61
|
+
}
|
|
55
62
|
]
|
|
56
63
|
]
|
|
57
64
|
},
|
|
@@ -6,6 +6,8 @@ export const Container = styled.div`
|
|
|
6
6
|
width: fit-content;
|
|
7
7
|
align-items: center;
|
|
8
8
|
cursor: pointer;
|
|
9
|
+
border-radius: 3px;
|
|
10
|
+
padding: 5px;
|
|
9
11
|
|
|
10
12
|
.profile-image,
|
|
11
13
|
.medium-image {
|
|
@@ -45,6 +47,10 @@ export const Container = styled.div`
|
|
|
45
47
|
border: none;
|
|
46
48
|
}
|
|
47
49
|
|
|
50
|
+
&:hover {
|
|
51
|
+
background-color: ${GlobalColors.s3};
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
& + * {
|
|
49
55
|
margin-top: 10px;
|
|
50
56
|
}
|
|
@@ -28,16 +28,22 @@ export const GeneralInput = ({
|
|
|
28
28
|
|
|
29
29
|
const onHandleChange = (e) => {
|
|
30
30
|
setTextValue(({ value }) => (value = e.target.value));
|
|
31
|
-
|
|
31
|
+
updatedDatasheets &&
|
|
32
|
+
addTextAreaToArray(
|
|
33
|
+
e.target.value,
|
|
34
|
+
updatedDatasheets,
|
|
35
|
+
setUpdatedDatasheets
|
|
36
|
+
);
|
|
32
37
|
};
|
|
33
38
|
|
|
34
39
|
const onHandleTextAreaChange = (e) => {
|
|
35
40
|
setTextValue(({ value }) => (value = e.target.value));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
updatedDatasheets &&
|
|
42
|
+
addTextAreaToArray(
|
|
43
|
+
e.target.value,
|
|
44
|
+
updatedDescriptions,
|
|
45
|
+
setUpdatedDescriptions
|
|
46
|
+
);
|
|
41
47
|
};
|
|
42
48
|
|
|
43
49
|
useEffect(() => {
|
|
@@ -19,10 +19,13 @@ export const StatusAsignationInfo = ({
|
|
|
19
19
|
saveDescriptions,
|
|
20
20
|
updateImages,
|
|
21
21
|
assignationsImages,
|
|
22
|
+
setAssignation,
|
|
23
|
+
isRetailer,
|
|
22
24
|
id = "default-id",
|
|
23
25
|
}) => {
|
|
24
26
|
const [showAsignationPanel, setShowAsignationPanel] = useState(false);
|
|
25
27
|
const [layout, setLayout] = useState(true);
|
|
28
|
+
const [assignationType, setAssignationType] = useState("facilitator");
|
|
26
29
|
|
|
27
30
|
const closeAsignations = (e) => {
|
|
28
31
|
if (!e.target.closest("#default-id") && showAsignationPanel) {
|
|
@@ -77,14 +80,15 @@ export const StatusAsignationInfo = ({
|
|
|
77
80
|
)}
|
|
78
81
|
<StatusTag statusType={status} ovalForm={true} />
|
|
79
82
|
<div className="assignations-container">
|
|
80
|
-
{assignationsImages?.map((assignation, index) => (
|
|
83
|
+
{assignationsImages?.assignations?.map((assignation, index) => (
|
|
81
84
|
<Avatar
|
|
82
|
-
key={index + "-" + assignation}
|
|
85
|
+
key={index + "-" + assignation.id}
|
|
83
86
|
imageType={"small-image"}
|
|
84
|
-
image={getProfilePicture(assignation, 20, 20)}
|
|
87
|
+
image={getProfilePicture(assignation.id, 20, 20)}
|
|
85
88
|
altText="user profile image"
|
|
86
89
|
onClick={() => {
|
|
87
90
|
setShowAsignationPanel(true);
|
|
91
|
+
setAssignationType(assignation?.collaboratorType);
|
|
88
92
|
}}
|
|
89
93
|
/>
|
|
90
94
|
))}
|
|
@@ -108,31 +112,41 @@ export const StatusAsignationInfo = ({
|
|
|
108
112
|
</div>
|
|
109
113
|
</div>
|
|
110
114
|
<div className="asignations-list">
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
{assignationsImages?.collaborators !== undefined ? (
|
|
116
|
+
assignationsImages?.collaborators[assignationType]?.map(
|
|
117
|
+
(asignation, index) => (
|
|
118
|
+
<AsignationOption
|
|
119
|
+
key={index + "-" + asignation.name}
|
|
120
|
+
profileImage={getProfilePicture(
|
|
121
|
+
asignation?.id_user,
|
|
122
|
+
40,
|
|
123
|
+
40
|
|
124
|
+
)}
|
|
125
|
+
onClick={() => {
|
|
126
|
+
setAssignation(assignationType, asignation?.id_user);
|
|
127
|
+
}}
|
|
128
|
+
name={asignation.name}
|
|
129
|
+
/>
|
|
130
|
+
)
|
|
131
|
+
)
|
|
120
132
|
) : (
|
|
121
133
|
<p className="no-asignations">Sin personas para asignar</p>
|
|
122
134
|
)}
|
|
123
135
|
</div>
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
{isRetailer === 0 && (
|
|
137
|
+
<div className="default-asignations-list">
|
|
138
|
+
<AsignationOption
|
|
139
|
+
asignationType={"provider"}
|
|
140
|
+
name={"Solicitar a"}
|
|
141
|
+
team={"Proveedor"}
|
|
142
|
+
/>
|
|
143
|
+
<AsignationOption
|
|
144
|
+
asignationType={"team"}
|
|
145
|
+
name={"Solicitar a"}
|
|
146
|
+
team={"Content-oh!"}
|
|
147
|
+
/>
|
|
148
|
+
</div>
|
|
149
|
+
)}
|
|
136
150
|
</div>
|
|
137
151
|
)}
|
|
138
152
|
</Container>
|
|
@@ -18,6 +18,7 @@ export const Container = styled.div`
|
|
|
18
18
|
|
|
19
19
|
.assignations-container {
|
|
20
20
|
display: flex;
|
|
21
|
+
cursor: pointer;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
.asignation-panel {
|
|
@@ -26,10 +27,11 @@ export const Container = styled.div`
|
|
|
26
27
|
box-sizing: border-box;
|
|
27
28
|
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);
|
|
28
29
|
border-radius: 4px;
|
|
29
|
-
padding: 10px;
|
|
30
|
+
padding: 10px 8px;
|
|
30
31
|
position: absolute;
|
|
31
32
|
top: calc(100% + 10px);
|
|
32
33
|
right: 0;
|
|
34
|
+
z-index: 10;
|
|
33
35
|
|
|
34
36
|
.asignation-header {
|
|
35
37
|
display: flex;
|
|
@@ -57,7 +59,6 @@ export const Container = styled.div`
|
|
|
57
59
|
|
|
58
60
|
.asignations-list {
|
|
59
61
|
min-height: 40px;
|
|
60
|
-
border-bottom: 1px solid ${GlobalColors.s3};
|
|
61
62
|
|
|
62
63
|
.no-asignations {
|
|
63
64
|
padding: 5px;
|
|
@@ -70,7 +71,12 @@ export const Container = styled.div`
|
|
|
70
71
|
|
|
71
72
|
& + * {
|
|
72
73
|
margin-top: 10px;
|
|
74
|
+
border-top: 1px solid ${GlobalColors.s3};
|
|
73
75
|
}
|
|
74
76
|
}
|
|
77
|
+
|
|
78
|
+
.default-asignations-list {
|
|
79
|
+
padding-top: 10px;
|
|
80
|
+
}
|
|
75
81
|
}
|
|
76
82
|
`;
|
|
@@ -3,7 +3,13 @@ import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
|
3
3
|
import { StatusAsignationInfo } from "../StatusAsignationInfo";
|
|
4
4
|
import { GlobalColors } from "../../../global-files/variables";
|
|
5
5
|
|
|
6
|
-
export const TableHeader = ({
|
|
6
|
+
export const TableHeader = ({
|
|
7
|
+
imagesStatus,
|
|
8
|
+
activeImage,
|
|
9
|
+
assignationsImages,
|
|
10
|
+
setAssignation,
|
|
11
|
+
isRetailer,
|
|
12
|
+
}) => {
|
|
7
13
|
return (
|
|
8
14
|
<Container>
|
|
9
15
|
<ScreenHeader
|
|
@@ -14,6 +20,8 @@ export const TableHeader = ({ imagesStatus, activeImage, assignationsImages }) =
|
|
|
14
20
|
<StatusAsignationInfo
|
|
15
21
|
status={imagesStatus}
|
|
16
22
|
assignationsImages={assignationsImages}
|
|
23
|
+
setAssignation={setAssignation}
|
|
24
|
+
isRetailer={isRetailer}
|
|
17
25
|
/>
|
|
18
26
|
</Container>
|
|
19
27
|
);
|
|
@@ -13,10 +13,11 @@ export const FullTabsMenu = ({
|
|
|
13
13
|
saveDatasheets,
|
|
14
14
|
saveDescriptions,
|
|
15
15
|
updateImages,
|
|
16
|
-
|
|
16
|
+
assig,
|
|
17
|
+
setAssignation,
|
|
18
|
+
isRetailer,
|
|
17
19
|
}) => {
|
|
18
20
|
const [imagesSection, setImagesSection] = useState(false);
|
|
19
|
-
//console.log(status);
|
|
20
21
|
|
|
21
22
|
return (
|
|
22
23
|
<Container>
|
|
@@ -34,7 +35,9 @@ export const FullTabsMenu = ({
|
|
|
34
35
|
saveDatasheets={saveDatasheets}
|
|
35
36
|
saveDescriptions={saveDescriptions}
|
|
36
37
|
updateImages={updateImages}
|
|
37
|
-
assignationsImages={
|
|
38
|
+
assignationsImages={assig}
|
|
39
|
+
setAssignation={setAssignation}
|
|
40
|
+
isRetailer={isRetailer}
|
|
38
41
|
/>
|
|
39
42
|
</Container>
|
|
40
43
|
);
|
|
@@ -12,6 +12,8 @@ export const ImageDataTable = ({
|
|
|
12
12
|
setImages,
|
|
13
13
|
assignationsImages,
|
|
14
14
|
imagesStatus,
|
|
15
|
+
setAssignation,
|
|
16
|
+
isRetailer,
|
|
15
17
|
}) => {
|
|
16
18
|
return (
|
|
17
19
|
<Container darkMode={darkMode}>
|
|
@@ -19,6 +21,8 @@ export const ImageDataTable = ({
|
|
|
19
21
|
imagesStatus={imagesStatus}
|
|
20
22
|
activeImage={activeImage}
|
|
21
23
|
assignationsImages={assignationsImages}
|
|
24
|
+
setAssignation={setAssignation}
|
|
25
|
+
isRetailer={isRetailer}
|
|
22
26
|
/>
|
|
23
27
|
<Row>
|
|
24
28
|
<ScreenHeader headerType={"table-row-text"} text="Tipo de toma" />
|
|
@@ -43,6 +43,8 @@ RetailerProductEditionDefault.args = {
|
|
|
43
43
|
"Ficha técnica": false,
|
|
44
44
|
Imágenes: false,
|
|
45
45
|
},
|
|
46
|
+
token:
|
|
47
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJjOTRhNzMwNS05MzY1LTQ2ZmYtYTQyMy00YjRiYzNiOGIxODAiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiYzk0YTczMDUtOTM2NS00NmZmLWE0MjMtNGI0YmMzYjhiMTgwIiwiY29nbml0bzpyb2xlcyI6WyJhcm46YXdzOmlhbTo6ODk4NjcwMjMyODA3OnJvbGVcL2NvbnRlbnRvaC1kZXYtdXMtZWFzdC0xLWxhbWJkYVJvbGUiXSwiYXVkIjoiNWFjOHRwZ3M2Z2JzcTEzZnJ2cnBpZWVwNDAiLCJldmVudF9pZCI6IjU2M2I0NTFlLTVhZDQtNGMzNy1iNjIzLTc3NjMwM2Y3YjJiNSIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjQ4NzYwODcwLCJuYW1lIjoiQ29sYWJvcmFkb3IiLCJwaG9uZV9udW1iZXIiOiIrNTIxMTExIiwiZXhwIjoxNjQ4NzY0NDcwLCJpYXQiOjE2NDg3NjA4NzAsImVtYWlsIjoic2FsbWVyb24uNUBob3RtYWlsLmNvbSJ9.Y2gmN-9KDeYyvvSJOzKJUP-WL8O4AmZhdLnfHxSB_9lAXQFns6uJUbX1nzE75cuqeQ3NeiNZy4hu8y5Y7hckPuQFy01nY3OoY3SfD06W0SciNz0txNSR7oN6KH_c_9FOwQiQ0mnOs9udo9nDM4faFFUuu9UD6RMVfeLW1gfZmtyc3lfmy6YO6feJcS3opSSQpXH4Mgh415fXFjbyz344ssd5nl7Onyh8jq5i-LAex3OPXhKzjrBnDRpGg3BQPIfpsquGZNKBiWqyos--CuohFBeyevMLGoKOcU-Ga-zIdEfonTtDVRe6CQLgOZJ2xTPdswlzRPby1gFoZjNebeeRVw",
|
|
46
48
|
articleId: 238,
|
|
47
49
|
category: 846,
|
|
48
50
|
version: 2,
|