fix(TEAMMSBMOB-21679): исправлена загрузка валют по фильтру ИТП

This commit is contained in:
Кудряшов Максим
2025-12-17 17:50:11 +04:00
parent beb5a935a2
commit 54d91ded32
2 changed files with 6 additions and 2 deletions
@@ -223,7 +223,7 @@ interface OrganizationDto {
/**
* Приоритет исполнения трансграничных переводов (ИТП).
*/
itpPriority: APPLICATION_AREA | null;
itpPriority: keyof typeof APPLICATION_AREA | null;
}
interface OrganizationsResponseDto {
@@ -1,5 +1,6 @@
import { useMemo } from 'react';
import { Fields } from '@fractal-ui/form';
import { APPLICATION_AREA } from '@msb/http';
import { useAppContext } from '@msb/shared';
import { useFormState } from 'react-final-form';
import { useGetCurrenciesList } from '../api/useGetCurrenciesLIst';
@@ -21,7 +22,10 @@ const CurrencyField = () => {
const enabled = Boolean(isOperatingAccount && selectedOrganization);
const { data, isLoading, isFetching } = useGetCurrenciesList({ enabled, itpPriority: selectedOrganization?.itpPriority });
const { data, isLoading, isFetching } = useGetCurrenciesList({
enabled,
itpPriority: selectedOrganization?.itpPriority ? APPLICATION_AREA[selectedOrganization.itpPriority] : APPLICATION_AREA.ITP3,
});
const options = useMemo(() => {
if (!data?.page.list.length) return [];