contentoh-components-library 21.1.47 → 21.1.48
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/StatusTag/index.js +2 -17
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/index.js +1 -1
- package/package.json +1 -1
- package/src/components/atoms/StatusTag/index.js +27 -0
- package/src/components/atoms/StatusTag/styles.js +76 -0
- package/src/components/pages/RetailerProductEdition/index.js +3 -3
|
@@ -18,27 +18,12 @@ var StatusTag = function StatusTag(_ref) {
|
|
|
18
18
|
case "COMPLETED":
|
|
19
19
|
return "C";
|
|
20
20
|
|
|
21
|
-
case "RECEPTION":
|
|
22
|
-
return "Pr";
|
|
23
|
-
|
|
24
21
|
case "NULL":
|
|
25
|
-
return "
|
|
26
|
-
|
|
27
|
-
case "RECEIVED":
|
|
28
|
-
return "Rc";
|
|
29
|
-
|
|
30
|
-
case "IN_PROGRESS":
|
|
31
|
-
return "P";
|
|
32
|
-
|
|
33
|
-
case "ASSIGNED":
|
|
34
|
-
return "As";
|
|
22
|
+
return "--";
|
|
35
23
|
|
|
36
24
|
case "APPROVED":
|
|
37
25
|
return "Ap";
|
|
38
26
|
|
|
39
|
-
case "VALIDATING":
|
|
40
|
-
return "V";
|
|
41
|
-
|
|
42
27
|
case "PAID_OUT":
|
|
43
28
|
return "Po";
|
|
44
29
|
|
|
@@ -48,7 +33,7 @@ var StatusTag = function StatusTag(_ref) {
|
|
|
48
33
|
};
|
|
49
34
|
|
|
50
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
51
|
-
className: "status-".concat(getShortStatus(statusType), " ").concat(ovalForm && "oval-form"),
|
|
36
|
+
className: "status-".concat(getShortStatus(statusType === null || statusType === void 0 ? void 0 : statusType.replace(/\/.*/, "")), " ").concat(ovalForm && "oval-form"),
|
|
52
37
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
53
38
|
children: getShortStatus(statusType)
|
|
54
39
|
})
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n padding: 0 10px;\n height: 20px;\n background-color: ", ";\n border-radius: 3px;\n\n p {\n text-align: center;\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 20px;\n }\n\n &.status-
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n padding: 0 10px;\n height: 20px;\n background-color: ", ";\n border-radius: 3px;\n\n p {\n text-align: center;\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 20px;\n }\n\n &.status-AS,\n &.status-CA,\n &.status-IE {\n background-color: ", ";\n }\n\n &.status-R {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-ACA,\n &.status-AC {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RC,\n &.status-RP,\n &.status-RCA {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n\n &.oval-form {\n border-radius: 10px;\n }\n &.delThis {\n color: red;\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.white, _variables.FontFamily.Lato, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -1666,7 +1666,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1666
1666
|
|
|
1667
1667
|
return (product === null || product === void 0 ? void 0 : (_product$services = product.services) === null || _product$services === void 0 ? void 0 : _product$services.images) === 1 && updateImages();
|
|
1668
1668
|
},
|
|
1669
|
-
showSaveButton:
|
|
1669
|
+
showSaveButton: userAssigned()
|
|
1670
1670
|
})]
|
|
1671
1671
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1672
1672
|
className: "product-information",
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
|
|
3
|
+
export const StatusTag = ({ statusType, ovalForm }) => {
|
|
4
|
+
const getShortStatus = (status) => {
|
|
5
|
+
switch (status) {
|
|
6
|
+
case "COMPLETED":
|
|
7
|
+
return "C";
|
|
8
|
+
case "NULL":
|
|
9
|
+
return "--";
|
|
10
|
+
case "APPROVED":
|
|
11
|
+
return "Ap";
|
|
12
|
+
case "PAID_OUT":
|
|
13
|
+
return "Po";
|
|
14
|
+
default:
|
|
15
|
+
return status;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return (
|
|
19
|
+
<Container
|
|
20
|
+
className={`status-${getShortStatus(statusType?.replace(/\/.*/, ""))} ${
|
|
21
|
+
ovalForm && "oval-form"
|
|
22
|
+
}`}
|
|
23
|
+
>
|
|
24
|
+
<p>{getShortStatus(statusType)}</p>
|
|
25
|
+
</Container>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
width: fit-content;
|
|
6
|
+
padding: 0 10px;
|
|
7
|
+
height: 20px;
|
|
8
|
+
background-color: ${GlobalColors.s3};
|
|
9
|
+
border-radius: 3px;
|
|
10
|
+
|
|
11
|
+
p {
|
|
12
|
+
text-align: center;
|
|
13
|
+
color: ${GlobalColors.white};
|
|
14
|
+
font-family: ${FontFamily.Lato};
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
line-height: 20px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.status-AS,
|
|
20
|
+
&.status-CA,
|
|
21
|
+
&.status-IE {
|
|
22
|
+
background-color: ${GlobalColors.in_progress};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.status-R {
|
|
26
|
+
background-color: ${GlobalColors.reception};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.status-AA,
|
|
30
|
+
&.status-AP,
|
|
31
|
+
&.status-ACA,
|
|
32
|
+
&.status-AC {
|
|
33
|
+
background-color: ${GlobalColors.finished};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.status-RA,
|
|
37
|
+
&.status-RC,
|
|
38
|
+
&.status-RP,
|
|
39
|
+
&.status-RCA {
|
|
40
|
+
background-color: ${GlobalColors.rejected_status};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.status-Dat,
|
|
44
|
+
&.status-Dsc,
|
|
45
|
+
&.status-Imgs {
|
|
46
|
+
background-color: ${GlobalColors.s4};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.status-Ex {
|
|
50
|
+
background-color: ${GlobalColors.exported};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.status-DDI {
|
|
54
|
+
background-color: ${GlobalColors.original_purpura};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.status-GLD {
|
|
58
|
+
background-color: ${GlobalColors.in_progress};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.status-TAB {
|
|
62
|
+
background-color: ${GlobalColors.deep_gray};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.status-Pt {
|
|
66
|
+
background-color: ${GlobalColors.s2};
|
|
67
|
+
color: ${GlobalColors.s4};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.oval-form {
|
|
71
|
+
border-radius: 10px;
|
|
72
|
+
}
|
|
73
|
+
&.delThis {
|
|
74
|
+
color: red;
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
@@ -778,7 +778,7 @@ export const RetailerProductEdition = ({
|
|
|
778
778
|
const data = {
|
|
779
779
|
articleId: product?.article?.id_article,
|
|
780
780
|
orderId: product?.orderId,
|
|
781
|
-
message: body?.replace(/<.*?\/?>/gm,
|
|
781
|
+
message: body?.replace(/<.*?\/?>/gm,""),
|
|
782
782
|
concept: concept,
|
|
783
783
|
version: version,
|
|
784
784
|
};
|
|
@@ -1134,7 +1134,7 @@ export const RetailerProductEdition = ({
|
|
|
1134
1134
|
onClickSave={() =>
|
|
1135
1135
|
product?.services?.images === 1 && updateImages()
|
|
1136
1136
|
}
|
|
1137
|
-
showSaveButton={
|
|
1137
|
+
showSaveButton={userAssigned()}
|
|
1138
1138
|
/>
|
|
1139
1139
|
</div>
|
|
1140
1140
|
<div className="product-information">
|
|
@@ -1364,7 +1364,7 @@ export const RetailerProductEdition = ({
|
|
|
1364
1364
|
) : (
|
|
1365
1365
|
<div className="feedback-box">
|
|
1366
1366
|
<Commentary
|
|
1367
|
-
comment={comment?.message?.replace(/<.*?\/?>/gm,
|
|
1367
|
+
comment={comment?.message?.replace(/<.*?\/?>/gm,"")}
|
|
1368
1368
|
reviewed={crossComment}
|
|
1369
1369
|
/>
|
|
1370
1370
|
<Button
|