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

EPMRPP-98477 || No results found is displayed instead of No assignmen… #4155

Merged
merged 2 commits into from
Jan 14, 2025
Merged
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
1 change: 1 addition & 0 deletions app/localization/translated/be.json
Original file line number Diff line number Diff line change
@@ -1544,6 +1544,7 @@
"OrganizationsControl.all": "Усе",
"OrganizationsControl.allOrganizations": "Усе арганізацыі",
"OrganizationsControl.assignmentsList": "Прызначаны спіс",
"OrganizationsControl.noAssignments": "Ніякіх прызначэнняў",
"OrganizationsControl.organization": "Арганізацыя",
"OrganizationsFilter.lastRunDate": "Дата апошняга запуску",
"OrganizationsFilter.lastRunDatePlaceholder": "Любая",
1 change: 1 addition & 0 deletions app/localization/translated/es.json
Original file line number Diff line number Diff line change
@@ -1544,6 +1544,7 @@
"OrganizationsControl.all": "All",
"OrganizationsControl.allOrganizations": "All organizations",
"OrganizationsControl.assignmentsList": "Assignments list",
"OrganizationsControl.noAssignments": "No assignments",
"OrganizationsControl.organization": "Organization",
"OrganizationsFilter.lastRunDate": "Last Run Date",
"OrganizationsFilter.lastRunDatePlaceholder": "Any",
1 change: 1 addition & 0 deletions app/localization/translated/ru.json
Original file line number Diff line number Diff line change
@@ -1544,6 +1544,7 @@
"OrganizationsControl.all": "Все",
"OrganizationsControl.allOrganizations": "Все организации",
"OrganizationsControl.assignmentsList": "Назначенный список",
"OrganizationsControl.noAssignments": "Никаких назначений",
"OrganizationsControl.organization": "Организация",
"OrganizationsFilter.lastRunDate": "Дата последнего запуска",
"OrganizationsFilter.lastRunDatePlaceholder": "Любой",
1 change: 1 addition & 0 deletions app/localization/translated/uk.json
Original file line number Diff line number Diff line change
@@ -1544,6 +1544,7 @@
"OrganizationsControl.all": "Всі",
"OrganizationsControl.allOrganizations": "Всі організації",
"OrganizationsControl.assignmentsList": "Призначений список",
"OrganizationsControl.noAssignments": "Ніяких призначень",
"OrganizationsControl.organization": "Організація",
"OrganizationsFilter.lastRunDate": "Last Run Date",
"OrganizationsFilter.lastRunDatePlaceholder": "Будь-який",
1 change: 1 addition & 0 deletions app/localization/translated/zh.json
Original file line number Diff line number Diff line change
@@ -1544,6 +1544,7 @@
"OrganizationsControl.all": "All",
"OrganizationsControl.allOrganizations": "All organizations",
"OrganizationsControl.assignmentsList": "Assignments list",
"OrganizationsControl.noAssignments": "No assignments",
"OrganizationsControl.organization": "组织",
"OrganizationsFilter.lastRunDate": "Last Run Date",
"OrganizationsFilter.lastRunDatePlaceholder": "Any",
Original file line number Diff line number Diff line change
@@ -48,6 +48,10 @@ export const messages = defineMessages({
id: 'OrganizationsControl.assignmentsList',
defaultMessage: 'Assignments list',
},
noAssignments: {
id: 'OrganizationsControl.noAssignments',
defaultMessage: 'No assignments',
},
});

