contentoh-components-library 21.3.13 → 21.3.14
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 +5 -0
- package/dist/assets/fonts/{roboto → Roboto}/LICENSE.txt +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Black.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-BlackItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Bold.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-BoldItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Italic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Light.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-LightItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Medium.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-MediumItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Regular.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Thin.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-ThinItalic.ttf +0 -0
- package/dist/assets/images/chatPopup/Spinner.gif +0 -0
- package/dist/assets/images/chatPopup/close.svg +3 -0
- package/dist/assets/images/chatPopup/defaultImage.png +0 -0
- package/dist/assets/images/chatPopup/defaultProfile.png +0 -0
- package/dist/assets/images/chatPopup/doc.svg +1 -0
- package/dist/assets/images/chatPopup/document.svg +1 -0
- package/dist/assets/images/chatPopup/iconChat.svg +19 -0
- package/dist/assets/images/chatPopup/iconPlus.svg +3 -0
- package/dist/assets/images/chatPopup/pdf.svg +75 -0
- package/dist/assets/images/chatPopup/remove.svg +4 -0
- package/dist/assets/images/chatPopup/send.svg +3 -0
- package/dist/assets/images/chatPopup/svgIcon.svg +109 -0
- package/dist/assets/images/chatPopup/upload_file.svg +3 -0
- package/dist/assets/images/chatPopup/xls.svg +53 -0
- package/dist/assets/images/generalButton/closeIcon.svg +2 -2
- package/dist/components/atoms/ChatPopUp/ChatPopUp.stories.js +28 -0
- package/dist/components/atoms/ChatPopUp/index.js +841 -0
- package/dist/components/atoms/ChatPopUp/styles.js +27 -0
- package/dist/components/atoms/ChatPopUp/utils/handlersChat.js +182 -0
- package/dist/components/atoms/ProgressBar/index.js +36 -6
- package/dist/components/atoms/ProgressBar/styles.js +11 -3
- package/dist/components/atoms/StatusTag/StatusTag.stories.js +48 -0
- package/dist/components/atoms/StatusTag/index.js +58 -0
- package/dist/components/atoms/StatusTag/styles.js +20 -0
- package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +21 -22
- package/dist/components/molecules/CustomSelect/SelectItem.js +10 -1
- package/dist/components/molecules/HeaderTop/index.js +23 -6
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/molecules/ProductNameHeader/index.js +6 -4
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -0
- package/dist/components/organisms/RangeCalendar/index.js +4 -3
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +65 -50
- package/dist/components/pages/ProviderProductEdition/index.js +15 -11
- package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
- package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
- package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +60 -86
- package/dist/components/pages/RetailerProductEdition/index.js +13 -12
- package/dist/global-files/fonts.css +6 -0
- package/dist/global-files/utils.js +22 -2
- package/dist/global-files/variables.js +2 -0
- package/dist/index.js +267 -46
- package/package.json +12 -1
- package/src/assets/images/customSelect/starIcon.svg +14 -0
- package/src/assets/images/defaultImages/Spinner.gif +0 -0
- package/src/assets/images/defaultImages/notFound.svg +124 -0
- package/src/assets/images/generalButton/closeIcon.svg +2 -2
- package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +47 -0
- package/src/components/atoms/ButtonFileChooser/index.js +68 -0
- package/src/components/atoms/ButtonFileChooser/styles.js +4 -0
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +53 -0
- package/src/components/atoms/ButtonV2/index.js +85 -0
- package/src/components/atoms/ButtonV2/styles.js +217 -0
- package/src/components/atoms/CustomIcon/CustomIcon.stories.js +36 -0
- package/src/components/atoms/CustomIcon/index.js +41 -0
- package/src/components/atoms/CustomIcon/styles.js +85 -0
- package/src/components/atoms/IconFile/IconFile.stories.js +35 -0
- package/src/components/atoms/IconFile/index.js +119 -0
- package/src/components/atoms/IconFile/styles.js +67 -0
- package/src/components/atoms/Image/Image.stories.js +51 -0
- package/src/components/atoms/Image/index.js +55 -0
- package/src/components/atoms/Image/styles.js +34 -0
- package/src/components/atoms/ImageLink/ImageLink.stories.js +43 -0
- package/src/components/atoms/ImageLink/index.js +57 -0
- package/src/components/atoms/ImageLink/styles.js +30 -0
- package/src/components/atoms/ImagePreview/ImagePreview.stories.js +52 -0
- package/src/components/atoms/ImagePreview/index.js +178 -0
- package/src/components/atoms/ImagePreview/styles.js +77 -0
- package/src/components/atoms/InputText/InputText.stories.js +39 -0
- package/src/components/atoms/InputText/index.js +61 -0
- package/src/components/atoms/InputText/styles.js +89 -0
- package/src/components/atoms/NotFound/NotFound.stories.js +19 -0
- package/src/components/atoms/NotFound/index.js +52 -0
- package/src/components/atoms/NotFound/styles.js +55 -0
- package/src/components/atoms/ProgressBar/index.js +40 -5
- package/src/components/atoms/ProgressBar/styles.js +24 -0
- package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +26 -0
- package/src/components/atoms/SelectItemV2/index.js +61 -0
- package/src/components/atoms/SelectItemV2/styles.js +90 -0
- package/src/components/atoms/Tooltip/Tooltip.stories.js +51 -0
- package/src/components/atoms/Tooltip/index.js +59 -0
- package/src/components/atoms/Tooltip/styles.js +42 -0
- package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +54 -0
- package/src/components/molecules/ButtonDownloadFile/index.js +109 -0
- package/src/components/molecules/ButtonDownloadFile/styles.js +66 -0
- package/src/components/molecules/CustomSelect/CustomSelect.stories.js +20 -12
- package/src/components/molecules/CustomSelect/SelectItem.js +7 -0
- package/src/components/molecules/Dropdown/Dropdown.stories.js +103 -0
- package/src/components/molecules/Dropdown/index.js +150 -0
- package/src/components/molecules/Dropdown/styles.js +75 -0
- package/src/components/molecules/HeaderTop/index.js +29 -8
- package/src/components/molecules/HeaderTop/styles.js +4 -0
- package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +68 -0
- package/src/components/molecules/ImageTooltip/index.js +63 -0
- package/src/components/molecules/ImageTooltip/styles.js +18 -0
- package/src/components/molecules/ProductNameHeader/index.js +7 -2
- package/src/components/molecules/SelectV2/SelectV2.stories.js +115 -0
- package/src/components/molecules/SelectV2/index.js +357 -0
- package/src/components/molecules/SelectV2/styles.js +105 -0
- package/src/components/molecules/SelectV2/test.js +61 -0
- package/src/components/molecules/SelectV2/test.stories.js +10 -0
- package/src/components/organisms/Chat/Chat.stories.js +147 -0
- package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +65 -0
- 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 +141 -0
- package/src/components/organisms/Chat/ChatLists/styles.js +162 -0
- package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +142 -0
- package/src/components/organisms/Chat/ContainerItems/index.js +512 -0
- package/src/components/organisms/Chat/ContainerItems/styles.js +328 -0
- package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +102 -0
- 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 +897 -0
- package/src/components/organisms/Chat/ContentChat/styles.js +41 -0
- package/src/components/organisms/Chat/Footer/Footer.stories.js +22 -0
- package/src/components/organisms/Chat/Footer/index.js +661 -0
- package/src/components/organisms/Chat/Footer/styles.js +286 -0
- package/src/components/organisms/Chat/Header/Header.stories.js +66 -0
- package/src/components/organisms/Chat/Header/index.js +94 -0
- package/src/components/organisms/Chat/Header/styles.js +49 -0
- package/src/components/organisms/Chat/index.js +235 -0
- package/src/components/organisms/Chat/styles.js +42 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -0
- package/src/components/organisms/Modal/Modal.stories.js +55 -0
- package/src/components/organisms/Modal/index.js +97 -0
- package/src/components/organisms/Modal/styles.js +103 -0
- package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +16 -0
- package/src/components/organisms/RangeCalendar/index.js +121 -0
- package/src/components/organisms/RangeCalendar/styles.js +883 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +67 -49
- package/src/components/pages/ProviderProductEdition/index.js +16 -7
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +62 -85
- package/src/components/pages/RetailerProductEdition/index.js +12 -10
- package/src/global-files/fonts.css +6 -0
- package/src/global-files/handle_http.js +225 -0
- package/src/global-files/handle_userTech.js +7 -0
- package/src/global-files/utils.js +330 -0
- package/src/global-files/variables.js +2 -0
- package/src/index.js +17 -0
|
@@ -28,117 +28,91 @@ exports.RetailerProductEditionDefault = RetailerProductEditionDefault;
|
|
|
28
28
|
RetailerProductEditionDefault.args = {
|
|
29
29
|
tabsSections: {
|
|
30
30
|
Descripción: true,
|
|
31
|
-
"Ficha técnica":
|
|
32
|
-
Imágenes:
|
|
31
|
+
"Ficha técnica": true,
|
|
32
|
+
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJmMzY2YTdjYi02YjA0LTRiMzAtOTJmYy1iMzY0MmY3ZjEzNmEiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY3MTc0MzE0OSwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjcxNzQ2NzQ5LCJpYXQiOjE2NzE3NDMxNDksImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.J8kTv1sEotxoicaRclaK1r0tjVbwHPDxIzdDfxYo9J4XwBYYfS180__KYYE0Dh1AfUK_K0mrk2_78_rhTNxCQT85W7XS3ZEcxIOUekqoxaKFl8LSVN_eWz3SlsGG0yRflhJGt6d4gBVByXZbdNiyp1rkjgMln6fhwlRUnuGRbG1WKQvdAPli3qfH8mLzgoTz-6HWs1Jf2Ujheavf3ipGMNtj-OSUdQsh04Ov7jehDWdnPNn2s2DAl4eubgjdXrwIiBPCRkbuFeYZZJpzj1wy__a0nCM7bzly5uTZ2aWujgEJvf9bJb-Y4gkS8TxyJaggJ01ZsMki36aEpIt8J1tJag",
|
|
35
35
|
productSelected: {
|
|
36
|
-
|
|
37
|
-
datasheets: 1,
|
|
38
|
-
descriptions: 1,
|
|
39
|
-
images: 1
|
|
40
|
-
},
|
|
41
|
-
orderId: 123,
|
|
42
|
-
status: "PA",
|
|
43
|
-
datasheet_status: "PA",
|
|
44
|
-
prio: "none",
|
|
36
|
+
articleStatus: "AA",
|
|
45
37
|
version: 3,
|
|
46
|
-
|
|
47
|
-
images_status: "PA",
|
|
48
|
-
statusByRetailer: {
|
|
49
|
-
4: {
|
|
50
|
-
datasheet: "PA",
|
|
51
|
-
description: "PA",
|
|
52
|
-
images: "PA"
|
|
53
|
-
},
|
|
54
|
-
5: {
|
|
55
|
-
datasheet: "PA",
|
|
56
|
-
description: "PA",
|
|
57
|
-
images: "PA"
|
|
58
|
-
},
|
|
59
|
-
6: {
|
|
60
|
-
datasheet: "PA",
|
|
61
|
-
description: "PA",
|
|
62
|
-
images: "PA"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
38
|
+
missing: {},
|
|
65
39
|
article: {
|
|
66
|
-
|
|
67
|
-
id_category: "700",
|
|
68
|
-
name: "prueba prod flujo",
|
|
69
|
-
upc: "34234353324",
|
|
70
|
-
timestamp: "2022-11-23T23:12:30.000Z",
|
|
71
|
-
id_user: 28,
|
|
72
|
-
status: "NULL",
|
|
73
|
-
active: 1,
|
|
74
|
-
company_id: 1,
|
|
40
|
+
category: "Ventilación y Calefacción|Ventiladores de Techo|Ventiladores de Techo",
|
|
75
41
|
company_name: "GRUPO BRAHMA",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
id_description_facilitator: 52,
|
|
82
|
-
id_images_especialist: 55,
|
|
83
|
-
id_images_facilitator: 53,
|
|
84
|
-
id_auditor: 37,
|
|
85
|
-
id_recepcionist: null,
|
|
86
|
-
category: "Salud y Belleza|Cuidado Facial|Cremas, Mascarillas y Tratamientos",
|
|
87
|
-
missingAttributes: 0,
|
|
88
|
-
missingDescriptions: 0,
|
|
89
|
-
missingImages: 0
|
|
42
|
+
company_id: 1,
|
|
43
|
+
id_category: "2416",
|
|
44
|
+
id_article: 221,
|
|
45
|
+
name: 'DEMO VENTILADOR DE TECHO TRIBECA 52"',
|
|
46
|
+
upc: "147259"
|
|
90
47
|
},
|
|
48
|
+
asignations: [],
|
|
91
49
|
retailers: [{
|
|
92
|
-
id:
|
|
93
|
-
name: "
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}, {
|
|
98
|
-
id: 6,
|
|
99
|
-
name: "HEB"
|
|
50
|
+
id: 59,
|
|
51
|
+
name: "The Home Depot Platinum",
|
|
52
|
+
country: "México",
|
|
53
|
+
id_region: 1,
|
|
54
|
+
active: 1
|
|
100
55
|
}],
|
|
101
|
-
|
|
102
|
-
|
|
56
|
+
retailersAvailable: [{
|
|
57
|
+
id: 59,
|
|
58
|
+
name: "The Home Depot Platinum",
|
|
59
|
+
country: "México",
|
|
60
|
+
id_region: 1,
|
|
61
|
+
active: 1
|
|
62
|
+
}],
|
|
63
|
+
upc: "147259",
|
|
64
|
+
name: 'DEMO VENTILADOR DE TECHO TRIBECA 52"',
|
|
65
|
+
categoryName: "Ventilación y Calefacción|Ventiladores de Techo|Ventiladores de Techo",
|
|
66
|
+
id_category: "2416",
|
|
67
|
+
id_article: 221,
|
|
68
|
+
services: [{
|
|
69
|
+
id_article: 221,
|
|
70
|
+
service: "datasheet",
|
|
71
|
+
quantity: 1,
|
|
72
|
+
price: 0,
|
|
73
|
+
id_user: 59,
|
|
74
|
+
datasheet_common: null,
|
|
75
|
+
discount: null
|
|
76
|
+
}]
|
|
103
77
|
},
|
|
104
78
|
location: {
|
|
105
79
|
product: {
|
|
106
|
-
articleId:
|
|
80
|
+
articleId: 221,
|
|
107
81
|
versionId: 3
|
|
108
82
|
}
|
|
109
83
|
},
|
|
110
84
|
user: {
|
|
111
|
-
id_user:
|
|
112
|
-
name: "
|
|
113
|
-
last_name: "",
|
|
114
|
-
email: "
|
|
115
|
-
position: "",
|
|
116
|
-
telephone: "",
|
|
117
|
-
country: "",
|
|
118
|
-
id_company:
|
|
119
|
-
id_cognito: "
|
|
85
|
+
id_user: 59,
|
|
86
|
+
name: "The Home",
|
|
87
|
+
last_name: "Depot",
|
|
88
|
+
email: "cadena.ismael@allfreemail.net",
|
|
89
|
+
position: "Admin",
|
|
90
|
+
telephone: "+523111366336",
|
|
91
|
+
country: "México",
|
|
92
|
+
id_company: 817,
|
|
93
|
+
id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
|
|
120
94
|
birth_Date: null,
|
|
121
95
|
about_me: "",
|
|
122
96
|
zip_code: "",
|
|
123
97
|
address: "",
|
|
124
98
|
job: "",
|
|
125
99
|
id_stripe: "",
|
|
126
|
-
id_role:
|
|
100
|
+
id_role: 0,
|
|
127
101
|
active: 1,
|
|
128
|
-
is_retailer:
|
|
129
|
-
email_notify:
|
|
102
|
+
is_retailer: 1,
|
|
103
|
+
email_notify: 0,
|
|
130
104
|
is_user_tech: null,
|
|
131
105
|
membership: {
|
|
132
|
-
id:
|
|
133
|
-
start_date: "
|
|
134
|
-
end_date: "
|
|
135
|
-
planID:
|
|
136
|
-
plan: "
|
|
137
|
-
name: "Plan
|
|
138
|
-
user_limit: "
|
|
139
|
-
products_limit: "
|
|
106
|
+
id: 47,
|
|
107
|
+
start_date: "2022-05-25T14:31:12.000Z",
|
|
108
|
+
end_date: "2023-05-25T14:31:12.000Z",
|
|
109
|
+
planID: 5,
|
|
110
|
+
plan: "prod_Ktl6B5Ou2gqTB2",
|
|
111
|
+
name: "Plan Pro",
|
|
112
|
+
user_limit: "5",
|
|
113
|
+
products_limit: "500",
|
|
140
114
|
type: "PyMES"
|
|
141
115
|
},
|
|
142
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
116
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1671735033010"
|
|
143
117
|
}
|
|
144
118
|
};
|
|
@@ -318,7 +318,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
318
318
|
})),
|
|
319
319
|
_useState24 = (0, _slicedToArray2.default)(_useState23, 2),
|
|
320
320
|
percentages = _useState24[0],
|
|
321
|
-
setPercentages = _useState24[1];
|
|
321
|
+
setPercentages = _useState24[1]; // const [percentages, setPercentages] = useState([{ retailers: {} }]);
|
|
322
|
+
|
|
322
323
|
|
|
323
324
|
var _useState25 = (0, _react.useState)(0),
|
|
324
325
|
_useState26 = (0, _slicedToArray2.default)(_useState25, 2),
|
|
@@ -462,8 +463,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
462
463
|
_services = _context.sent;
|
|
463
464
|
//Converts the data inside the datasheets object to array
|
|
464
465
|
setServices(_services);
|
|
465
|
-
getServices();
|
|
466
|
-
|
|
466
|
+
getServices();
|
|
467
467
|
setImages({
|
|
468
468
|
action: "init",
|
|
469
469
|
init: _services[2]
|
|
@@ -472,7 +472,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
472
472
|
(0, _data.getPercentage)({
|
|
473
473
|
data: [product]
|
|
474
474
|
}).then(function (res) {
|
|
475
|
-
return setPercentages(res);
|
|
475
|
+
return setPercentages(res[0]);
|
|
476
476
|
});
|
|
477
477
|
setLoading(false);
|
|
478
478
|
_context.next = 15;
|
|
@@ -681,16 +681,17 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
681
681
|
loadAssignations(product);
|
|
682
682
|
}, [userGroups]);
|
|
683
683
|
(0, _react.useEffect)(function () {
|
|
684
|
-
var
|
|
684
|
+
var _Object$keys, _percentages$retailer, _retailers$;
|
|
685
685
|
|
|
686
|
-
product === null || product === void 0 ? void 0 :
|
|
687
|
-
var _percentages$filter$;
|
|
686
|
+
var retailers = (product === null || product === void 0 ? void 0 : product.retailersAvailable) || (product === null || product === void 0 ? void 0 : product.retailers);
|
|
688
687
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
688
|
+
if (((_Object$keys = Object.keys((_percentages$retailer = percentages === null || percentages === void 0 ? void 0 : percentages.retailers) !== null && _percentages$retailer !== void 0 ? _percentages$retailer : {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0) {
|
|
689
|
+
retailers === null || retailers === void 0 ? void 0 : retailers.forEach(function (retailer) {
|
|
690
|
+
retailer["percentage"] = Number(percentages === null || percentages === void 0 ? void 0 : percentages.retailers[retailer.id].percentageRequired);
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
setActivePercentage((_retailers$ = retailers[0]) === null || _retailers$ === void 0 ? void 0 : _retailers$.percentage);
|
|
694
695
|
}, [percentages]);
|
|
695
696
|
(0, _react.useEffect)(function () {
|
|
696
697
|
if (services.length > 0) {
|
|
@@ -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.isValidNaturalNumber = exports.isStringEmpty = exports.isObject = exports.isArrayEmpty = exports.getTime = exports.getResizeImgHeight = exports.getImageURL = exports.getImageSize = exports.getFullDate = exports.getFileName = exports.getFileExtension = exports.getDataBuffer = exports.getDataBase64 = exports.getCustomDate = exports.getBase64 = exports.encodeUriJson = exports.decodeJSON = void 0;
|
|
8
|
+
exports.isValidNaturalNumber = exports.isStringEmpty = exports.isObject = exports.isArrayEmpty = exports.getTime = exports.getResizeImgHeight = exports.getImageURL = exports.getImageSize = exports.getFullDate = exports.getFormatedDate = exports.getFileName = exports.getFileExtension = exports.getDataBuffer = exports.getDataBase64 = exports.getCustomDate = exports.getBase64 = exports.encodeUriJson = exports.decodeJSON = void 0;
|
|
9
9
|
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
|
|
@@ -342,6 +342,26 @@ var getFullDate = function getFullDate() {
|
|
|
342
342
|
/*------------------------
|
|
343
343
|
Obtener una fecha a partir de
|
|
344
344
|
un objeto Date() en formato:
|
|
345
|
+
'aaaa-MM-dd'
|
|
346
|
+
ejemplo: '2022-12-25'
|
|
347
|
+
--------------------------*/
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
exports.getFullDate = getFullDate;
|
|
351
|
+
|
|
352
|
+
var getFormatedDate = function getFormatedDate() {
|
|
353
|
+
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
|
|
354
|
+
var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "/";
|
|
355
|
+
if (isNaN(date)) return undefined;
|
|
356
|
+
var dateString = "";
|
|
357
|
+
dateString += date.getFullYear() + separator;
|
|
358
|
+
dateString += date.getMonth() + 1 + separator;
|
|
359
|
+
dateString += date.getDate();
|
|
360
|
+
return dateString;
|
|
361
|
+
};
|
|
362
|
+
/*------------------------
|
|
363
|
+
Obtener una fecha a partir de
|
|
364
|
+
un objeto Date() en formato:
|
|
345
365
|
'dd de MMMM del aaaa'
|
|
346
366
|
ejemplo: '12 de octubre del 2022'
|
|
347
367
|
=> si es la fecha del dia actual:
|
|
@@ -353,7 +373,7 @@ devolvera '12 de octubre'
|
|
|
353
373
|
--------------------------*/
|
|
354
374
|
|
|
355
375
|
|
|
356
|
-
exports.
|
|
376
|
+
exports.getFormatedDate = getFormatedDate;
|
|
357
377
|
|
|
358
378
|
var getCustomDate = function getCustomDate() {
|
|
359
379
|
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
|