Skip to content

Commit 912590d

Browse files
Merge pull request #1077 from folio-org/release_8.2.1
Release 8.2.1
2 parents 7c8efd0 + e3be3ad commit 912590d

File tree

9 files changed

+79
-20
lines changed

9 files changed

+79
-20
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change history for ui-agreements
22

3+
## 8.2.1 2022-07-29
4+
* ERM-2300 On loading entitlements for Agreement edit screen incorrect parameters are supplied
5+
* ERM-2299 Error on trying to save an agreement with a linked license
6+
* ERM-2297 Number of tags doesn't update on adding tags to agreement or agreement line
7+
* ERM-2284 Attempt to delete Agreement Line fails
8+
* ERM-2282 Toast message fails to display to user
9+
* ERM-2280 Incorrect labels in move identifiers UI
10+
311
## 8.2.0 2022-07-04
412
* ERM-2229 On creating Agreement, agreement creation view does not close after save
513
* ERM-2225 Amendment/License link status values do not update immediately after Agreement edit

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@folio/agreements",
3-
"version": "8.2.0",
3+
"version": "8.2.1",
44
"description": "ERM agreement functionality for Stripes",
55
"main": "src/index.js",
66
"publishConfig": {
@@ -80,8 +80,8 @@
8080
},
8181
"dependencies": {
8282
"@folio/stripes-acq-components": "^3.1.0",
83-
"@folio/stripes-erm-components": "^6.2.0",
84-
"@k-int/stripes-kint-components": "^2.6.5",
83+
"@folio/stripes-erm-components": "^6.2.1",
84+
"@k-int/stripes-kint-components": "^2.8.2",
8585
"@rehooks/local-storage": "2.4.4",
8686
"@testing-library/react-hooks": "^8.0.0",
8787
"compose-function": "^3.0.3",

src/routes/AgreementEditRoute/AgreementEditRoute.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ const AgreementEditRoute = ({
101101
{ path: 'id' }
102102
],
103103
},
104+
nsArray: ['ERM', 'Agreement', agreementId, 'AgreementLines', AGREEMENT_LINES_ENDPOINT, 'AgreementEditRoute'],
104105
path: AGREEMENT_LINES_ENDPOINT
105106
});
106107