export const OrganizationsPopover = ({ closePopover, closeSidebar }) => {
@@ -106,7 +110,7 @@ export const OrganizationsPopover = ({ closePopover, closeSidebar }) => {
return (
<div className={cx('organizations-popover')}>
<div className={cx('organizations-search')}>
{filteredProjects.length > 0 && (
{availableProjects.length > 0 && (
<ThemeProvider theme="dark">
<FieldText
startIcon={<SearchIcon />}
@@ -171,7 +175,9 @@ export const OrganizationsPopover = ({ closePopover, closeSidebar }) => {
))
) : (
<div className={cx('organizations-empty-state')}>
{formatMessage(COMMON_LOCALE_KEYS.NO_RESULTS)}
{availableProjects.length > 0
? formatMessage(COMMON_LOCALE_KEYS.NO_RESULTS)
: formatMessage(messages.noAssignments)}
</div>
)}
</ScrollWrapper>

Unchanged files with check annotations Beta

useEffect(() => {
const { key, value } = attribute;
setState({ key, value, errors: getValidationErrors(key, value), isKeyEdited: false });
}, [attribute]);

Check warning on line 81 in app/src/componentLibrary/attributeEditor/attributeEditor.jsx

GitHub Actions / build (20)

React Hook useEffect has a missing dependency: 'getValidationErrors'. Either include it or remove the dependency array
const byKeyComparator = (attr, item, key, value) => attr.key === item && attr.value === value;
if (defaultOpen && !attributes.length) {
handleAddNew();
}
}, [disabled, attributes]);

Check warning on line 46 in app/src/componentLibrary/attributeList/editableAttributeList.jsx

GitHub Actions / build (20)

React Hook useEffect has missing dependencies: 'defaultOpen' and 'handleAddNew'. Either include them or remove the dependency array
const handleChange = (attr) => {
onChange(attr);
useEffect(() => {
clearItemsError();
}, [value]);

Check warning on line 67 in app/src/componentLibrary/autocompletes/multipleAutocomplete/multipleAutocomplete.jsx

GitHub Actions / build (20)

React Hook useEffect has a missing dependency: 'clearItemsError'. Either include it or remove the dependency array. If 'clearItemsError' changes too often, find the parent component that defines it and wrap that definition in useCallback
const handleChange = (...args) => {
updatePosition?.();
label: formatMessage(COMMON_LOCALE_KEYS[monthValue]),
});
}, []),
[],

Check warning on line 57 in app/src/componentLibrary/datePicker/header/datePickerHeader.jsx

GitHub Actions / build (20)

React Hook useMemo has a missing dependency: 'formatMessage'. Either include it or remove the dependency array
);
const yearDropdownOptions = useMemo(() => {
(acc, yearValue) => acc.concat({ value: yearValue, label: yearValue }),
[],
);
}, []);

Check warning on line 66 in app/src/componentLibrary/datePicker/header/datePickerHeader.jsx

GitHub Actions / build (20)

React Hook useMemo has a missing dependency: 'year'. Either include it or remove the dependency array
const displayedYear = yearDropdownOptions.find(({ value }) => value === year);
if (Component) {
setComponent(null);
}
}, [key]);

Check warning on line 51 in app/src/components/extensionLoader/hooks.js

GitHub Actions / build (20)

React Hook React.useEffect has a missing dependency: 'Component'. Either include it or remove the dependency array
React.useEffect(() => {
if (ready && !Component) {
const LoadedComponent = React.lazy(loadComponent(scope, moduleName));
setComponent(LoadedComponent);
}
}, [Component, ready, key]);

Check warning on line 58 in app/src/components/extensionLoader/hooks.js

GitHub Actions / build (20)

React Hook React.useEffect has missing dependencies: 'moduleName' and 'scope'. Either include them or remove the dependency array
return { failed, Component };
};
if (loaded) {
sendRpContext();
}
}, [loaded, userInfo, projectInfo]);

Check warning on line 47 in app/src/components/extensionLoader/standaloneExtensionLoader/standaloneExtensionLoader.jsx

GitHub Actions / build (20)

React Hook useEffect has a missing dependency: 'sendRpContext'. Either include it or remove the dependency array
return (
<iframe
if (searchValue === null && filter) {
setSearchValue(filter);
}
}, []);

Check warning on line 59 in app/src/components/fields/searchField/searchField.jsx

GitHub Actions / build (20)

React Hook useEffect has missing dependencies: 'filter', 'searchValue', and 'setSearchValue'. Either include them or remove the dependency array. If 'setSearchValue' changes too often, find the parent component that defines it and wrap that definition in useCallback
const handleBlur = (e) => {
setIsSearchActive(false);
[entities, defaultPagination, prefixQueryKey, updateFilters],
);
const debouncedHandleChange = useCallback(debounce(handleChange, debounceTime), [

Check warning on line 45 in app/src/components/filterEntities/containers/filterEntitiesURLContainer.jsx

GitHub Actions / build (20)

React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead
handleChange,
debounceTime,
]);