Feature/request type access #23

Merged
gorbenko.pavel merged 5 commits from feature/request-type-access into main 2026-09-25 11:48:03 +00:00
2 changed files with 12 additions and 6 deletions
Showing only changes of commit 15f24a0d91 - Show all commits
@@ -26,8 +26,7 @@ import {
PageHeader,
PrimaryCell,
SearchableSelect,
Select,
TextInput
Select
} from '../ui';
export interface IRequestTypeAccessScreenProps {
@@ -84,7 +83,7 @@ export const RequestTypeAccessScreen: React.FC<IRequestTypeAccessScreenProps> =
const filteredItems = access.items.filter(item => {
if (filterRequestTypeId && String(item.requestTypeId) !== filterRequestTypeId) return false;
if (filterEmail && item.email.toLowerCase().indexOf(filterEmail.trim().toLowerCase()) === -1) return false;
if (filterEmail && item.email.toLowerCase() !== filterEmail.toLowerCase()) return false;
return true;
});
@@ -143,10 +142,16 @@ export const RequestTypeAccessScreen: React.FC<IRequestTypeAccessScreenProps> =
</div>
<div className={styles.filterField}>
<Field label={texts.requestTypeAccess.filterEmailLabel}>
<TextInput
<SearchableSelect
options={employees.items.map(toEmployeeOption)}
value={filterEmail}
onChange={e => setFilterEmail(e.target.value)}
loading={employees.isLoading}
allowClear
clearLabel={texts.requestTypeAccess.filterEmailAll}
placeholder={texts.requestTypeAccess.filterEmailPlaceholder}
searchPlaceholder={texts.select.employeeSearchPlaceholder}
emptyMessage={texts.select.employeesEmpty}
onChange={setFilterEmail}
/>
</Field>
</div>
+2 -1
View File
@@ -189,7 +189,8 @@ export const texts = {
filterRequestTypeLabel: 'Фильтр по типу заявки',
filterRequestTypeAll: 'Все типы заявок',
filterEmailLabel: 'Фильтр по сотруднику',
filterEmailPlaceholder: 'Email сотрудника',
filterEmailAll: 'Все сотрудники',
filterEmailPlaceholder: 'Найдите по ФИО или email',
columnRequestType: 'Тип заявки',
columnEmail: 'Сотрудник',
columnSharePointLists: 'Списки SharePoint (выдать доступ вручную)',