Skip to content

Commit 90d316c

Browse files
authored
v2.9.2 (#76)
* update release showViz to be based on DOI status * prepare v2.9.2
1 parent 832e586 commit 90d316c

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

lib/service/ReleaseService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ exports.default = exports.PROVISIONAL_RELEASE = exports.LATEST_AND_PROVISIONAL =
77
var _NeonContextService = _interopRequireDefault(require("./NeonContextService"));
88
var _typeUtil = require("../util/typeUtil");
99
var _internal = require("../types/internal");
10+
var _neonApi = require("../types/neonApi");
1011
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1112
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1213
const LATEST_AND_PROVISIONAL = exports.LATEST_AND_PROVISIONAL = 'LATEST_AND_PROVISIONAL';
@@ -126,7 +127,7 @@ const ReleaseService = {
126127
description: appliedDoiStatus.release,
127128
showCitation: true,
128129
showDoi: true,
129-
showViz: false
130+
showViz: (0, _typeUtil.exists)(appliedDoiStatus.status) && appliedDoiStatus.status === _neonApi.DoiStatusType.FINDABLE
130131
};
131132
return transformed;
132133
},

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "portal-core-components",
3-
"version": "2.9.1",
3+
"version": "2.9.2",
44
"main": "./lib/index.js",
55
"private": true,
66
"homepage": "http://localhost:3010/core-components",

src/lib_components/service/ReleaseService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import NeonContextService from './NeonContextService';
22
import { exists, existsNonEmpty, isStringNonEmpty } from '../util/typeUtil';
33
import { UserRelease } from '../types/neonContext';
44
import { Release as InternalRelease, IReleaseLike, ReleaseProps } from '../types/internal';
5-
import { DataProductDoiStatus, DataProductRelease } from '../types/neonApi';
5+
import { DataProductDoiStatus, DataProductRelease, DoiStatusType } from '../types/neonApi';
66
import { Nullable } from '../types/core';
77

88
export const LATEST_AND_PROVISIONAL = 'LATEST_AND_PROVISIONAL';
@@ -223,7 +223,8 @@ const ReleaseService: IReleaseService = {
223223
description: appliedDoiStatus.release,
224224
showCitation: true,
225225
showDoi: true,
226-
showViz: false,
226+
showViz: exists(appliedDoiStatus.status)
227+
&& (appliedDoiStatus.status === DoiStatusType.FINDABLE),
227228
};
228229
return transformed as IReleaseLike;
229230
},

0 commit comments

Comments
 (0)