@truedat/lm 6.9.2 → 6.9.4

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/lm",
3
- "version": "6.9.2",
3
+ "version": "6.9.4",
4
4
  "description": "Truedat Link Manager",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -86,7 +86,7 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "6.9.2",
89
+ "@truedat/core": "6.9.4",
90
90
  "path-to-regexp": "^1.7.0",
91
91
  "prop-types": "^15.8.1",
92
92
  "react-graph-vis": "1.0.6",
@@ -107,5 +107,5 @@
107
107
  "react-dom": ">= 16.8.6 < 17",
108
108
  "semantic-ui-react": ">= 2.0.3 < 2.2"
109
109
  },
110
- "gitHead": "c30fbd857a33bcb122f134c0fdbc425ca6c7cc00"
110
+ "gitHead": "7d6b440dd9af26cf2dcf21ad4c321f845c40e9b3"
111
111
  }
@@ -2,7 +2,7 @@ import _ from "lodash/fp";
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { connect } from "react-redux";
5
- import { Table, Button, Grid, Segment } from "semantic-ui-react";
5
+ import { Table, Icon, Button, Grid, Segment, Header } from "semantic-ui-react";
6
6
  import { FormattedMessage } from "react-intl";
7
7
  import { Link } from "react-router-dom";
8
8
  import { linkTo } from "@truedat/core/routes";
@@ -101,7 +101,14 @@ export const ImplementationLinks = ({
101
101
  tableData={implementationLinks}
102
102
  />
103
103
  </Grid.Column>
104
- ) : null}
104
+ ) : (
105
+ <Header as="h4">
106
+ <Icon name="search" />
107
+ <Header.Content>
108
+ <FormattedMessage id="implementations.linked_concepts.empty" />
109
+ </Header.Content>
110
+ </Header>
111
+ )}
105
112
  </Grid>
106
113
  </Segment>
107
114
  );
@@ -113,12 +120,33 @@ ImplementationLinks.propTypes = {
113
120
  implementationLinks: PropTypes.array,
114
121
  };
115
122
 
116
- const mapStateToProps = (state) => ({
117
- implementation: state.ruleImplementation,
118
- implementationLinks: _.sortBy(accentInsensitivePathOrder("name"))(
123
+ const mapStateToProps = (state) => {
124
+ const implementationLinks = _.sortBy(accentInsensitivePathOrder("name"))(
119
125
  getImplementationToConceptLinks(state)
120
- ),
121
- canCreateLink: _.propOr(false, "link_concept")(state.implementationActions),
122
- });
126
+ );
127
+
128
+ const filteredImplementationLinks = _.filter((link) => {
129
+ return (
130
+ (link.status == "published" &&
131
+ _.propOr(
132
+ false,
133
+ "view_published_concept"
134
+ )(state.implementationActions)) ||
135
+ (link.status == "draft" &&
136
+ _.propOr(false, "view_draft_concept")(state.implementationActions)) ||
137
+ (link.status == "pending_approval" &&
138
+ _.propOr(
139
+ false,
140
+ "view_approval_pending_concept"
141
+ )(state.implementationActions))
142
+ );
143
+ })(implementationLinks);
144
+
145
+ return {
146
+ implementation: state.ruleImplementation,
147
+ implementationLinks: filteredImplementationLinks,
148
+ canCreateLink: _.propOr(false, "link_concept")(state.implementationActions),
149
+ };
150
+ };
123
151
 
124
152
  export default connect(mapStateToProps)(ImplementationLinks);
@@ -20,7 +20,7 @@ const ConceptSelector = React.lazy(() =>
20
20
 
21
21
  const filters = {
22
22
  current: [true],
23
- status: ["pending_approval", "draft", "rejected", "published"],
23
+ status: ["pending_approval", "draft", "published"],
24
24
  };
25
25
 
26
26
  export const ImplementationRelationForm = ({
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "implementations.relation.new.header": "Link to Concept",
3
+ "implementations.linked_concepts.empty": "No linked business concepts found",
3
4
  "links.actions.create": "Add Link",
4
5
  "relations.actions.create": "Add relation",
5
6
  "relations.empty": "Not found relations",
@@ -1,4 +1,5 @@
1
1
  export default {
2
+ "implementations.linked_concepts.empty": "No hay conceptos relacionados",
2
3
  "implementations.relation.new.header":
3
4
  "Vas a vincular esta implementación a un término del glosario",
4
5
  "links.actions.create": "Añadir vinculación",