contentoh-components-library 21.2.99 → 21.2.101

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 CHANGED
@@ -23,8 +23,8 @@ REACT_APP_READ_PROVIDERS=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/
23
23
  REACT_APP_PENDING_INVITATIONS=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/pending-invitations
24
24
 
25
25
  REACT_APP_IMAGES_BUCKET=content-management-images
26
- REACT_APP_KEY_UPLOAD_TO_S3=AKIA5CPHLQTT46EQ5TIK
27
26
  REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile
28
- REACT_APP_ACCESS_KEY_UPLOAD_TO_S3=tZDdrmvwxM1cScspfxFM3XpU4HSYrCNPazyHd0BL
27
+ REACT_APP_KUTS3=AKIA5CPHLQTTS22HCGHW
28
+ REACT_APP_AKUTS3=RSpwEaM0fsLEgN7BJzRyCKqyU0lNExTsPUvxyNXm
29
29
  REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
30
30
  REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
package/.env.production CHANGED
@@ -1,30 +1,30 @@
1
- REACT_APP_ARTICLE_DATA_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data
2
- REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/datasheets
3
- REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/descriptions
4
- REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/images
5
- REACT_APP_ARTICLE_DATA_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data
6
- REACT_APP_VALID_EXPORT_ENDPOINT = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/valid-export
7
- REACT_APP_SERVICES_ENDPOINT = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/services
8
- REACT_APP_EVALUATION_ENDPOINT = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/evaluations
9
- REACT_APP_SEND_EVAL = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/eval-status
10
- REACT_APP_COMMENTS_ENDPOINT = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/comments
11
- REACT_APP_USER_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/users
12
- REACT_APP_ASSIGNATIONS_ENDPOINT = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/assignations
13
- REACT_APP_TASKS_ENDPOINT = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/tasks
14
- REACT_APP_USER_TASKS_ENDPOINT = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/user-tasks
15
- REACT_APP_CART = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/cart
16
- REACT_APP_RETAILER_REQUEST = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/retailers-request
17
- REACT_APP_VERSIONS_ENDPOINT = https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/versions
18
- REACT_APP_RETAILER_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/retailers
19
- REACT_APP_READ_ORDERS_BY_STATUS=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/read-orders-by-status
20
- REACT_APP_READ_REQUIRED_ORDERS=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/read-required-orders
21
- REACT_APP_CATEGORY_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/categories
22
- REACT_APP_READ_PROVIDERS=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/providers
23
- REACT_APP_PENDING_INVITATIONS=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/pending-invitations
1
+ REACT_APP_ARTICLE_DATA_ENDPOINT=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/articles-data
2
+ REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/articles-data/datasheets
3
+ REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/articles-data/descriptions
4
+ REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/articles-data/images
5
+ REACT_APP_ARTICLE_DATA_ENDPOINT=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/articles-data
6
+ REACT_APP_VALID_EXPORT_ENDPOINT = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/valid-export
7
+ REACT_APP_SERVICES_ENDPOINT = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/services
8
+ REACT_APP_EVALUATION_ENDPOINT = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/evaluations
9
+ REACT_APP_SEND_EVAL = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/eval-status
10
+ REACT_APP_COMMENTS_ENDPOINT = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/comments
11
+ REACT_APP_USER_ENDPOINT=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/users
12
+ REACT_APP_ASSIGNATIONS_ENDPOINT = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/assignations
13
+ REACT_APP_TASKS_ENDPOINT = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/tasks
14
+ REACT_APP_USER_TASKS_ENDPOINT = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/user-tasks
15
+ REACT_APP_CART = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/cart
16
+ REACT_APP_RETAILER_REQUEST = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/retailers-request
17
+ REACT_APP_VERSIONS_ENDPOINT = https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/versions
18
+ REACT_APP_RETAILER_ENDPOINT=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/retailers
19
+ REACT_APP_READ_ORDERS_BY_STATUS=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/read-orders-by-status
20
+ REACT_APP_READ_REQUIRED_ORDERS=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/read-required-orders
21
+ REACT_APP_CATEGORY_ENDPOINT=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/categories
22
+ REACT_APP_READ_PROVIDERS=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/providers
23
+ REACT_APP_PENDING_INVITATIONS=https://3v43slee1m.execute-api.us-east-1.amazonaws.com/prod/pending-invitations
24
24
 