src/routes/AgreementLineCreateRoute/AgreementLineCreateRoute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const AgreementLineCreateRoute = ({
3333
};
3434

3535
const { mutateAsync: postAgreementLine } = useMutation(
36-
[AGREEMENT_LINES_ENDPOINT, 'ui-agreements', 'AgreementLineCreateRoute', 'createAgreementLine'],
36+
['ERM', 'Agreement', agreementId, 'AgreementLines', 'POST', AGREEMENT_LINES_ENDPOINT],
3737
(payload) => ky.post(AGREEMENT_LINES_ENDPOINT, { json: { ...payload, owner: agreementId } }).json()
3838
.then(({ id }) => {
3939
/* Invalidate cached queries */

src/routes/AgreementLineEditRoute/AgreementLineEditRoute.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,22 @@ const AgreementLineEditRoute = ({
2727
const queryClient = useQueryClient();
2828
const isSuppressFromDiscoveryEnabled = useSuppressFromDiscovery();
2929

30+
const agreementLinePath = AGREEMENT_LINE_ENDPOINT(lineId);
31+
3032
const { data: agreementLine = {}, isLoading: isLineLoading } = useQuery(
31-
[AGREEMENT_LINE_ENDPOINT(lineId), 'getLine'],
32-
() => ky.get(AGREEMENT_LINE_ENDPOINT(lineId)).json()
33+
['ERM', 'AgreementLine', lineId, agreementLinePath],
34+
() => ky.get(agreementLinePath).json()
3335
);
3436

3537
const poLineIdsArray = (agreementLine.poLines ?? []).map(poLine => poLine.poLineId).flat();
3638
const { orderLines, isLoading: areOrderLinesLoading } = useChunkedOrderLines(poLineIdsArray);
3739

3840
const { mutateAsync: putAgreementLine } = useMutation(
39-
[AGREEMENT_LINE_ENDPOINT(lineId), 'ui-agreements', 'AgreementLineEditRoute', 'editAgreementLine'],
40-
(payload) => ky.put(AGREEMENT_LINE_ENDPOINT(lineId), { json: payload }).json()
41+
['ERM', 'AgreementLine', lineId, 'PUT', agreementLinePath],
42+
(payload) => ky.put(agreementLinePath, { json: payload }).json()
4143
.then(({ id }) => {
4244
/* Invalidate cached queries */
4345
queryClient.invalidateQueries(['ERM', 'Agreement', agreementId]);
44-
queryClient.invalidateQueries(AGREEMENT_LINE_ENDPOINT(lineId));
4546

4647
callout.sendCallout({ message: <FormattedMessage id="ui-agreements.line.update.callout" /> });
4748
history.push(`${urls.agreementLineView(agreementId, id)}${location.search}`);

src/routes/AgreementLineViewRoute/AgreementLineViewRoute.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import View from '../../components/views/AgreementLine';
1010
import { urls } from '../../components/utilities';
1111

1212
import { useAgreementsHelperApp, useChunkedOrderLines, useSuppressFromDiscovery } from '../../hooks';
13-
import { AGREEMENT_LINES_ENDPOINT, AGREEMENT_LINE_ENDPOINT } from '../../constants/endpoints';
13+
import { AGREEMENT_ENDPOINT, AGREEMENT_LINE_ENDPOINT } from '../../constants/endpoints';
1414

1515
const AgreementLineViewRoute = ({
1616
handlers,
@@ -25,19 +25,21 @@ const AgreementLineViewRoute = ({
2525
const ky = useOkapiKy();
2626

2727
const agreementLinePath = AGREEMENT_LINE_ENDPOINT(lineId);
28+
const agreementPath = AGREEMENT_ENDPOINT(agreementId);
2829

2930
const { data: agreementLine = {}, isLoading: isLineQueryLoading } = useQuery(
30-
[AGREEMENT_LINE_ENDPOINT(lineId), 'getLine'],
31+
['ERM', 'AgreementLine', lineId, agreementLinePath],
3132
() => ky.get(agreementLinePath).json()
3233
);
3334

3435
const { mutateAsync: deleteAgreementLine } = useMutation(
35-
[agreementLinePath, 'ui-agreements', 'AgreementLineViewRoute', 'deleteAgreementLine'],
36-
() => ky.put(agreementLinePath, {
36+
// As opposed to ['ERM', 'AgreementLine', lineId, 'DELETE', agreementLinePath] if we did this via a DELETE call to entitlements endpoint
37+
['ERM', 'AgreementLine', lineId, 'DELETE', agreementPath],
38+
() => ky.put(agreementPath, { json: {
3739
id: agreementId,
3840
items: [{ id: lineId, _delete: true }]
39-
}).then(() => {
40-
queryClient.invalidateQueries(AGREEMENT_LINES_ENDPOINT);
41+
} }).then(() => {
42+
queryClient.invalidateQueries('ERM', 'Agreement', agreementId); // Invalidate relevant Agreement
4143
history.push(`${urls.agreementView(agreementId)}${location.search}`);
4244
callout.sendCallout({ message: <FormattedMessage id="ui-agreements.line.delete.callout" /> });
4345
}).catch(error => {

src/routes/AgreementViewRoute/AgreementViewRoute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const AgreementViewRoute = ({
101101
results: agreementLines = [],
102102
total: agreementLineCount = 0
103103
} = useInfiniteFetch(
104-
[AGREEMENT_LINES_ENDPOINT, agreementLineQueryParams, 'ui-agreements', 'AgreementViewRoute', 'getLines'],
104+
['ERM', 'Agreement', agreementId, 'AgreementLines', AGREEMENT_LINES_ENDPOINT, agreementLineQueryParams],
105105
({ pageParam = 0 }) => {
106106
const params = [...agreementLineQueryParams, `offset=${pageParam}`];
107107
return ky.get(`${AGREEMENT_LINES_ENDPOINT}?${params?.join('&')}`).json();

translations/ui-agreements/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@
166166
"identifiers.identifiersToMove": "Identifiers(s) to be moved",
167167
"identifiers.identifierDestination": "Identifier destination",
168168
"moveIdentifiers.noPlugin": "No \"find-eresource\" plugin is installed",
169-
"updatetitlesAndMoveMore": "Update title & move more identifiers",
169+
"updatetitlesAndMoveMore": "Update titles & move more identifiers",
170170
"updateMoreIdentifierWarning": "An IdentifierReassignmentJob ({name}) has been created, and identifiers as displayed on this screen are liable to change. If you attempt to move an identifier in a subsequent IdentifierReassignmentJob that was already moved away in an earlier one, the second move will not occur. You can track the status of this job in the local-kb-admin app.",
171-
"updatetitlesAndClose": "Update title & close",
172-
"preview.updateAndContinue" : "Select \"Update titles & more identifiers\" or \"Update titles & close\" to continue",
171+
"updatetitlesAndClose": "Update titles & close",
172+
"preview.updateAndContinue" : "Select \"Update titles & move more identifiers\" or \"Update titles & close\" to continue",
173173
"warn.clearReasonForClosure": "This reason will be cleared as status is not closed",
174174
"basketButton": "View {count, number} {count, plural, one {item} other {items}}",
175175
"basket.name": "ERM basket",

translations/ui-agreements/en_US.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,5 +590,52 @@
590590
"supplementaryProperties.filterBuilder": "Supplementary property filter builder",
591591
"supplementaryProperties.filterIndex": "Supplementary property filter {index}",
592592
"supplementaryProperties.removeFilter": "Remove supplementary property filter {index}",
593-
"supplementaryProperties.deprecated": "DEPRECATED: {name}"
593+
"supplementaryProperties.deprecated": "DEPRECATED: {name}",
594+
"new": "New",
595+
"preview": "Preview",
596+
"back": "Back",
597+
"titleUpdated-callout": "<strong>title updated:</strong> {eresourceName}",
598+
"eresource.moveIdentifier": "Move identifier(s)",
599+
"eresource.moveIdentifier.noSourceTitle": "No source title selected",
600+
"eresource.moveIdentifier.noDestinationTitle": "No destination title selected",
601+
"eresource.sourceTitle": "Source title",
602+
"eresource.destinationTitle": "Destination title",
603+
"eresource.sourceTitleSelectionText": "Select the source title for the identifier(s)",
604+
"eresource.destinationTitleSelectionText": "Select the destination title for the identifier(s)",
605+
"eresource.moveIdentifier.selectTitle": "Select title",
606+
"eresource.moveIdetifiers.title": "Title",
607+
"moveIdentifiers.selectTitle": "Select title",
608+
"moveIdentifiers.replaceTitle": "Replace Title",
609+
"moveIdentifiers.replaceTitleSpecific": "Replace eresource {eresourceName}",
610+
"identifier.type": "{label} ",
611+
"identifiers.identifiersToMove": "Identifiers(s) to be moved",
612+
"identifiers.identifierDestination": "Identifier destination",
613+
"moveIdentifiers.noPlugin": "No \"find-eresource\" plugin is installed",
614+
"updatetitlesAndMoveMore": "Update titles & move more identifiers",
615+
"updateMoreIdentifierWarning": "An IdentifierReassignmentJob ({name}) has been created, and identifiers as displayed on this screen are liable to change. If you attempt to move an identifier in a subsequent IdentifierReassignmentJob that was already moved away in an earlier one, the second move will not occur. You can track the status of this job in the local-kb-admin app.",
616+
"updatetitlesAndClose": "Update titles & close",
617+
"preview.updateAndContinue" : "Select \"Update titles & move more identifiers\" or \"Update titles & close\" to continue",
618+
"settings.noOfValues": "# of values",
619+
"settings.pickList.deletePickList": "Delete pick list",
620+
"settings.pickList.deletePickListError": "There was an error deleting pick list: <strong>{label}</strong>. {error}",
621+
"settings.pickListValues.deletePickListValue": "Delete pick list value",
622+
"settings.pickListValues.deletePickListValueError": "There was an error deleting pick list value: <strong>{label}</strong>. {error}",
623+
"settings.supplementaryProperties.category": "Category",
624+
"settings.supplementaryProperties.pickList": "Pick list",
625+
"settings.supplementaryProperties.multiPickList": "Pick list (multi-select)",
626+
"settings.supplementaryProperties.deleteError": "There was an error deleting supplementary property: <strong>{label}</strong>. {error}",
627+
"supplementaryProperty.help.category": "Supplementary properties can be categorised. Each category will appear as a separate accordion when viewing or editing the agreement.",
628+
"supplementaryProperty.editModal": "Edit supplementary property",
629+
"supplementaryProperty.newModal": "New supplementary property",
630+
"job.created.success.org.olf.general.jobs.IdentifierReassignmentJob": "<strong>Title updated: {sourceTitleName} </strong>",
631+
"job.created.success.org.olf.general.jobs.destination": "<strong>Title updated: {destinationTitleName} </strong>",
632+
"eresources.filters.titleFilters": "Title filters",
633+
"eresources.filters.packageFilters": "Package filters",
634+
"eresources.scope": "Scope",
635+
"packageIdentifiers.isil": "ISIL",
636+
"packageIdentifiers.zdb": "ZDB",
637+
"packageIdentifiers.ezb": "EZB",
638+
"packageIdentifiers.eBookPool": "E-Book Pool",
639+
"packageIdentifiers.gokbId": "GOKb ID",
640+
"packageIdentifiers.gokbUUID": "GOKb UUID"
594641
}

0 commit comments

Comments
 (0)