contentoh-components-library 21.2.102 → 21.2.104
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 +2 -5
- package/.env.production +25 -25
- package/dist/components/atoms/GeneralButton/index.js +6 -2
- package/dist/components/atoms/Select/VersionSelect.js +2 -1
- package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
- package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
- package/dist/components/molecules/HeaderTop/index.js +5 -10
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/organisms/CreateVersion/RenderChilds.js +11 -11
- package/dist/components/organisms/CreateVersion/index.js +30 -89
- package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/dist/components/organisms/OrderDetail/index.js +20 -11
- package/dist/components/organisms/OrderDetail/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/utils.js +45 -15
- package/dist/components/organisms/VersionSelector/index.js +28 -2
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +69 -147
- package/dist/components/pages/ProviderProductEdition/index.js +2 -22
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +77 -67
- package/dist/components/pages/RetailerProductEdition/index.js +5 -24
- package/dist/global-files/fonts.css +0 -12
- package/dist/global-files/variables.js +0 -2
- package/dist/index.js +46 -254
- package/package.json +1 -12
- package/src/components/atoms/GeneralButton/index.js +4 -1
- package/src/components/atoms/Select/VersionSelect.js +4 -2
- package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
- package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
- package/src/components/molecules/HeaderTop/index.js +6 -11
- package/src/components/molecules/HeaderTop/styles.js +0 -4
- package/src/components/organisms/CreateVersion/RenderChilds.js +28 -34
- package/src/components/organisms/CreateVersion/index.js +16 -36
- package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/src/components/organisms/OrderDetail/index.js +19 -12
- package/src/components/organisms/OrderDetail/styles.js +1 -0
- package/src/components/organisms/OrderDetail/utils/Table/styles.js +30 -0
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +30 -15
- package/src/components/organisms/VersionSelector/index.js +18 -3
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +75 -166
- package/src/components/pages/ProviderProductEdition/index.js +2 -21
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +79 -67
- package/src/components/pages/RetailerProductEdition/index.js +2 -14
- package/src/global-files/customHooks.js +2 -2
- package/src/global-files/fonts.css +0 -12
- package/src/global-files/variables.js +0 -2
- package/src/index.js +0 -16
- package/dist/assets/images/customSelect/starIcon.svg +0 -14
- package/dist/assets/images/defaultImages/Spinner.gif +0 -0
- package/dist/assets/images/defaultImages/notFound.svg +0 -124
- package/dist/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -72
- package/dist/components/atoms/ButtonFileChooser/index.js +0 -118
- package/dist/components/atoms/ButtonFileChooser/styles.js +0 -20
- package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +0 -66
- package/dist/components/atoms/ButtonV2/index.js +0 -111
- package/dist/components/atoms/ButtonV2/styles.js +0 -53
- package/dist/components/atoms/CustomIcon/CustomIcon.stories.js +0 -50
- package/dist/components/atoms/CustomIcon/index.js +0 -40
- package/dist/components/atoms/CustomIcon/styles.js +0 -33
- package/dist/components/atoms/IconFile/IconFile.stories.js +0 -48
- package/dist/components/atoms/IconFile/index.js +0 -249
- package/dist/components/atoms/IconFile/styles.js +0 -23
- package/dist/components/atoms/Image/Image.stories.js +0 -73
- package/dist/components/atoms/Image/index.js +0 -76
- package/dist/components/atoms/Image/styles.js +0 -43
- package/dist/components/atoms/ImageLink/ImageLink.stories.js +0 -63
- package/dist/components/atoms/ImageLink/index.js +0 -77
- package/dist/components/atoms/ImageLink/styles.js +0 -40
- package/dist/components/atoms/ImagePreview/ImagePreview.stories.js +0 -70
- package/dist/components/atoms/ImagePreview/index.js +0 -222
- package/dist/components/atoms/ImagePreview/styles.js +0 -44
- package/dist/components/atoms/InputText/InputText.stories.js +0 -60
- package/dist/components/atoms/InputText/index.js +0 -66
- package/dist/components/atoms/InputText/styles.js +0 -32
- package/dist/components/atoms/NotFound/NotFound.stories.js +0 -36
- package/dist/components/atoms/NotFound/index.js +0 -75
- package/dist/components/atoms/NotFound/styles.js +0 -20
- package/dist/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -45
- package/dist/components/atoms/SelectItemV2/index.js +0 -46
- package/dist/components/atoms/SelectItemV2/styles.js +0 -23
- package/dist/components/atoms/Tooltip/Tooltip.stories.js +0 -66
- package/dist/components/atoms/Tooltip/index.js +0 -72
- package/dist/components/atoms/Tooltip/styles.js +0 -20
- package/dist/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -66
- package/dist/components/molecules/ButtonDownloadFile/index.js +0 -179
- package/dist/components/molecules/ButtonDownloadFile/styles.js +0 -23
- package/dist/components/molecules/Dropdown/Dropdown.stories.js +0 -96
- package/dist/components/molecules/Dropdown/index.js +0 -148
- package/dist/components/molecules/Dropdown/styles.js +0 -26
- package/dist/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -72
- package/dist/components/molecules/ImageTooltip/index.js +0 -84
- package/dist/components/molecules/ImageTooltip/styles.js +0 -33
- package/dist/components/molecules/SelectV2/SelectV2.stories.js +0 -119
- package/dist/components/molecules/SelectV2/index.js +0 -298
- package/dist/components/molecules/SelectV2/styles.js +0 -42
- package/dist/components/organisms/Chat/Chat.stories.js +0 -215
- package/dist/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -83
- package/dist/components/organisms/Chat/ChatLists/index.js +0 -160
- package/dist/components/organisms/Chat/ChatLists/styles.js +0 -29
- package/dist/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -176
- package/dist/components/organisms/Chat/ContainerItems/index.js +0 -569
- package/dist/components/organisms/Chat/ContainerItems/styles.js +0 -20
- package/dist/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -142
- package/dist/components/organisms/Chat/ContentChat/index.js +0 -1422
- package/dist/components/organisms/Chat/ContentChat/styles.js +0 -20
- package/dist/components/organisms/Chat/Footer/Footer.stories.js +0 -43
- package/dist/components/organisms/Chat/Footer/index.js +0 -984
- package/dist/components/organisms/Chat/Footer/styles.js +0 -32
- package/dist/components/organisms/Chat/Header/Header.stories.js +0 -96
- package/dist/components/organisms/Chat/Header/index.js +0 -84
- package/dist/components/organisms/Chat/Header/styles.js +0 -20
- package/dist/components/organisms/Chat/index.js +0 -327
- package/dist/components/organisms/Chat/styles.js +0 -29
- package/dist/components/organisms/Modal/Modal.stories.js +0 -66
- package/dist/components/organisms/Modal/index.js +0 -95
- package/dist/components/organisms/Modal/styles.js +0 -20
- package/dist/global-files/handle_http.js +0 -383
- package/dist/global-files/utils.js +0 -472
- package/src/assets/images/customSelect/starIcon.svg +0 -14
- package/src/assets/images/defaultImages/Spinner.gif +0 -0
- package/src/assets/images/defaultImages/notFound.svg +0 -124
- package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
- package/src/components/atoms/ButtonFileChooser/index.js +0 -69
- package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -51
- package/src/components/atoms/ButtonV2/index.js +0 -79
- package/src/components/atoms/ButtonV2/styles.js +0 -195
- package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
- package/src/components/atoms/CustomIcon/index.js +0 -41
- package/src/components/atoms/CustomIcon/styles.js +0 -85
- package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
- package/src/components/atoms/IconFile/index.js +0 -119
- package/src/components/atoms/IconFile/styles.js +0 -67
- package/src/components/atoms/Image/Image.stories.js +0 -51
- package/src/components/atoms/Image/index.js +0 -55
- package/src/components/atoms/Image/styles.js +0 -34
- package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
- package/src/components/atoms/ImageLink/index.js +0 -57
- package/src/components/atoms/ImageLink/styles.js +0 -30
- package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
- package/src/components/atoms/ImagePreview/index.js +0 -191
- package/src/components/atoms/ImagePreview/styles.js +0 -77
- package/src/components/atoms/InputText/InputText.stories.js +0 -39
- package/src/components/atoms/InputText/index.js +0 -61
- package/src/components/atoms/InputText/styles.js +0 -89
- package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
- package/src/components/atoms/NotFound/index.js +0 -52
- package/src/components/atoms/NotFound/styles.js +0 -55
- package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -26
- package/src/components/atoms/SelectItemV2/index.js +0 -45
- package/src/components/atoms/SelectItemV2/styles.js +0 -55
- package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
- package/src/components/atoms/Tooltip/index.js +0 -59
- package/src/components/atoms/Tooltip/styles.js +0 -42
- package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
- package/src/components/molecules/ButtonDownloadFile/index.js +0 -111
- package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
- package/src/components/molecules/Dropdown/Dropdown.stories.js +0 -101
- package/src/components/molecules/Dropdown/index.js +0 -142
- package/src/components/molecules/Dropdown/styles.js +0 -75
- package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -46
- package/src/components/molecules/ImageTooltip/index.js +0 -62
- package/src/components/molecules/ImageTooltip/styles.js +0 -18
- package/src/components/molecules/SelectV2/SelectV2.stories.js +0 -114
- package/src/components/molecules/SelectV2/index.js +0 -332
- package/src/components/molecules/SelectV2/styles.js +0 -100
- package/src/components/organisms/Chat/Chat.stories.js +0 -199
- package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
- package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
- package/src/components/organisms/Chat/ChatLists/index.js +0 -141
- package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
- package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
- package/src/components/organisms/Chat/ContainerItems/index.js +0 -549
- package/src/components/organisms/Chat/ContainerItems/styles.js +0 -328
- package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
- package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
- package/src/components/organisms/Chat/ContentChat/index.js +0 -900
- package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
- package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
- package/src/components/organisms/Chat/Footer/index.js +0 -669
- package/src/components/organisms/Chat/Footer/styles.js +0 -286
- package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
- package/src/components/organisms/Chat/Header/index.js +0 -94
- package/src/components/organisms/Chat/Header/styles.js +0 -49
- package/src/components/organisms/Chat/index.js +0 -294
- package/src/components/organisms/Chat/styles.js +0 -42
- package/src/components/organisms/Modal/Modal.stories.js +0 -55
- package/src/components/organisms/Modal/index.js +0 -97
- package/src/components/organisms/Modal/styles.js +0 -103
- package/src/global-files/handle_http.js +0 -231
- package/src/global-files/utils.js +0 -300
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { FontFamily } from "../../../global-files/variables";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
|
|
4
|
-
export const Container = styled.div`
|
|
5
|
-
width: fit-content;
|
|
6
|
-
max-width: ${({ maxWidthSelect }) =>
|
|
7
|
-
maxWidthSelect ? maxWidthSelect : "unset"};
|
|
8
|
-
//border: 1px solid red;
|
|
9
|
-
border-radius: ${({ borderType }) => {
|
|
10
|
-
return borderType?.toLowerCase() === "rectangle"
|
|
11
|
-
? "6px"
|
|
12
|
-
: borderType?.toLowerCase() === "oval"
|
|
13
|
-
? "17px"
|
|
14
|
-
: "0px"; // default none
|
|
15
|
-
}};
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
export const ContainerSelect = styled.div`
|
|
19
|
-
width: 100%;
|
|
20
|
-
border-radius: inherit;
|
|
21
|
-
|
|
22
|
-
.buttonSelect {
|
|
23
|
-
width: 100%;
|
|
24
|
-
border-radius: inherit;
|
|
25
|
-
|
|
26
|
-
.button {
|
|
27
|
-
padding: 10px 16px;
|
|
28
|
-
gap: 10px;
|
|
29
|
-
.icon {
|
|
30
|
-
font-size: 13px;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
+ .MuiTooltip-popper {
|
|
36
|
-
background-color: transparent;
|
|
37
|
-
|
|
38
|
-
.dropdownSelect {
|
|
39
|
-
--background: white;
|
|
40
|
-
box-shadow: 0px 0px 10px 1px gray;
|
|
41
|
-
background-color: var(--background);
|
|
42
|
-
padding: 6px 0px;
|
|
43
|
-
border-radius: 7px;
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
gap: 0px;
|
|
47
|
-
max-width: ${({ maxWidthDropdown }) =>
|
|
48
|
-
maxWidthDropdown ? maxWidthDropdown : "400px"};
|
|
49
|
-
max-height: ${({ maxHeightDropdown }) =>
|
|
50
|
-
maxHeightDropdown ? maxHeightDropdown : "80vh"};
|
|
51
|
-
|
|
52
|
-
.container-inputSearch {
|
|
53
|
-
width: 100%;
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: row;
|
|
56
|
-
flex-wrap: nowrap;
|
|
57
|
-
align-items: center;
|
|
58
|
-
gap: 0px;
|
|
59
|
-
padding: 0px 10px 8px 10px;
|
|
60
|
-
border-bottom: 1px solid #f0f0f0;
|
|
61
|
-
|
|
62
|
-
.inputSearch {
|
|
63
|
-
padding-left: 8px;
|
|
64
|
-
flex-grow: 2;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.selectItemV2 {
|
|
69
|
-
width: 100%;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.container-items {
|
|
73
|
-
flex-grow: 2;
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-direction: column;
|
|
76
|
-
flex-wrap: ${({ alignmentItemsOverflow }) =>
|
|
77
|
-
alignmentItemsOverflow === "columns" ? "wrap" : "nowrap"};
|
|
78
|
-
overflow: auto;
|
|
79
|
-
|
|
80
|
-
.selectItemV2 {
|
|
81
|
-
width: ${({ maxWidthItems }) =>
|
|
82
|
-
maxWidthItems ? maxWidthItems : "100%"};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&[data-popper-placement*="bottom"] .dropdownSelect {
|
|
88
|
-
margin-top: 10px;
|
|
89
|
-
}
|
|
90
|
-
&[data-popper-placement*="top"] .dropdownSelect {
|
|
91
|
-
margin-bottom: 10px;
|
|
92
|
-
}
|
|
93
|
-
&[data-popper-placement*="left"] .dropdownSelect {
|
|
94
|
-
margin-right: 10px;
|
|
95
|
-
}
|
|
96
|
-
&[data-popper-placement*="right"] .dropdownSelect {
|
|
97
|
-
margin-left: 10px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
`;
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { Chat } from "./index";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/organisms/Chat",
|
|
5
|
-
component: Chat,
|
|
6
|
-
argTypes: {
|
|
7
|
-
chatContainerType: {
|
|
8
|
-
options: ["popUp", "fixed"],
|
|
9
|
-
control: { type: "select" },
|
|
10
|
-
},
|
|
11
|
-
chatType: {
|
|
12
|
-
options: ["order_product", "merchant_product", "ticket"],
|
|
13
|
-
control: { type: "select" },
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const Template = (args) => <Chat {...args} />;
|
|
19
|
-
|
|
20
|
-
// ejemplo del chat orderProduct con user CADENA
|
|
21
|
-
export const chatCAD_orderProduct = Template.bind({});
|
|
22
|
-
chatCAD_orderProduct.args = {
|
|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S-VUhIRtAhtUVPUSYv0oP1qfJwFHomerxJvYgJge8SLWPjL6yGBnTxAvHVbuLU8kcaoZup2eNMV6XOIAEBAHeCDm4vW0rYWwfrKADPyYGZQF2si14o3wtgSMX5a4ccxGwikT3to3HttWBhmJs_I1Xr_BvBxePc4WghjQr5GVGbq8vhr4HwdkTmlcJAnQsc_fmIdbJ_ACyTa1wr343KYYOQVwBjAmZDa6rU16y0yTr_J4IVWY3aS5UpBEBHy4XE0c76UaN-_DcGiVl4ayWQIUz8A",
|
|
28
|
-
id: 84311,
|
|
29
|
-
retailerId: 68,
|
|
30
|
-
orderId: 3118,
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// ejemplo del chat orderProduct con user PROVEEDOR
|
|
35
|
-
export const chatPROV_orderProduct = Template.bind({});
|
|
36
|
-
chatPROV_orderProduct.args = {
|
|
37
|
-
chatType: "order_product",
|
|
38
|
-
chatContainerType: "popUp",
|
|
39
|
-
chatData: {
|
|
40
|
-
userToken:
|
|
41
|
-
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZDBjYzVjOC1hODllLTRiZGQtOWUyZC0zNThhMDFjYzlhNjIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiOWQwY2M1YzgtYTg5ZS00YmRkLTllMmQtMzU4YTAxY2M5YTYyIiwiYXVkIjoiNTJkOXNra2RjZzhxanA4OG9vazF1c2U2bWsiLCJldmVudF9pZCI6IjU1NDQ5NzhmLWExMGEtNGE5Ni05M2NkLWY5Y2ZmNTFlNWRlOCIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjY1NjI0MjYyLCJuYW1lIjoiSXNtYWVsIExvcGV6IiwicGhvbmVfbnVtYmVyIjoiKzUyMzExMTM2NjMzNiIsImV4cCI6MTY2NTYyNzg2MiwiaWF0IjoxNjY1NjI0MjYyLCJlbWFpbCI6Imlsb3BlekBjb250ZW50b2guY29tIn0.bIDIv57LRgafkymcUY4DqFRxR91iTBlZ7H7v1o3TnwJpIFPUEvzfvHObDR534xfa-R5ZRz46YCjsV6yQ-2hd8OA97VFLrqyC8Yqx_hjoIA1QxX_5_-b4UWaIib_1wSkrWd2gQtuKAUucfzAisZp1UNiY6Sm4VPGXsc5Lk6kLo1X_rctLUlQMhl5KaMNaSWqvbcYZLz5XSpbJR_MHegkdquKBaQJVKl76TkvDT8Eyr6rPUUAtnRBAPfnP4dW82HgT-aZp-0wUH5fYcb02agPg4-wqVsxPr8WxihATqn9rVfR5CjZWYOGPdSw7AUS33yYAkx5Nmnz4oIcRlPsvF5U62g",
|
|
42
|
-
id: 84311,
|
|
43
|
-
retailerId: 68,
|
|
44
|
-
orderId: 3118,
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// ejemplo del chat orderProduct con user FABRICA 37
|
|
49
|
-
export const chatFAB_orderProduct_user37 = Template.bind({});
|
|
50
|
-
chatFAB_orderProduct_user37.args = {
|
|
51
|
-
chatType: "order_product",
|
|
52
|
-
chatContainerType: "popUp",
|
|
53
|
-
chatData: {
|
|
54
|
-
userToken:
|
|
55
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLC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|
-
retailerId: 68,
|
|
58
|
-
orderId: 3118,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// ejemplo del chat orderProduct con user FABRICA 49
|
|
63
|
-
export const chatFAB_orderProduct_user49 = Template.bind({});
|
|
64
|
-
chatFAB_orderProduct_user49.args = {
|
|
65
|
-
chatType: "order_product",
|
|
66
|
-
chatContainerType: "popUp",
|
|
67
|
-
chatData: {
|
|
68
|
-
userToken:
|
|
69
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxODA1MDQ1Mi0xOGQ0LTQxM2ItYjg2MC1iMWMyMzZmMTM5OWYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjE4MDUwNDUyLTE4ZDQtNDEzYi1iODYwLWIxYzIzNmYxMzk5ZiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJkYmU1ODRmOS0xOTJmLTRkNDEtOWMxMS0xMzRkMDgzODVjMDQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2NTcxNjI3NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2NTcxOTg3NywiaWF0IjoxNjY1NzE2Mjc3LCJlbWFpbCI6Im16dW5pZ2FAY29udGVudG9oLmNvbSJ9.KoPNFy9gZYoYjiCGanSe_MvnuX7rSvNTXqQVffXSzGYeb4R3G6yDWrWItjHfgFmmo1jLlTmLT_yiVC4g9Vpo9WxebPwZA9rFwKDbc3vKeAs1JSUfaatQOwIqS1NsHwEkAM-agsO2s2Rnqq4h-FCcURqjiknbvHXUjcXqSea-3JlxtVFw3x7NLG3bUPqfPyVV1N5jR-XMrDOSZctS2k4WvPqhxf75Iv77U23YNFRoOIUZIAYx8SmSw792h4YwmJqMUuZlo48aBaaZO3NE83KdMR-mYvvoa-TDIE2d9ww-vPctauVL9ydB5ISSB8gUz90o8IZIWjrwQgbzE7eRPKxPWw",
|
|
70
|
-
id: 84311,
|
|
71
|
-
retailerId: 68,
|
|
72
|
-
orderId: 3118,
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// ejemplo del chat merchantProduct con user CADENA
|
|
77
|
-
export const chatCAD_merchantsProduct = Template.bind({});
|
|
78
|
-
chatCAD_merchantsProduct.args = {
|
|
79
|
-
chatType: "merchant_product",
|
|
80
|
-
chatContainerType: "popUp",
|
|
81
|
-
chatData: {
|
|
82
|
-
userToken:
|
|
83
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI2YmI0NzExMi03ZTNiLTRjYzUtYmVhZS02MzMxZjEwYjk3MzIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2NTYxNjI0MSwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjY1NjE5ODQxLCJpYXQiOjE2NjU2MTYyNDEsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.gi1Jiua_O175vHLy-CYXOR945IRcObIj5j1LNk4_EhcKPz-MzPnfWDLH7L3sTiNS-VUhIRtAhtUVPUSYv0oP1qfJwFHomerxJvYgJge8SLWPjL6yGBnTxAvHVbuLU8kcaoZup2eNMV6XOIAEBAHeCDm4vW0rYWwfrKADPyYGZQF2si14o3wtgSMX5a4ccxGwikT3to3HttWBhmJs_I1Xr_BvBxePc4WghjQr5GVGbq8vhr4HwdkTmlcJAnQsc_fmIdbJ_ACyTa1wr343KYYOQVwBjAmZDa6rU16y0yTr_J4IVWY3aS5UpBEBHy4XE0c76UaN-_DcGiVl4ayWQIUz8A",
|
|
84
|
-
id: 84300,
|
|
85
|
-
version: 1,
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/*
|
|
90
|
-
export const chatPROV_merchantsProduct = Template.bind({});
|
|
91
|
-
chatPROV_merchantsProduct.args = {
|
|
92
|
-
userToken:
|
|
93
|
-
"eyJraWQiOiJEV3owZnNie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fR5CjZWYOGPdSw7AUS33yYAkx5Nmnz4oIcRlPsvF5U62g",
|
|
94
|
-
chatType: "merchants_products",
|
|
95
|
-
articleId: "84300",
|
|
96
|
-
articleVersion: "1",
|
|
97
|
-
};*/
|
|
98
|
-
|
|
99
|
-
// ejemplo del chat ticket con user FAB
|
|
100
|
-
export const chatFAB_ticketClosed_user49 = Template.bind({});
|
|
101
|
-
chatFAB_ticketClosed_user49.args = {
|
|
102
|
-
chatType: "ticket",
|
|
103
|
-
chatContainerType: "fixed",
|
|
104
|
-
chatData: {
|
|
105
|
-
id: 10,
|
|
106
|
-
ticketOwnerUserId: 23,
|
|
107
|
-
statusTicket: "COMPLETED",
|
|
108
|
-
currentUser: {
|
|
109
|
-
id: 49,
|
|
110
|
-
companyId: 2,
|
|
111
|
-
isUserTech: false,
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
// ejemplo del chat ticket con user TECH
|
|
117
|
-
export const chatTECH_ticketClosed_user65 = Template.bind({});
|
|
118
|
-
chatTECH_ticketClosed_user65.args = {
|
|
119
|
-
chatType: "ticket",
|
|
120
|
-
chatContainerType: "fixed",
|
|
121
|
-
chatData: {
|
|
122
|
-
id: 10,
|
|
123
|
-
ticketOwnerUserId: 23,
|
|
124
|
-
statusTicket: "COMPLETED",
|
|
125
|
-
currentUser: {
|
|
126
|
-
id: 65,
|
|
127
|
-
companyId: 2,
|
|
128
|
-
isUserTech: true,
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
// ejemplo del chat ticket con user TECH propietario del ticket
|
|
134
|
-
export const chatTECH_ticketClosedOwn_user66 = Template.bind({});
|
|
135
|
-
chatTECH_ticketClosedOwn_user66.args = {
|
|
136
|
-
chatType: "ticket",
|
|
137
|
-
chatContainerType: "fixed",
|
|
138
|
-
chatData: {
|
|
139
|
-
id: 10,
|
|
140
|
-
ticketOwnerUserId: 66,
|
|
141
|
-
statusTicket: "COMPLETED",
|
|
142
|
-
currentUser: {
|
|
143
|
-
id: 66,
|
|
144
|
-
companyId: 2,
|
|
145
|
-
isUserTech: true,
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// ejemplo del chat ticket con user FAB
|
|
151
|
-
export const chatFAB_ticketOpen_user49 = Template.bind({});
|
|
152
|
-
chatFAB_ticketOpen_user49.args = {
|
|
153
|
-
chatType: "ticket",
|
|
154
|
-
chatContainerType: "fixed",
|
|
155
|
-
chatData: {
|
|
156
|
-
id: 11,
|
|
157
|
-
ticketOwnerUserId: 23,
|
|
158
|
-
statusTicket: "PENDING",
|
|
159
|
-
currentUser: {
|
|
160
|
-
id: 49,
|
|
161
|
-
companyId: 2,
|
|
162
|
-
isUserTech: false,
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
// ejemplo del chat ticket con user TECH
|
|
168
|
-
export const chatTECH_ticketOpen_user65 = Template.bind({});
|
|
169
|
-
chatTECH_ticketOpen_user65.args = {
|
|
170
|
-
chatType: "ticket",
|
|
171
|
-
chatContainerType: "fixed",
|
|
172
|
-
chatData: {
|
|
173
|
-
id: 11,
|
|
174
|
-
ticketOwnerUserId: 23,
|
|
175
|
-
statusTicket: "PENDING",
|
|
176
|
-
currentUser: {
|
|
177
|
-
id: 65,
|
|
178
|
-
companyId: 2,
|
|
179
|
-
isUserTech: true,
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
// ejemplo del chat ticket con user TECH propietario del ticket
|
|
185
|
-
export const chatTECH_ticketOpenOwn_user66 = Template.bind({});
|
|
186
|
-
chatTECH_ticketOpenOwn_user66.args = {
|
|
187
|
-
chatType: "ticket",
|
|
188
|
-
chatContainerType: "fixed",
|
|
189
|
-
chatData: {
|
|
190
|
-
id: 11,
|
|
191
|
-
ticketOwnerUserId: 66,
|
|
192
|
-
statusTicket: "PENDING",
|
|
193
|
-
currentUser: {
|
|
194
|
-
id: 66,
|
|
195
|
-
companyId: 2,
|
|
196
|
-
isUserTech: true,
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { ChatLists } from "./index";
|
|
2
|
-
import THD from "./THD.png";
|
|
3
|
-
import Rotoplas from "./Rotoplas.jpeg";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Components/organisms/Chat/ChatLists",
|
|
7
|
-
component: ChatLists,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const Template = (args) => <ChatLists {...args} />;
|
|
11
|
-
|
|
12
|
-
// companies de prueba
|
|
13
|
-
const companies = {
|
|
14
|
-
200: {
|
|
15
|
-
name: "The Home Depot",
|
|
16
|
-
src: THD,
|
|
17
|
-
lastChatDate: "2022-11-4 21:01:00",
|
|
18
|
-
statusChat: "disabled",
|
|
19
|
-
},
|
|
20
|
-
300: {
|
|
21
|
-
name: "Rotoplas",
|
|
22
|
-
src: Rotoplas,
|
|
23
|
-
lastChatDate: "2022-11-03 21:01:00",
|
|
24
|
-
statusChat: "enabled",
|
|
25
|
-
},
|
|
26
|
-
100: {
|
|
27
|
-
name: "Content-oh!",
|
|
28
|
-
src: "",
|
|
29
|
-
lastChatDate: "2022-11-02 21:01:00",
|
|
30
|
-
statusChat: "current",
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
// companies de prueba sin chats cerrados
|
|
34
|
-
const companies2 = {
|
|
35
|
-
300: {
|
|
36
|
-
name: "Rotoplas",
|
|
37
|
-
src: Rotoplas,
|
|
38
|
-
lastChatDate: "2022-10-27 21:01:00",
|
|
39
|
-
statusChat: "enabled",
|
|
40
|
-
},
|
|
41
|
-
100: {
|
|
42
|
-
name: "Content-oh!",
|
|
43
|
-
src: "",
|
|
44
|
-
lastChatDate: "2022-9-27 21:01:00",
|
|
45
|
-
statusChat: "current",
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const exampleChatLists = Template.bind({});
|
|
50
|
-
exampleChatLists.args = {
|
|
51
|
-
companies,
|
|
52
|
-
currentCompanyId: 100,
|
|
53
|
-
onClickCompany: (companyId) => {
|
|
54
|
-
console.log("click en company:", companyId);
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const onlyOpenChatLists = Template.bind({});
|
|
59
|
-
onlyOpenChatLists.args = {
|
|
60
|
-
companies: companies2,
|
|
61
|
-
currentCompanyId: 100,
|
|
62
|
-
onClickCompany: (companyId) => {
|
|
63
|
-
console.log("click en company:", companyId);
|
|
64
|
-
},
|
|
65
|
-
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { Container, ContainerItemChat, ContainerTooltip } from "./styles";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
import { getCustomDate } from "../../../../global-files/utils";
|
|
4
|
-
import { faImage as IconImage } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
-
import { CustomIcon } from "../../../atoms/CustomIcon";
|
|
6
|
-
import { Image } from "../../../atoms/Image";
|
|
7
|
-
import { Tooltip } from "../../../atoms/Tooltip";
|
|
8
|
-
|
|
9
|
-
export const ChatLists = (props) => {
|
|
10
|
-
const {
|
|
11
|
-
companies /* {
|
|
12
|
-
id: { name , src , statusChat , items } ,
|
|
13
|
-
...
|
|
14
|
-
} */,
|
|
15
|
-
currentCompanyId, // number
|
|
16
|
-
onClickCompany, // (id) => {}
|
|
17
|
-
} = props;
|
|
18
|
-
const [openChats, setOpenChats] = useState([]);
|
|
19
|
-
const [closedChats, setClosedChats] = useState([]);
|
|
20
|
-
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
renderChats();
|
|
23
|
-
}, [companies]);
|
|
24
|
-
|
|
25
|
-
const renderChats = () => {
|
|
26
|
-
let jsxOpenChats = [];
|
|
27
|
-
let jsxClosedChats = [];
|
|
28
|
-
|
|
29
|
-
for (const companyId of Object.keys(companies)) {
|
|
30
|
-
const company = companies[companyId];
|
|
31
|
-
// crear el item chat
|
|
32
|
-
const itemChat = (
|
|
33
|
-
<ContainerItemChat
|
|
34
|
-
key={"itemChat-" + companyId}
|
|
35
|
-
onClick={(event) => {
|
|
36
|
-
onClickCompany && onClickCompany(companyId);
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
{/* logo de la compañia */}
|
|
40
|
-
<Image
|
|
41
|
-
className="img-logoCompany"
|
|
42
|
-
width={"34px"}
|
|
43
|
-
sizeLoading={24}
|
|
44
|
-
colorLoading={undefined}
|
|
45
|
-
src={company.src}
|
|
46
|
-
componentDefault={
|
|
47
|
-
<CustomIcon
|
|
48
|
-
className="icon-logoCompany"
|
|
49
|
-
type={"white"}
|
|
50
|
-
borderType={"circle"}
|
|
51
|
-
size={15}
|
|
52
|
-
icon={IconImage}
|
|
53
|
-
/>
|
|
54
|
-
}
|
|
55
|
-
/>
|
|
56
|
-
|
|
57
|
-
{/* name y date */}
|
|
58
|
-
<div className="container-info">
|
|
59
|
-
<label className="label-name"> {company.name} </label>
|
|
60
|
-
<label className="label-lastDate">
|
|
61
|
-
{getCustomDate(
|
|
62
|
-
new Date(
|
|
63
|
-
company.items.length ? company.items[0].date : undefined
|
|
64
|
-
)
|
|
65
|
-
)}
|
|
66
|
-
</label>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
{/* label interno */}
|
|
70
|
-
<div className="container-indicators">
|
|
71
|
-
{currentCompanyId == companyId && (
|
|
72
|
-
<div className="label-ownCompany">Interno</div>
|
|
73
|
-
)}
|
|
74
|
-
</div>
|
|
75
|
-
</ContainerItemChat>
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
// checar si es chat abierto
|
|
79
|
-
if (company.statusChat == "closed") jsxClosedChats.push(itemChat);
|
|
80
|
-
else jsxOpenChats.push(itemChat);
|
|
81
|
-
}
|
|
82
|
-
setOpenChats(jsxOpenChats);
|
|
83
|
-
setClosedChats(jsxClosedChats);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<>
|
|
88
|
-
<Container>
|
|
89
|
-
{openChats.length !== 0 && (
|
|
90
|
-
<section>
|
|
91
|
-
<div className="container-headerChats">
|
|
92
|
-
<Tooltip
|
|
93
|
-
className={"tooltip-title"}
|
|
94
|
-
position={"topCenter"}
|
|
95
|
-
addArrow={false}
|
|
96
|
-
transitionType={"zoom"}
|
|
97
|
-
followCursor={false}
|
|
98
|
-
componentTooltip={
|
|
99
|
-
<ContainerTooltip>
|
|
100
|
-
<label className="label-title"> Chats abiertos </label>
|
|
101
|
-
<label className="label-message">{`De acuerdo al estatus
|
|
102
|
-
actual del producto, puedes establecer una conversación
|
|
103
|
-
con estas compañias`}</label>
|
|
104
|
-
</ContainerTooltip>
|
|
105
|
-
}
|
|
106
|
-
>
|
|
107
|
-
<label> Chats abiertos </label>
|
|
108
|
-
</Tooltip>
|
|
109
|
-
</div>
|
|
110
|
-
<div className="container-bodyChats">{openChats}</div>
|
|
111
|
-
</section>
|
|
112
|
-
)}
|
|
113
|
-
|
|
114
|
-
{closedChats.length !== 0 && (
|
|
115
|
-
<section>
|
|
116
|
-
<div className="container-headerChats">
|
|
117
|
-
<Tooltip
|
|
118
|
-
className={"tooltip-title"}
|
|
119
|
-
position={"topCenter"}
|
|
120
|
-
addArrow={false}
|
|
121
|
-
transitionType={"zoom"}
|
|
122
|
-
followCursor={false}
|
|
123
|
-
componentTooltip={
|
|
124
|
-
<ContainerTooltip>
|
|
125
|
-
<label className="label-title"> Chats cerrados </label>
|
|
126
|
-
<label className="label-message">{`Las conversaciones
|
|
127
|
-
con estas compañias han finalizado debido al cambio de
|
|
128
|
-
estatus, sigue el flujo de trabajo con tus chats abiertos`}</label>
|
|
129
|
-
</ContainerTooltip>
|
|
130
|
-
}
|
|
131
|
-
>
|
|
132
|
-
<label> Chats cerrados </label>
|
|
133
|
-
</Tooltip>
|
|
134
|
-
</div>
|
|
135
|
-
<div className="container-bodyChats">{closedChats}</div>
|
|
136
|
-
</section>
|
|
137
|
-
)}
|
|
138
|
-
</Container>
|
|
139
|
-
</>
|
|
140
|
-
);
|
|
141
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { GlobalColors, FontFamily } from "../../../../global-files/variables";
|
|
3
|
-
|
|
4
|
-
export const Container = styled.div`
|
|
5
|
-
width: 100%;
|
|
6
|
-
max-height: 100%;
|
|
7
|
-
flex-grow: 2;
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
justify-content: flex-start;
|
|
11
|
-
gap: 30px;
|
|
12
|
-
background: white;
|
|
13
|
-
padding: 20px;
|
|
14
|
-
overflow: auto;
|
|
15
|
-
//border: 1px solid red;
|
|
16
|
-
|
|
17
|
-
section {
|
|
18
|
-
width: 100%;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
gap: 15px;
|
|
22
|
-
|
|
23
|
-
// container del nombre de la seccion con su icono info
|
|
24
|
-
.container-headerChats {
|
|
25
|
-
width: 100%;
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: row;
|
|
28
|
-
flex-wrap: nowrap;
|
|
29
|
-
align-items: center;
|
|
30
|
-
gap: 5px;
|
|
31
|
-
|
|
32
|
-
.tooltip-title {
|
|
33
|
-
max-width: 100%;
|
|
34
|
-
|
|
35
|
-
label {
|
|
36
|
-
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
37
|
-
font-size: 15px;
|
|
38
|
-
text-align: left;
|
|
39
|
-
color: #262626;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// container de la lista de los items chats de la seccion
|
|
45
|
-
.container-bodyChats {
|
|
46
|
-
width: 100%;
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
gap: 10px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
export const ContainerItemChat = styled.div`
|
|
55
|
-
width: 100%;
|
|
56
|
-
min-width: min-content;
|
|
57
|
-
display: flex;
|
|
58
|
-
flex-direction: row;
|
|
59
|
-
align-items: center;
|
|
60
|
-
justify-content: flex-start;
|
|
61
|
-
gap: 20px;
|
|
62
|
-
background: #f7f7fc;
|
|
63
|
-
padding: 15px;
|
|
64
|
-
border-radius: 10px;
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
transition: background 0.25s;
|
|
67
|
-
|
|
68
|
-
* {
|
|
69
|
-
cursor: inherit;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// imagen del logo de la compañia
|
|
73
|
-
.img-logoCompany {
|
|
74
|
-
border-radius: 50%;
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
height: 34px;
|
|
77
|
-
width: 34px;
|
|
78
|
-
|
|
79
|
-
.icon-logoCompany {
|
|
80
|
-
width: 100%;
|
|
81
|
-
height: 100%;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// container de las etiquetas "name" y "lastDate"
|
|
86
|
-
.container-info {
|
|
87
|
-
flex-grow: 2;
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-direction: column;
|
|
90
|
-
align-items: flex-start;
|
|
91
|
-
gap: 4px;
|
|
92
|
-
|
|
93
|
-
.label-name {
|
|
94
|
-
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
95
|
-
font-size: 15px;
|
|
96
|
-
text-align: left;
|
|
97
|
-
color: #262626;
|
|
98
|
-
}
|
|
99
|
-
.label-lastDate {
|
|
100
|
-
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
101
|
-
font-size: 11px;
|
|
102
|
-
text-align: left;
|
|
103
|
-
color: #b3b3b3;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.container-indicators {
|
|
108
|
-
display: flex;
|
|
109
|
-
flex-direction: row;
|
|
110
|
-
align-items: center;
|
|
111
|
-
gap: 7px;
|
|
112
|
-
|
|
113
|
-
// label "Interno"
|
|
114
|
-
.label-ownCompany {
|
|
115
|
-
padding: 5px 10px;
|
|
116
|
-
border-radius: 3px;
|
|
117
|
-
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
118
|
-
font-size: 10px;
|
|
119
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
120
|
-
color: #707070;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// cuando el item chat tenga el cursor
|
|
125
|
-
&:hover {
|
|
126
|
-
background-color: #d7d7dd;
|
|
127
|
-
|
|
128
|
-
.container-info {
|
|
129
|
-
.label-lastDate {
|
|
130
|
-
color: #959292;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/*
|
|
135
|
-
.label-ownCompany {
|
|
136
|
-
background-color: ;
|
|
137
|
-
}*/
|
|
138
|
-
}
|
|
139
|
-
`;
|
|
140
|
-
|
|
141
|
-
// container con 2 labels "label-title" y "label-message"
|
|
142
|
-
export const ContainerTooltip = styled.div`
|
|
143
|
-
min-width: min-content;
|
|
144
|
-
display: flex;
|
|
145
|
-
flex-direction: column;
|
|
146
|
-
align-items: flex-start;
|
|
147
|
-
gap: 5px;
|
|
148
|
-
background: transparent;
|
|
149
|
-
|
|
150
|
-
.label-title {
|
|
151
|
-
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
152
|
-
font-size: 12px;
|
|
153
|
-
text-align: left;
|
|
154
|
-
color: #262626;
|
|
155
|
-
}
|
|
156
|
-
.label-message {
|
|
157
|
-
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
158
|
-
font-size: 11px;
|
|
159
|
-
text-align: left;
|
|
160
|
-
color: #262626;
|
|
161
|
-
}
|
|
162
|
-
`;
|