25
25
  REACT_APP_IMAGES_BUCKET=content-management-images-prod
26
- REACT_APP_KEY_UPLOAD_TO_S3=AKIA5CPHLQTT46EQ5TIK
27
26
  REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile-prod
28
- REACT_APP_ACCESS_KEY_UPLOAD_TO_S3=tZDdrmvwxM1cScspfxFM3XpU4HSYrCNPazyHd0BL
27
+ REACT_APP_KUTS3=AKIA5CPHLQTT46EQ5TIK
28
+ REACT_APP_AKUTS3=tZDdrmvwxM1cScspfxFM3XpU4HSYrCNPazyHd0BL
29
29
  REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
30
30
  REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
@@ -175,7 +175,7 @@ OrderDetailDefault.args = {
175
175
  company_name: "GRUPO BRAHMA",
176
176
  date: "2022-11-12T00:00:00.000Z",
177
177
  type: "En oficina",
178
- id_order: 1,
178
+ id_order: 5,
179
179
  status: "PA",
180
180
  total: 731.2639770507812,
181
181
  timestamp: "2022-11-12T22:48:23.000Z",
@@ -19,6 +19,8 @@ var _index = require("../../atoms/Status/index");
19
19
 
20
20
  var _index2 = require("../../atoms/ProgressBar/index");
21
21
 
22
+ var _index3 = require("../../atoms/Loading/index");
23
+
22
24
  var _moment = _interopRequireDefault(require("moment"));
23
25
 
24
26
  require("moment/locale/es");
@@ -36,17 +38,22 @@ _moment.default.locale("es");
36
38
  var OrderDetail = function OrderDetail(props) {
37
39
  var order = props.order;
38
40
 
39
- var _useState = (0, _react.useState)(order.payment !== "pagado"),
41
+ var _useState = (0, _react.useState)(true),
40
42
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
41
- showPaymentButton = _useState2[0],
42
- setShowPaymentButton = _useState2[1];
43
+ isLoading = _useState2[0],
44
+ setIsLoading = _useState2[1];
43
45
 
44
- var _useState3 = (0, _react.useState)({}),
46
+ var _useState3 = (0, _react.useState)(order.payment !== "pagado"),
45
47
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
46
- orderData = _useState4[0],
47
- setOrderData = _useState4[1];
48
+ showPaymentButton = _useState4[0],
49
+ setShowPaymentButton = _useState4[1];
50
+
51
+ var _useState5 = (0, _react.useState)({}),
52
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
53
+ orderData = _useState6[0],
54
+ setOrderData = _useState6[1];
48
55
 
49
- var _useState5 = (0, _react.useState)({
56
+ var _useState7 = (0, _react.useState)({
50
57
  approved: "-",
51
58
  rejected: "-",
52
59
  in_progress: "-",
@@ -56,9 +63,9 @@ var OrderDetail = function OrderDetail(props) {
56
63
  description: "-",
57
64
  images: "-"
58
65
  }),
59
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
60
- dataGeneral = _useState6[0],
61
- setDataGeneral = _useState6[1];
66
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
67
+ dataGeneral = _useState8[0],
68
+ setDataGeneral = _useState8[1];
62
69
 
63
70
  var updBilling = function updBilling(articleId, newBillingStatus) {
64
71
  props.updateBilling && props.updateBilling({
@@ -81,6 +88,7 @@ var OrderDetail = function OrderDetail(props) {
81
88
 
82
89
  (0, _react.useEffect)(function () {
83
90
  var ac = new AbortController();
91
+ setIsLoading(true);
84
92
  props.getOrderDetail && props.getOrderDetail({
85
93
  query: {
86
94
  orderId: order.id_order
@@ -102,6 +110,7 @@ var OrderDetail = function OrderDetail(props) {
102
110
  setDataGeneral((0, _objectSpread2.default)((0, _objectSpread2.default)({}, countArticles), {}, {
103
111
  totalArticles: totalArticles
104
112
  }));
113
+ setIsLoading(false);
105
114
  });
106
115
  return function () {
107
116
  return ac.abort();
@@ -189,7 +198,7 @@ var OrderDetail = function OrderDetail(props) {
189
198
  })]
190
199
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
191
200
  className: "body",
192
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Table.default, {
201
+ children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Table.default, {
193
202
  headers: [{
194
203
  width: 140,
195
204
  name: "UPC"
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
17
17
 
18
- var MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n top: 0;\n right: 0;\n width: 785px;\n height: 100vh;\n z-index: 5;\n background: #ffffff;\n box-sizing: border-box;\n font-family: ", ";\n & > * {\n padding: 0 30px;\n }\n .headerTitle {\n font-weight: bold;\n font-size: 25px;\n }\n\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 101px 120px 1fr 115px;\n grid-column-gap: 0px;\n grid-row-gap: 0px;\n\n .body {\n overflow-y: auto;\n }\n .footer {\n width: 100%;\n display: flex;\n align-items: center;\n height: 115px;\n border-top: 1px solid #e6e6e6;\n position: sticky;\n bottom: 0;\n padding: 20px;\n box-sizing: border-box;\n > h2 {\n margin-right: 20px;\n }\n > div {\n margin-right: 10px;\n }\n }\n"])), _variables.FontFamily.Roboto);
18
+ var MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n top: 0;\n right: 0;\n width: 785px;\n height: 100vh;\n z-index: 5;\n background: #ffffff;\n box-sizing: border-box;\n font-family: ", ";\n & > * {\n padding: 0 30px;\n }\n box-shadow: -4px 0px 8px 0px rgba(0,0,0,0.1);\n .headerTitle {\n font-weight: bold;\n font-size: 25px;\n }\n\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 101px 120px 1fr 115px;\n grid-column-gap: 0px;\n grid-row-gap: 0px;\n\n .body {\n overflow-y: auto;\n }\n .footer {\n width: 100%;\n display: flex;\n align-items: center;\n height: 115px;\n border-top: 1px solid #e6e6e6;\n position: sticky;\n bottom: 0;\n padding: 20px;\n box-sizing: border-box;\n > h2 {\n margin-right: 20px;\n }\n > div {\n margin-right: 10px;\n }\n }\n"])), _variables.FontFamily.Roboto);
19
19
 
20
20
  exports.MainContainer = MainContainer;
21
21
 
@@ -202,8 +202,8 @@ var S3_BUCKET = process.env.REACT_APP_IMAGES_BUCKET;
202
202
  var REGION = "us-east-1";
203
203
 
204
204
  _awsSdk.default.config.update({
205
- accessKeyId: process.env.REACT_APP_KEY_UPLOAD_TO_S3,
206
- secretAccessKey: process.env.REACT_APP_ACCESS_KEY_UPLOAD_TO_S3
205
+ accessKeyId: process.env.REACT_APP_KUTS3,
206
+ secretAccessKey: process.env.REACT_APP_AKUTS3
207
207
  });
208
208
 
209
209
  var myBucket = new _awsSdk.default.S3({
@@ -190,8 +190,8 @@ var S3_BUCKET = process.env.REACT_APP_IMAGES_BUCKET;
190
190
  var REGION = "us-east-1";
191
191
 
192
192
  _awsSdk.default.config.update({
193
- accessKeyId: process.env.REACT_APP_KEY_UPLOAD_TO_S3,
194
- secretAccessKey: process.env.REACT_APP_ACCESS_KEY_UPLOAD_TO_S3
193
+ accessKeyId: process.env.REACT_APP_KUTS3,
194
+ secretAccessKey: process.env.REACT_APP_AKUTS3
195
195
  });
196
196
 
197
197
  var myBucket = new _awsSdk.default.S3({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.2.99",
3
+ "version": "21.2.101",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -58,7 +58,7 @@ OrderDetailDefault.args = {
58
58
  company_name: "GRUPO BRAHMA",
59
59
  date: "2022-11-12T00:00:00.000Z",
60
60
  type: "En oficina",
61
- id_order: 1,
61
+ id_order: 5,
62
62
  status: "PA",
63
63
  total: 731.2639770507812,
64
64
  timestamp: "2022-11-12T22:48:23.000Z",
@@ -1,6 +1,7 @@
1
1
  import React, { useState, useEffect } from "react";
2
2
  import { Status } from "../../atoms/Status/index";
3
3
  import { ProgressBar } from "../../atoms/ProgressBar/index";
4
+ import { Loading } from "../../atoms/Loading/index";
4
5
  import moment from "moment";
5
6
  import "moment/locale/es";
6
7
  import {
@@ -18,6 +19,7 @@ moment.locale("es");
18
19
 
19
20
  export const OrderDetail = (props) => {
20
21
  const { order } = props;
22
+ const [isLoading, setIsLoading] = useState(true);
21
23
  const [showPaymentButton, setShowPaymentButton] = useState(
22
24
  order.payment !== "pagado"
23
25
  );
@@ -51,6 +53,7 @@ export const OrderDetail = (props) => {
51
53
 
52
54
  useEffect(() => {
53
55
  const ac = new AbortController();
56
+ setIsLoading(true);
54
57
  props.getOrderDetail &&
55
58
  props
56
59
  .getOrderDetail({ query: { orderId: order.id_order } })
@@ -75,6 +78,7 @@ export const OrderDetail = (props) => {
75
78
  });
76
79
  setOrderData(obj);
77
80
  setDataGeneral({ ...countArticles, totalArticles });
81
+ setIsLoading(false);
78
82
  });
79
83
  return () => ac.abort(); // Abort both fetches on unmount
80
84
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -155,18 +159,21 @@ export const OrderDetail = (props) => {
155
159
  </div>
156
160
  </Details>
157
161
  <div className="body">
158
- <Table
159
- headers={[
160
- { width: 140, name: "UPC" },
161
- { width: 210, name: "Nombre" },
162
- { width: 100, name: "Cadena", type: "groupImages" },
163
- { width: 130, name: "Servicios", type: "services" },
164
- { width: 70, name: "Estatus", type: "status" },
165
- { width: 65, name: "Fact.", type: "checkout" },
166
- ]}
167
- data={orderData}
168
- isProvider={props.isProvider}
169
- />
162
+ {isLoading
163
+ ? <Loading />
164
+ : <Table
165
+ headers={[
166
+ { width: 140, name: "UPC" },
167
+ { width: 210, name: "Nombre" },
168
+ { width: 100, name: "Cadena", type: "groupImages" },
169
+ { width: 130, name: "Servicios", type: "services" },
170
+ { width: 70, name: "Estatus", type: "status" },
171
+ { width: 65, name: "Fact.", type: "checkout" },
172
+ ]}
173
+ data={orderData}
174
+ isProvider={props.isProvider}
175
+ />
176
+ }
170
177
  </div>
171
178
  <div className="footer">
172
179
  <h2 className="headerTitle">Totales</h2>
@@ -14,6 +14,7 @@ export const MainContainer = styled.div`
14
14
  & > * {
15
15
  padding: 0 30px;
16
16
  }
17
+ box-shadow: -4px 0px 8px 0px rgba(0,0,0,0.1);
17
18
  .headerTitle {
18
19
  font-weight: bold;
19
20
  font-size: 25px;
@@ -114,8 +114,8 @@ const S3_BUCKET = process.env.REACT_APP_IMAGES_BUCKET;
114
114
  const REGION = "us-east-1";
115
115
 
116
116
  AWS.config.update({
117
- accessKeyId: process.env.REACT_APP_KEY_UPLOAD_TO_S3,
118
- secretAccessKey: process.env.REACT_APP_ACCESS_KEY_UPLOAD_TO_S3,
117
+ accessKeyId: process.env.REACT_APP_KUTS3,
118
+ secretAccessKey: process.env.REACT_APP_AKUTS3,
119
119
  });
120
120
 
121
121
  const myBucket = new AWS.S3({
@@ -108,8 +108,8 @@ const S3_BUCKET = process.env.REACT_APP_IMAGES_BUCKET;
108
108
  const REGION = "us-east-1";
109
109
 
110
110
  AWS.config.update({
111
- accessKeyId: process.env.REACT_APP_KEY_UPLOAD_TO_S3,
112
- secretAccessKey: process.env.REACT_APP_ACCESS_KEY_UPLOAD_TO_S3,
111
+ accessKeyId: process.env.REACT_APP_KUTS3,
112
+ secretAccessKey: process.env.REACT_APP_AKUTS3,
113
113
  });
114
114
 
115
115
  const myBucket = new AWS.S3({