From 43bf1dc3de0fe7c902aae137fde21df8888f4ecf Mon Sep 17 00:00:00 2001 From: nns <278048682+nurdotnet@users.noreply.github.com> Date: Sun, 26 Apr 2026 02:01:49 +0500 Subject: [PATCH] chore(web): remove standalone Currencies page (managed via Country FK) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Валюты — закрытый сидируемый список (KZT, USD, EUR, RUB), пользователь их не создаёт. Currency остаётся в БД как FK для Country и Organization; GET /api/catalog/currencies продолжает работать для дропдаунов в форме страны и настройках организации. Отдельная страница в меню избыточна. - удалена pages/CurrenciesPage.tsx - из роутера убран /catalog/currencies - из сайдбара пропал пункт «Валюты», иконка Coins больше не импортируется Co-Authored-By: Claude Opus 4.7 (1M context) --- src/food-market.web/src/App.tsx | 2 -- .../src/components/AppLayout.tsx | 3 +- .../src/pages/CurrenciesPage.tsx | 35 ------------------- 3 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 src/food-market.web/src/pages/CurrenciesPage.tsx diff --git a/src/food-market.web/src/App.tsx b/src/food-market.web/src/App.tsx index 031938d..63cf853 100644 --- a/src/food-market.web/src/App.tsx +++ b/src/food-market.web/src/App.tsx @@ -3,7 +3,6 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { LoginPage } from '@/pages/LoginPage' import { DashboardPage } from '@/pages/DashboardPage' import { CountriesPage } from '@/pages/CountriesPage' -import { CurrenciesPage } from '@/pages/CurrenciesPage' import { UnitsOfMeasurePage } from '@/pages/UnitsOfMeasurePage' import { PriceTypesPage } from '@/pages/PriceTypesPage' import { StoresPage } from '@/pages/StoresPage' @@ -51,7 +50,6 @@ export default function App() { } /> } /> } /> - } /> } /> } /> } /> diff --git a/src/food-market.web/src/components/AppLayout.tsx b/src/food-market.web/src/components/AppLayout.tsx index 587a007..643a947 100644 --- a/src/food-market.web/src/components/AppLayout.tsx +++ b/src/food-market.web/src/components/AppLayout.tsx @@ -6,7 +6,7 @@ import { logout } from '@/lib/auth' import { cn } from '@/lib/utils' import { LayoutDashboard, Package, FolderTree, Ruler, Tag, - Users, Warehouse, Store as StoreIcon, Globe, Coins, LogOut, Download, + Users, Warehouse, Store as StoreIcon, Globe, LogOut, Download, Boxes, History, TruckIcon, ShoppingCart, Settings, Menu, X, } from 'lucide-react' import { Logo } from './Logo' @@ -53,7 +53,6 @@ function buildNav(): NavSection[] { ]}, { group: 'Справочники', items: [ { to: '/catalog/countries', icon: Globe, label: 'Страны' }, - { to: '/catalog/currencies', icon: Coins, label: 'Валюты' }, ]}, { group: 'Импорт', items: [ { to: '/admin/import/moysklad', icon: Download, label: 'МойСклад' }, diff --git a/src/food-market.web/src/pages/CurrenciesPage.tsx b/src/food-market.web/src/pages/CurrenciesPage.tsx deleted file mode 100644 index a5e9668..0000000 --- a/src/food-market.web/src/pages/CurrenciesPage.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { ListPageShell } from '@/components/ListPageShell' -import { DataTable } from '@/components/DataTable' -import { Pagination } from '@/components/Pagination' -import { SearchBar } from '@/components/SearchBar' -import { useCatalogList } from '@/lib/useCatalog' -import type { Currency } from '@/lib/types' - -export function CurrenciesPage() { - const { data, isLoading, page, setPage, search, setSearch, sortKey, sortOrder, setSort } = useCatalogList('/api/catalog/currencies') - - return ( - } - footer={data && data.total > 0 && ( - - )} - > - r.id} - sortKey={sortKey} - sortOrder={sortOrder} - onSortChange={setSort} - columns={[ - { header: 'Код', width: '90px', sortKey: 'code', cell: (r) => {r.code} }, - { header: 'Название', sortKey: 'name', cell: (r) => r.name }, - { header: 'Символ', width: '100px', sortKey: 'symbol', cell: (r) => {r.symbol} }, - ]} - /> - - ) -}