Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIBULKED-403 add missed permissions and clean state between tabs change #466

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@
"inventory-storage.item-note-types.item.get",
"inventory-storage.call-number-types.item.get",
"inventory-storage.call-number-types.item.get",
"inventory-storage.electronic-access-relationships.item.get"
"inventory-storage.electronic-access-relationships.item.get",
"fqm.entityTypes.collection.get",
"fqm.entityTypes.item.get",
"fqm.entityTypes.item.columnValues.get",
"fqm.query.async.results.get",
"fqm.query.async.post",
"fqm.query.async.delete"
],
"visible": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

const applyFiltersAdapter = (callBack) => ({ name, values }) => callBack(name, values);

const adaptedApplyFilters = useCallback(

Check warning on line 100 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead

Check warning on line 100 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead
applyFiltersAdapter(applyFilters),
[applyFilters],
);
Expand Down Expand Up @@ -151,9 +151,12 @@
};

const handleCriteriaChange = (value) => {
setFilters(prev => ({ ...prev, criteria: value }));
const newFilterValue = { capabilities: null, recordTypes: null, criteria: value };

setFilters(prev => ({ ...prev, ...newFilterValue }));

history.replace({
search: buildSearch({ criteria: value }, location.search),
search: buildSearch(newFilterValue, location.search),
});
};

Expand Down Expand Up @@ -187,7 +190,7 @@
setVisibleColumns(null);
setIsFileUploaded(false);
setInAppCommitted(false);
}, [location.search]);

Check warning on line 193 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useCallback has missing dependencies: 'criteria', 'handleChange', 'history', 'initialCapabilities', 'logFilters', 'setInAppCommitted', 'setIsFileUploaded', and 'setVisibleColumns'. Either include them or remove the dependency array. If 'setIsFileUploaded' changes too often, find the parent component that defines it and wrap that definition in useCallback

Check warning on line 193 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useCallback has missing dependencies: 'criteria', 'handleChange', 'history', 'initialCapabilities', 'logFilters', 'setInAppCommitted', 'setIsFileUploaded', and 'setVisibleColumns'. Either include them or remove the dependency array. If 'setIsFileUploaded' changes too often, find the parent component that defines it and wrap that definition in useCallback

const uploadFileFlow = async (fileToUpload) => {
try {
Expand Down Expand Up @@ -230,7 +233,7 @@
const messagePrefix = recordIdentifier ? `.${recordIdentifier}` : '';

return <FormattedMessage id={`ui-bulk-edit.uploaderSubTitle${TRANSLATION_SUFFIX[capabilities]}${messagePrefix}`} />;
}, [recordIdentifier]);

Check warning on line 236 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useMemo has a missing dependency: 'capabilities'. Either include it or remove the dependency array

Check warning on line 236 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useMemo has a missing dependency: 'capabilities'. Either include it or remove the dependency array

useEffect(() => {
if (isFileUploaded || !recordIdentifier || initialFileName) {
Expand All @@ -238,7 +241,7 @@
} else {
setIsDropZoneDisabled(false);
}
}, [isFileUploaded, recordIdentifier]);

Check warning on line 244 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useEffect has a missing dependency: 'initialFileName'. Either include it or remove the dependency array

Check warning on line 244 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useEffect has a missing dependency: 'initialFileName'. Either include it or remove the dependency array

useEffect(() => {
const identifier = search.get('identifier');
Expand All @@ -250,7 +253,7 @@
if (initialCapabilities) {
handleChange(initialCapabilities, 'capabilities');
}
}, [location.search]);

Check warning on line 256 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useEffect has missing dependencies: 'handleChange', 'initialCapabilities', and 'search'. Either include them or remove the dependency array

Check warning on line 256 in src/components/BulkEditList/BulkEditListFilters/BulkEditListFilters.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useEffect has missing dependencies: 'handleChange', 'initialCapabilities', and 'search'. Either include them or remove the dependency array

const renderCapabilities = () => (
<Capabilities
Expand Down
1 change: 1 addition & 0 deletions translations/ui-bulk-edit/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"list.errors.table.message": "Reason for error",

"uploaderBtnText": "or choose file",
"uploaderSubTitle": "Select a file with record identifiers",
"uploaderSubTitle.empty": "Select a file with record identifiers",
"uploaderSubTitle.item": "Select a file with record identifiers",
"uploaderSubTitle.user": "Select a file with record identifiers",
Expand Down
Loading