Skip to content

Commit

Permalink
EPMRPP-91556 || Filter organization
Browse files Browse the repository at this point in the history
  • Loading branch information
BlazarQSO committed Dec 2, 2024
1 parent f8490c0 commit 8ef4f2a
Show file tree
Hide file tree
Showing 46 changed files with 1,437 additions and 39 deletions.
27 changes: 27 additions & 0 deletions app/localization/translated/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,17 @@
"Filter.name": "Назва",
"Filter.namePlaceholder": "Увядзіце назву фільтра",
"FilterAdd.addTitle": "Дадаць новы фільтр",
"FilterButton.any": "Any",
"FilterButton.contains": "Contains",
"FilterButton.equals": "Equals",
"FilterButton.greaterOrEqual": "Greater or equal",
"FilterButton.lessOrEqual": "Less or equal",
"FilterButton.last2days": "Last 2 days",
"FilterButton.last7days": "Last 7 days",
"FilterButton.last30days": "Last 30 days",
"FilterButton.notContains": "Not contains",
"FilterButton.notEqual": "Not equal",
"FilterButton.today": "Today",
"FilterEdit.editTitle": "Рэдагаваць фільтр",
"FilterNameById.statistics$defects$automation_bug": "Automation Bug",
"FilterNameById.statistics$defects$no_defect": "No Defect",
Expand Down Expand Up @@ -1566,6 +1577,14 @@
"OrganizationsControl.all": "Усе",
"OrganizationsControl.allOrganizations": "Усе арганізацыі",
"OrganizationsControl.organization": "Арганізацыя",
"OrganizationsFilter.lastRunDate": "Last Run Date",
"OrganizationsFilter.lastRunDatePlaceholder": "Any",
"OrganizationsFilter.launches": "Launches",
"OrganizationsFilter.launchesPlaceholder": "Enter the number of launches",
"OrganizationsFilter.name": "Organization Name",
"OrganizationsFilter.namePlaceholder": "Enter part of the name",
"OrganizationsFilter.users": "Users",
"OrganizationsFilter.usersPlaceholder": "Enter the number of members",
"OrganizationsItem.open": "адкрыць",
"OrganizationsPage.title": "Усе арганізацыі",
"OrganizationsPage.description": "Спіс даступных вам арганізацый у дадзены момант пусты. Калі ласка, звяжыцеся са сваім адміністратарам, каб атрымаць прызначэнне ва ўжо існуючую арганізацыю.",
Expand Down Expand Up @@ -1794,6 +1813,14 @@
"ProjectsGrid.nameCol": "Назва",
"ProjectsGrid.organizationCol": "Арганізацыя",
"ProjectsGrid.projectTypeCol": "Тып праекта",
"ProjectsFilter.lastRunDate": "Last Run Date",
"ProjectsFilter.lastRunDatePlaceholder": "Any",
"ProjectsFilter.launches": "Launches",
"ProjectsFilter.launchesPlaceholder": "Enter the number of launches",
"ProjectsFilter.name": "Project Name",
"ProjectsFilter.namePlaceholder": "Enter part of the name",
"ProjectsFilter.users": "Teammates",
"ProjectsFilter.usersPlaceholder": "Enter the number of members",
"ProjectsPage.addProject": "Дадаць Праект",
"ProjectsPage.addProjectSuccess": "Праект ''{name}'' быў паспяхова створаны",
"ProjectsPage.addProjectTitle": "Дадаць Праект",
Expand Down
27 changes: 27 additions & 0 deletions app/localization/translated/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,17 @@
"Filter.name": "Nombre",
"Filter.namePlaceholder": "Introduce el nombre del filtro",
"FilterAdd.addTitle": "Agregar nuevo filtro",
"FilterButton.any": "Any",
"FilterButton.contains": "Contains",
"FilterButton.equals": "Equals",
"FilterButton.greaterOrEqual": "Greater or equal",
"FilterButton.lessOrEqual": "Less or equal",
"FilterButton.last2days": "Last 2 days",
"FilterButton.last7days": "Last 7 days",
"FilterButton.last30days": "Last 30 days",
"FilterButton.notContains": "Not contains",
"FilterButton.notEqual": "Not equal",
"FilterButton.today": "Today",
"FilterEdit.editTitle": "Editar filtro",
"FilterNameById.statistics$defects$automation_bug": "Error de automatización",
"FilterNameById.statistics$defects$no_defect": "Sin defecto",
Expand Down Expand Up @@ -1564,6 +1575,14 @@
"OrganizationsControl.all": "All",
"OrganizationsControl.allOrganizations": "All organizations",
"OrganizationsControl.organization": "Organization",
"OrganizationsFilter.lastRunDate": "Last Run Date",
"OrganizationsFilter.lastRunDatePlaceholder": "Any",
"OrganizationsFilter.launches": "Launches",
"OrganizationsFilter.launchesPlaceholder": "Enter the number of launches",
"OrganizationsFilter.name": "Organization Name",
"OrganizationsFilter.namePlaceholder": "Enter part of the name",
"OrganizationsFilter.users": "Users",
"OrganizationsFilter.usersPlaceholder": "Enter the number of members",
"OrganizationsItem.open": "open",
"OrganizationsPage.title": "All Organizations",
"OrganizationsPage.description": "The list of organizations available to you is currently empty. Please contact your Administrator to be assigned to an existing one.",
Expand Down Expand Up @@ -1792,6 +1811,14 @@
"ProjectsGrid.nameCol": "Nombre",
"ProjectsGrid.organizationCol": "Organización",
"ProjectsGrid.projectTypeCol": "Tipo de proyecto",
"ProjectsFilter.lastRunDate": "Last Run Date",
"ProjectsFilter.lastRunDatePlaceholder": "Any",
"ProjectsFilter.launches": "Launches",
"ProjectsFilter.launchesPlaceholder": "Enter the number of launches",
"ProjectsFilter.name": "Project Name",
"ProjectsFilter.namePlaceholder": "Enter part of the name",
"ProjectsFilter.users": "Teammates",
"ProjectsFilter.usersPlaceholder": "Enter the number of members",
"ProjectsPage.addProject": "Crear Proyecto",
"ProjectsPage.addProjectSuccess": "El proyecto ''{name}'' ha sido creado exitosamente",
"ProjectsPage.addProjectTitle": "Agregar Proyecto",
Expand Down
27 changes: 27 additions & 0 deletions app/localization/translated/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,17 @@
"Filter.name": "Имя",
"Filter.namePlaceholder": "Ввести имя фильтра",
"FilterAdd.addTitle": "Добавить новый фильтр",
"FilterButton.any": "Any",
"FilterButton.contains": "Contains",
"FilterButton.equals": "Equals",
"FilterButton.greaterOrEqual": "Greater or equal",
"FilterButton.lessOrEqual": "Less or equal",
"FilterButton.last2days": "Last 2 days",
"FilterButton.last7days": "Last 7 days",
"FilterButton.last30days": "Last 30 days",
"FilterButton.notContains": "Not contains",
"FilterButton.notEqual": "Not equal",
"FilterButton.today": "Today",
"FilterEdit.editTitle": "Редактировать фильтр",
"FilterNameById.statistics$defects$automation_bug": "Automation Bug",
"FilterNameById.statistics$defects$no_defect": "No Defect",
Expand Down Expand Up @@ -1561,6 +1572,14 @@
"OrganizationsControl.all": "Все",
"OrganizationsControl.allOrganizations": "Все организации",
"OrganizationsControl.organization": "Организация",
"OrganizationsFilter.lastRunDate": "Last Run Date",
"OrganizationsFilter.lastRunDatePlaceholder": "Any",
"OrganizationsFilter.launches": "Launches",
"OrganizationsFilter.launchesPlaceholder": "Enter the number of launches",
"OrganizationsFilter.name": "Organization Name",
"OrganizationsFilter.namePlaceholder": "Enter part of the name",
"OrganizationsFilter.users": "Users",
"OrganizationsFilter.usersPlaceholder": "Enter the number of members",
"OrganizationsItem.open": "открыть",
"OrganizationsPage.title": "Все организации",
"OrganizationsPage.description": "Список доступных вам организаций в данный момент пуст. Пожалуйста, свяжитесь со своим администратором, чтобы получить назначение в уже существующую организацию.",
Expand Down Expand Up @@ -1789,6 +1808,14 @@
"ProjectsGrid.nameCol": "Название",
"ProjectsGrid.organizationCol": "Организация",
"ProjectsGrid.projectTypeCol": "Тип проекта",
"ProjectsFilter.lastRunDate": "Last Run Date",
"ProjectsFilter.lastRunDatePlaceholder": "Any",
"ProjectsFilter.launches": "Launches",
"ProjectsFilter.launchesPlaceholder": "Enter the number of launches",
"ProjectsFilter.name": "Project Name",
"ProjectsFilter.namePlaceholder": "Enter part of the name",
"ProjectsFilter.users": "Teammates",
"ProjectsFilter.usersPlaceholder": "Enter the number of members",
"ProjectsPage.addProject": "Создать Проект",
"ProjectsPage.addProjectSuccess": "Проект ''{name}'' успешно создан",
"ProjectsPage.addProjectTitle": "Добавить Проект",
Expand Down
27 changes: 27 additions & 0 deletions app/localization/translated/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,17 @@
"Filter.name": "Ім’я",
"Filter.namePlaceholder": "Ввести ім’я фільтра",
"FilterAdd.addTitle": "Додати новий фільтр",
"FilterButton.any": "Any",
"FilterButton.contains": "Contains",
"FilterButton.equals": "Equals",
"FilterButton.greaterOrEqual": "Greater or equal",
"FilterButton.lessOrEqual": "Less or equal",
"FilterButton.last2days": "Last 2 days",
"FilterButton.last7days": "Last 7 days",
"FilterButton.last30days": "Last 30 days",
"FilterButton.notContains": "Not contains",
"FilterButton.notEqual": "Not equal",
"FilterButton.today": "Today",
"FilterEdit.editTitle": "Редагувати фільтр",
"FilterNameById.statistics$defects$automation_bug": "Помилка Автоматизації",
"FilterNameById.statistics$defects$no_defect": "Ніякої Дефект",
Expand Down Expand Up @@ -1563,6 +1574,14 @@
"OrganizationsControl.all": "Всі",
"OrganizationsControl.allOrganizations": "Всі організації",
"OrganizationsControl.organization": "Організація",
"OrganizationsFilter.lastRunDate": "Last Run Date",
"OrganizationsFilter.lastRunDatePlaceholder": "Any",
"OrganizationsFilter.launches": "Launches",
"OrganizationsFilter.launchesPlaceholder": "Enter the number of launches",
"OrganizationsFilter.name": "Organization Name",
"OrganizationsFilter.namePlaceholder": "Enter part of the name",
"OrganizationsFilter.users": "Users",
"OrganizationsFilter.usersPlaceholder": "Enter the number of members",
"OrganizationsItem.open": "відкрити",
"OrganizationsPage.title": "Всі організації",
"OrganizationsPage.description": "Список доступних вам організацій в даний момент порожній. Будь ласка, зв'яжіться зі своїм адміністратором, щоб отримати призначення в уже існуючу організацію.",
Expand Down Expand Up @@ -1791,6 +1810,14 @@
"ProjectsGrid.nameCol": "Назва",
"ProjectsGrid.organizationCol": "Організація",
"ProjectsGrid.projectTypeCol": "Тип проекту",
"ProjectsFilter.lastRunDate": "Last Run Date",
"ProjectsFilter.lastRunDatePlaceholder": "Any",
"ProjectsFilter.launches": "Launches",
"ProjectsFilter.launchesPlaceholder": "Enter the number of launches",
"ProjectsFilter.name": "Project Name",
"ProjectsFilter.namePlaceholder": "Enter part of the name",
"ProjectsFilter.users": "Teammates",
"ProjectsFilter.usersPlaceholder": "Enter the number of members",
"ProjectsPage.addProject": "Створити Проект",
"ProjectsPage.addProjectSuccess": "Проект ''{name}'' успешно создан",
"ProjectsPage.addProjectTitle": "Проект Додати",
Expand Down
27 changes: 27 additions & 0 deletions app/localization/translated/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,17 @@
"Filter.name": "名称",
"Filter.namePlaceholder": "请输入过滤器名称",
"FilterAdd.addTitle": "添加新过滤器",
"FilterButton.any": "Any",
"FilterButton.contains": "Contains",
"FilterButton.equals": "Equals",
"FilterButton.greaterOrEqual": "Greater or equal",
"FilterButton.lessOrEqual": "Less or equal",
"FilterButton.last2days": "Last 2 days",
"FilterButton.last7days": "Last 7 days",
"FilterButton.last30days": "Last 30 days",
"FilterButton.notContains": "Not contains",
"FilterButton.notEqual": "Not equal",
"FilterButton.today": "Today",
"FilterEdit.editTitle": "编辑过滤器",
"FilterNameById.statistics$defects$automation_bug": "自动化错误",
"FilterNameById.statistics$defects$no_defect": "无缺陷",
Expand Down Expand Up @@ -1563,6 +1574,14 @@
"OrganizationsControl.all": "All",
"OrganizationsControl.allOrganizations": "All organizations",
"OrganizationsControl.organization": "组织",
"OrganizationsFilter.lastRunDate": "Last Run Date",
"OrganizationsFilter.lastRunDatePlaceholder": "Any",
"OrganizationsFilter.launches": "Launches",
"OrganizationsFilter.launchesPlaceholder": "Enter the number of launches",
"OrganizationsFilter.name": "Organization Name",
"OrganizationsFilter.namePlaceholder": "Enter part of the name",
"OrganizationsFilter.users": "Users",
"OrganizationsFilter.usersPlaceholder": "Enter the number of members",
"OrganizationsItem.open": "open",
"OrganizationsPage.title": "All Organizations",
"OrganizationsPage.description": "The list of organizations available to you is currently empty. Please contact your Administrator to be assigned to an existing one.",
Expand Down Expand Up @@ -1791,6 +1810,14 @@
"ProjectsGrid.nameCol": "名称",
"ProjectsGrid.organizationCol": "组织",
"ProjectsGrid.projectTypeCol": "项目类型",
"ProjectsFilter.lastRunDate": "Last Run Date",
"ProjectsFilter.lastRunDatePlaceholder": "Any",
"ProjectsFilter.launches": "Launches",
"ProjectsFilter.launchesPlaceholder": "Enter the number of launches",
"ProjectsFilter.name": "Project Name",
"ProjectsFilter.namePlaceholder": "Enter part of the name",
"ProjectsFilter.users": "Teammates",
"ProjectsFilter.usersPlaceholder": "Enter the number of members",
"ProjectsPage.addProject": "Create Project",
"ProjectsPage.addProjectSuccess": "项目“{name}”创建成功",
"ProjectsPage.addProjectTitle": "创建项目",
Expand Down
4 changes: 4 additions & 0 deletions app/src/common/constants/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export const COMMON_LOCALE_KEYS = defineMessages({
id: 'Common.cancel',
defaultMessage: 'Cancel',
},
APPLY: {
id: 'Common.apply',
defaultMessage: 'Apply',
},
RENAME: {
id: 'Common.rename',
defaultMessage: 'Rename',
Expand Down
3 changes: 3 additions & 0 deletions app/src/common/img/newIcons/filter-filled-inline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/src/common/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ export const URLS = {

organizationList: (preferencesObj = {}) =>
`${urlCommonBase}organizations${getQueryParams(preferencesObj)}`,
organizationSearch: () => `${urlCommonBase}organizations/searches`,
organizationProjects: (organizationId, preferencesObj = {}) =>
`${urlCommonBase}organizations/${organizationId}/projects${getQueryParams(preferencesObj)}`,
filterOrganizationProjects: (organizationId) =>
`${urlCommonBase}organizations/${organizationId}/projects/searches`,
organizationUsers: (organizationId, preferencesObj = {}) =>
`${urlCommonBase}organizations/${organizationId}/users${getQueryParams(preferencesObj)}`,
projectDelete: ({ organizationId, projectId }) =>
Expand Down
51 changes: 51 additions & 0 deletions app/src/components/buttons/filterButton/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2024 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import {
CONDITION_CNT,
CONDITION_EQ,
CONDITION_GREATER_EQ,
CONDITION_LESS_EQ,
CONDITION_NOT_CNT_EVENTS,
CONDITION_NOT_EQ,
} from 'components/filterEntities/constants';
import { messages } from './messages';

export const LAST_RUN_DATE_FILTER_NAME = 'last_launch_occurred';
export const LAUNCHES_FILTER_NAME = 'launches';
export const TEAMMATES_FILTER_NAME = 'users';
export const FILTER_NAME = 'name';

export const getTimeRange = (formatMessage) => [
{ label: formatMessage(messages.any), value: '' },
{ label: formatMessage(messages.today), value: 'today' },
{ label: formatMessage(messages.last2days), value: 'last2days' },
{ label: formatMessage(messages.last7days), value: 'last7days' },
{ label: formatMessage(messages.last30days), value: 'last30days' },
];

export const getRangeComparisons = (formatMessage) => [
{ label: formatMessage(messages.equals), value: CONDITION_EQ },
{ label: formatMessage(messages.greaterOrEqual), value: CONDITION_GREATER_EQ },
{ label: formatMessage(messages.lessOrEqual), value: CONDITION_LESS_EQ },
];

export const getContainmentComparisons = (formatMessage) => [
{ label: formatMessage(messages.equals), value: CONDITION_EQ },
{ label: formatMessage(messages.notEqual), value: CONDITION_NOT_EQ },
{ label: formatMessage(messages.contains), value: CONDITION_CNT },
{ label: formatMessage(messages.notContains), value: CONDITION_NOT_CNT_EVENTS },
];
Loading

0 comments on commit 8ef4f2a

Please sign in to comment.