refactor(frontend): update fsd entities imports to use @/shared/
This commit is contained in:
parent
5355451e35
commit
9816bc6b96
@ -1,5 +1,5 @@
|
||||
import { request } from '../../../api/client';
|
||||
import type { ApiResponseMeta, BrokerAccount, BrokerPortfolio } from '../../../api/responses';
|
||||
import { request } from '@/shared/api/client';
|
||||
import type { ApiResponseMeta, BrokerAccount, BrokerPortfolio } from '@/shared/api/responses';
|
||||
|
||||
export type BrokerOperationQuery = {
|
||||
from?: string;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import type { BrokerPortfolio } from '../../../api/responses';
|
||||
import type { BrokerPortfolio } from '@/shared/api/responses';
|
||||
import { aggregateBrokerAccounts } from '../model/brokerAccountsOverview';
|
||||
|
||||
function portfolio(
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { BrokerMoney, BrokerPortfolio } from '../../../api/responses';
|
||||
import type { BrokerMoney, BrokerPortfolio } from '@/shared/api/responses';
|
||||
|
||||
export interface BrokerCurrencyAllocationSummary {
|
||||
shares: number;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { useQueries } from '@tanstack/react-query';
|
||||
import type { BrokerAccount, BrokerPortfolio } from '../../../api/responses';
|
||||
import type { BrokerAccount, BrokerPortfolio } from '@/shared/api/responses';
|
||||
import { getBrokerPortfolio } from '../api/brokerAccountApi';
|
||||
|
||||
export function useBrokerAccountPortfolios(accounts: BrokerAccount[]) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import type { BrokerAccount } from '../../../api/responses';
|
||||
import type { BrokerAccount } from '@/shared/api/responses';
|
||||
import { getBrokerAccounts } from '../api/brokerAccountApi';
|
||||
|
||||
export function useBrokerAccounts() {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import type { BrokerPortfolio } from '../../../api/responses';
|
||||
import type { BrokerPortfolio } from '@/shared/api/responses';
|
||||
import { getBrokerPortfolio } from '../api/brokerAccountApi';
|
||||
|
||||
export function useBrokerPortfolio(accountId: string | undefined) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { BrokerOperation } from '../../../api/responses';
|
||||
import type { BrokerOperation } from '@/shared/api/responses';
|
||||
|
||||
export type BrokerOperationImpact = 'adds' | 'reduces' | 'neutral' | 'unknown';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { keepPreviousData, useQuery } from '@tanstack/react-query';
|
||||
import type { BrokerOperationsPage } from '../../../api/responses';
|
||||
import type { BrokerOperationsPage } from '@/shared/api/responses';
|
||||
import { getBrokerOperations, type BrokerOperationQuery } from '../api/brokerOperationApi';
|
||||
|
||||
export function useBrokerOperations(
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import type { BrokerMoney, BrokerPortfolio } from '../../../api/responses';
|
||||
import type { BrokerMoney, BrokerPortfolio } from '@/shared/api/responses';
|
||||
import { buildBrokerAllocation } from './brokerAllocation';
|
||||
|
||||
function money(value: number): BrokerMoney {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { BrokerPortfolio } from '../../../api/responses';
|
||||
import type { BrokerPortfolio } from '@/shared/api/responses';
|
||||
|
||||
export type BrokerAllocationKey = 'shares' | 'bonds' | 'etf' | 'cash' | 'other';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import type { BrokerOperation, BrokerPosition } from '../../../api/responses';
|
||||
import type { BrokerOperation, BrokerPosition } from '@/shared/api/responses';
|
||||
import {
|
||||
BROKER_OPERATION_TYPE_OPTIONS,
|
||||
getBrokerInstrumentPath,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { BrokerPosition } from '../../../api/responses';
|
||||
import type { BrokerPosition } from '@/shared/api/responses';
|
||||
export {
|
||||
BROKER_OPERATION_TYPE_OPTIONS,
|
||||
getBrokerOperationImpact,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { keepPreviousData, useQuery } from '@tanstack/react-query';
|
||||
import type { BrokerPositionsPage } from '../../../api/responses';
|
||||
import type { BrokerPositionsPage } from '@/shared/api/responses';
|
||||
import { getBrokerPositions } from '../api/brokerPositionApi';
|
||||
|
||||
export function useBrokerPositions(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import type { BrokerMoney, BrokerPortfolio } from '../../../api/responses';
|
||||
import { SkeletonBlock } from '../../../components/SkeletonBlock';
|
||||
import type { BrokerMoney, BrokerPortfolio } from '@/shared/api/responses';
|
||||
import { SkeletonBlock } from '@/shared/ui/SkeletonBlock';
|
||||
import { useBrokerOperations } from '../../../entities/broker-operation';
|
||||
import { useBrokerAccountContext } from '../../../entities/broker-account/ui/BrokerAccountLayout';
|
||||
import { BrokerAllocationChart } from '../../../widgets/broker-allocation-chart';
|
||||
|
||||
@ -4,8 +4,8 @@ import type {
|
||||
BrokerMoney,
|
||||
BrokerPosition,
|
||||
BrokerPositionsPage as BrokerPositionsPageData,
|
||||
} from '../../../api/responses';
|
||||
import { TableSkeleton } from '../../../components/TableSkeleton';
|
||||
} from '@/shared/api/responses';
|
||||
import { TableSkeleton } from '@/shared/ui/TableSkeleton';
|
||||
import { getBrokerInstrumentPath, useBrokerPositions } from '../../../entities/broker-position';
|
||||
import { useBrokerAccountContext } from '../../../entities/broker-account/ui/BrokerAccountLayout';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import { SkeletonBlock } from '../../../components/SkeletonBlock';
|
||||
import type { BrokerAccount, BrokerMoney, BrokerPortfolio } from '../../../api/responses';
|
||||
import { SkeletonBlock } from '@/shared/ui/SkeletonBlock';
|
||||
import type { BrokerAccount, BrokerMoney, BrokerPortfolio } from '@/shared/api/responses';
|
||||
import { buildBrokerAllocation } from '../../../entities/broker-position';
|
||||
import { BrokerAllocationBar } from '../../../widgets/broker-allocation-chart';
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { SkeletonBlock } from '../../../components/SkeletonBlock';
|
||||
import { SkeletonBlock } from '@/shared/ui/SkeletonBlock';
|
||||
import type { BrokerAccountsAggregate } from '../../../entities/broker-account/model/brokerAccountsOverview';
|
||||
import { buildBrokerAllocation } from '../../../entities/broker-position';
|
||||
import { BrokerAllocationBar } from '../../../widgets/broker-allocation-chart';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { BrokerPortfolio } from '../../../api/responses';
|
||||
import type { BrokerPortfolio } from '@/shared/api/responses';
|
||||
import {
|
||||
buildBrokerAllocation,
|
||||
type BrokerAllocationItem,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import type { ReactNode } from 'react';
|
||||
import type { BrokerMoney, BrokerOperation, BrokerOperationsPage } from '../../../api/responses';
|
||||
import { TableSkeleton } from '../../../components/TableSkeleton';
|
||||
import type { BrokerMoney, BrokerOperation, BrokerOperationsPage } from '@/shared/api/responses';
|
||||
import { TableSkeleton } from '@/shared/ui/TableSkeleton';
|
||||
import {
|
||||
getBrokerOperationImpact,
|
||||
getBrokerOperationTypeLabel,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user