@truedat/dd 5.6.0 → 5.6.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "5.6.0",
3
+ "version": "5.6.2",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.5",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "5.6.0",
37
+ "@truedat/test": "5.6.2",
38
38
  "babel-jest": "^28.1.0",
39
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
40
40
  "babel-plugin-lodash": "^3.3.4",
@@ -87,9 +87,9 @@
87
87
  },
88
88
  "dependencies": {
89
89
  "@apollo/client": "^3.7.1",
90
- "@truedat/auth": "5.6.0",
91
- "@truedat/core": "5.6.0",
92
- "@truedat/df": "5.6.0",
90
+ "@truedat/auth": "5.6.2",
91
+ "@truedat/core": "5.6.2",
92
+ "@truedat/df": "5.6.2",
93
93
  "lodash": "^4.17.21",
94
94
  "moment": "^2.29.4",
95
95
  "path-to-regexp": "^1.7.0",
@@ -114,5 +114,5 @@
114
114
  "react-dom": ">= 16.8.6 < 17",
115
115
  "semantic-ui-react": ">= 2.0.3 < 2.2"
116
116
  },
117
- "gitHead": "9244992120b9b892ca893c14062bb1396b815200"
117
+ "gitHead": "a667767fbb979e9c12142aabad58f49d3fb68fea"
118
118
  }
@@ -4,7 +4,7 @@ import React, { useState, useEffect } from "react";
4
4
  import { Link, useLocation, useHistory } from "react-router-dom";
5
5
  import PropTypes from "prop-types";
6
6
  import { connect } from "react-redux";
7
- import { useIntl } from "react-intl";
7
+ import { FormattedMessage, useIntl } from "react-intl";
8
8
  import {
9
9
  Segment,
10
10
  List,
@@ -123,14 +123,19 @@ export const StructureGrantCart = ({
123
123
  />
124
124
  ))}
125
125
  </List.List>
126
- {!inCartCheckout && (
127
- <>
128
- <Divider />
129
- <Button as={Link} to={linkTo.GRANTS_REQUESTS_CHECKOUT()}>
130
- {formatMessage({ id: `structure.grant.cart.checkout` })}
131
- </Button>
132
- </>
133
- )}
126
+ {!inCartCheckout &&
127
+ (_.isEmpty(grantRequestsCart?.structures) ? (
128
+ <p>
129
+ <FormattedMessage id={`structure.grant.cart.empty`} />
130
+ </p>
131
+ ) : (
132
+ <>
133
+ <Divider />
134
+ <Button as={Link} to={linkTo.GRANTS_REQUESTS_CHECKOUT()}>
135
+ {formatMessage({ id: `structure.grant.cart.checkout` })}
136
+ </Button>
137
+ </>
138
+ ))}
134
139
  </Segment>
135
140
  );
136
141
  };
@@ -299,16 +299,9 @@ exports[`<StructuresGrantRequestView /> Clicking a grant request button triggers
299
299
  <div
300
300
  class="list"
301
301
  />
302
- <div
303
- class="ui divider"
304
- />
305
- <a
306
- class="ui button"
307
- href="/grantsRequests/checkout"
308
- role="button"
309
- >
310
- Checkout
311
- </a>
302
+ <p>
303
+ Select structures for which grants will be requested
304
+ </p>
312
305
  </div>
313
306
  </div>
314
307
  </div>
@@ -314,6 +314,8 @@ export default {
314
314
  "structure.grant.cancel_grant_request": "Cancel request",
315
315
  "structure.grant.cart": "Requested grants",
316
316
  "structure.grant.cart.checkout": "Checkout",
317
+ "structure.grant.cart.empty":
318
+ "Select structures for which grants will be requested",
317
319
  "structure.grant.cart.template": "Request information",
318
320
  "structure.grant.cart.template.placeholder": "Select request type",
319
321
  "structure.grant.cart.filters": "Filters for structure",
@@ -323,6 +323,8 @@ export default {
323
323
  "structure.grant.cancel_grant_request": "Cancelar solicitud",
324
324
  "structure.grant.cart": "Accesos a solicitar",
325
325
  "structure.grant.cart.checkout": "Checkout",
326
+ "structure.grant.cart.empty":
327
+ "Seleccione estructuras para las que se pedirán accesos",
326
328
  "structure.grant.cart.template": "Información de solicitud",
327
329
  "structure.grant.cart.template.placeholder": "Seleccione tipo de solicitud",
328
330
  "structure.grant.cart.filters": "Filtros para la estructura",