diff --git a/src/appRouter.jsx b/src/appRouter.jsx index 8823a39..9620f30 100644 --- a/src/appRouter.jsx +++ b/src/appRouter.jsx @@ -3,28 +3,28 @@ import { Navigate, createBrowserRouter } from 'react-router-dom'; import AppShell from './components/AppShell'; import SectionLayout from './components/SectionLayout'; -const ArtikelUebersichtPage = lazy(() => import('./pages/artikel/index')); -const ArtikelKategorienPage = lazy(() => import('./pages/artikel/kategorien')); -const RedirectArtikelKategorien = lazy(() => import('./pages/artikel/RedirectArtikelKategorien')); -const ArtikelLagerPage = lazy(() => import('./pages/artikel/lager')); -const ArtikelMarkenPage = lazy(() => import('./pages/artikel/marken')); -const ArtikelVorlagenPage = lazy(() => import('./pages/artikel/vorlagen')); -const ArtikelSkuPage = lazy(() => import('./pages/artikel/sku')); -const LieferungListePage = lazy(() => import('./pages/lieferung/index')); -const LieferungNeuPage = lazy(() => import('./pages/lieferung/neu')); -const LieferungLieferantenPage = lazy(() => import('./pages/lieferung/lieferanten')); -const LieferungEditPage = lazy(() => import('./pages/lieferung/edit')); -const AuftragAngebotPage = lazy(() => import('./pages/auftrag/index')); -const AuftragAngebotNeuPage = lazy(() => import('./pages/auftrag/neu')); -const AuftragAngebotEditPage = lazy(() => import('./pages/auftrag/edit')); -const AuftragBestellungPage = lazy(() => import('./pages/auftrag/bestellung')); -const AuftragBestellungNeuPage = lazy(() => import('./pages/auftrag/bestellungNeu')); -const AuftragBestellungEditPage = lazy(() => import('./pages/auftrag/bestellungEdit')); -const KundeListePage = lazy(() => import('./pages/kunde/index')); -const KundeNeuPage = lazy(() => import('./pages/kunde/neu')); -const KundeGruppenPage = lazy(() => import('./pages/kunde/gruppen')); -const KundeEditPage = lazy(() => import('./pages/kunde/edit')); -const InfosPage = lazy(() => import('./pages/infos/index')); +const ArtikelUebersichtPage = lazy(() => import('./routes/artikel')); +const ArtikelKategorienPage = lazy(() => import('./routes/artikel/kategorien')); +const RedirectArtikelKategorien = lazy(() => import('./routes/artikel/RedirectArtikelKategorien')); +const ArtikelLagerPage = lazy(() => import('./routes/artikel/lager')); +const ArtikelMarkenPage = lazy(() => import('./routes/artikel/marken')); +const ArtikelVorlagenPage = lazy(() => import('./routes/artikel/vorlagen')); +const ArtikelSkuPage = lazy(() => import('./routes/artikel/_sku')); +const LieferungListePage = lazy(() => import('./routes/lieferung')); +const LieferungNeuPage = lazy(() => import('./routes/lieferung/neu')); +const LieferungLieferantenPage = lazy(() => import('./routes/lieferung/lieferanten')); +const LieferungEditPage = lazy(() => import('./routes/lieferung/_deliveryId')); +const AuftragAngebotPage = lazy(() => import('./routes/auftrag')); +const AuftragAngebotNeuPage = lazy(() => import('./routes/auftrag/neu')); +const AuftragAngebotEditPage = lazy(() => import('./routes/auftrag/_quoteId')); +const AuftragBestellungPage = lazy(() => import('./routes/auftrag/bestellung')); +const AuftragBestellungNeuPage = lazy(() => import('./routes/auftrag/bestellung/neu')); +const AuftragBestellungEditPage = lazy(() => import('./routes/auftrag/bestellung/_orderId')); +const KundeListePage = lazy(() => import('./routes/kunde')); +const KundeNeuPage = lazy(() => import('./routes/kunde/neu')); +const KundeGruppenPage = lazy(() => import('./routes/kunde/gruppen')); +const KundeEditPage = lazy(() => import('./routes/kunde/_entityId')); +const InfosPage = lazy(() => import('./routes/infos')); const routes = [ { diff --git a/src/components/AppShell.jsx b/src/components/AppShell.jsx index 3deec9e..72545c2 100644 --- a/src/components/AppShell.jsx +++ b/src/components/AppShell.jsx @@ -9,8 +9,8 @@ import Typography from '@mui/material/Typography'; import { Outlet, useLocation, useNavigate } from 'react-router-dom'; import UserMenu from './UserMenu'; import { NAV_ITEMS, SUB_NAV, resolveActiveNav, resolveActiveSub } from '../nav'; -import { artikelQueryPath } from '../pages/artikel/artikelQuery'; -import { defaultCategoryPath } from '../pages/artikel/categoryRoute'; +import { artikelQueryPath } from './article/artikelQuery'; +import { defaultCategoryPath } from './category/categoryRoute'; import { navigationAutomat } from '../automats'; const SIDEBAR_WIDTH = 144; diff --git a/src/components/SectionLayout.jsx b/src/components/SectionLayout.jsx index 05d82ee..514587e 100644 --- a/src/components/SectionLayout.jsx +++ b/src/components/SectionLayout.jsx @@ -12,7 +12,7 @@ import SettingsIcon from '@mui/icons-material/Settings'; import { enqueueSnackbar } from 'notistack'; import PageLayout from './PageLayout'; import { NAV_ITEMS, SUB_NAV, resolveActiveSub } from '../nav'; -import { isKategorienPath } from '../pages/artikel/categoryRoute'; +import { isKategorienPath } from './category/categoryRoute'; import categoryAutomat from '../automats/categoryAutomat'; import { ActionElevatedPill, ToggleElevatedPill } from 'dashgui/ElevatedPill'; import { article, category } from '../api'; diff --git a/src/components/article/ArticleStockAdjustDialog.jsx b/src/components/article/ArticleStockAdjustDialog.jsx index a4505db..3b9511f 100644 --- a/src/components/article/ArticleStockAdjustDialog.jsx +++ b/src/components/article/ArticleStockAdjustDialog.jsx @@ -29,7 +29,7 @@ import Switch from '@mui/material/Switch'; import { enqueueSnackbar } from 'notistack'; import { stock, article as articleApi } from '../../api'; import { StorageManagerContext } from '../../api/storageManagerContext'; -import { formatStock } from '../../pages/artikel/searchFormat'; +import { formatStock } from './searchFormat'; import { notifyError } from '../../utils/notify'; import artikelAutomat from '../../automats/artikelAutomat'; import warehouseAutomat from '../../automats/warehouseAutomat'; diff --git a/src/components/article/ArticleTileTab.jsx b/src/components/article/ArticleTileTab.jsx index 076bc8d..38c6469 100644 --- a/src/components/article/ArticleTileTab.jsx +++ b/src/components/article/ArticleTileTab.jsx @@ -21,7 +21,7 @@ import { readPreferredArticleTab, resolveArticleTab, writePreferredArticleTab, -} from '../../pages/artikel/articleRoute'; +} from './articleRoute'; import { router } from '../../appRouter'; import { matchPath } from 'react-router-dom'; import { PanelTile } from 'dashgui/panels'; diff --git a/src/components/article/ArticleView.jsx b/src/components/article/ArticleView.jsx index 47ca88d..81f3550 100644 --- a/src/components/article/ArticleView.jsx +++ b/src/components/article/ArticleView.jsx @@ -5,7 +5,7 @@ import withNavigate from '../withNavigate'; import { buildCategoryPath, defaultCategoryPath, -} from '../../pages/artikel/categoryRoute'; +} from '../category/categoryRoute'; import artikelAutomat, { createArticleSelector, getArticle } from '../../automats/artikelAutomat'; import ArticleTileTab from './ArticleTileTab'; diff --git a/src/components/article/boxes/ArticleViewLists.jsx b/src/components/article/boxes/ArticleViewLists.jsx index 8f86b3c..2bff3b7 100644 --- a/src/components/article/boxes/ArticleViewLists.jsx +++ b/src/components/article/boxes/ArticleViewLists.jsx @@ -3,7 +3,7 @@ import { Link as RouterLink } from 'react-router-dom'; import Link from '@mui/material/Link'; import Typography from '@mui/material/Typography'; import { PanelTile } from 'dashgui/panels'; -import { artikelDetailPath } from '../../../pages/artikel/articleRoute'; +import { artikelDetailPath } from '../articleRoute'; class CountLine extends Component { render() { diff --git a/src/components/article/boxes/ArticleViewStock.jsx b/src/components/article/boxes/ArticleViewStock.jsx index 39d0ba4..01c1c74 100644 --- a/src/components/article/boxes/ArticleViewStock.jsx +++ b/src/components/article/boxes/ArticleViewStock.jsx @@ -5,7 +5,7 @@ import WarehouseIcon from '@mui/icons-material/Warehouse'; import EditOutlinedIcon from '@mui/icons-material/EditOutlined'; import Tooltip from '@mui/material/Tooltip'; import { PanelTile } from 'dashgui/panels'; -import { formatStock } from '../../../pages/artikel/searchFormat'; +import { formatStock } from '../searchFormat'; import ArticleStockAdjustDialog from '../ArticleStockAdjustDialog'; const SECOND_ROW_MIN_HEIGHT = 220; diff --git a/src/components/article/tabs/ArticleHistoryTab.jsx b/src/components/article/tabs/ArticleHistoryTab.jsx index 87b722d..ab2c586 100644 --- a/src/components/article/tabs/ArticleHistoryTab.jsx +++ b/src/components/article/tabs/ArticleHistoryTab.jsx @@ -5,7 +5,7 @@ import TableCell from '@mui/material/TableCell'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; import { StorageManagerContext } from '../../../api/storageManagerContext'; -import ResultsPagination from '../../../pages/artikel/ResultsPagination'; +import ResultsPagination from '../ResultsPagination'; const PAGE_SIZE = 20; diff --git a/src/components/manifest/ManifestFormLine.jsx b/src/components/manifest/ManifestFormLine.jsx index 516c93c..fd120f6 100644 --- a/src/components/manifest/ManifestFormLine.jsx +++ b/src/components/manifest/ManifestFormLine.jsx @@ -22,7 +22,7 @@ import ArticlePhoto from '../article/ArticlePhoto'; import { formatPrice } from '../../utils/price'; import { primaryPrice, priceBrutto } from '../../utils/articleDetail'; import artikelAutomat, { createArticleSelector, getArticle } from '../../automats/artikelAutomat'; -import { artikelDetailPath } from '../../pages/artikel/articleRoute'; +import { artikelDetailPath } from '../article/articleRoute'; import { BrandLabel } from '../brand'; class ManifestFormLine extends PureComponent { diff --git a/src/components/tiles/ArticleTile.jsx b/src/components/tiles/ArticleTile.jsx index f67e61c..2f6b2d3 100644 --- a/src/components/tiles/ArticleTile.jsx +++ b/src/components/tiles/ArticleTile.jsx @@ -4,7 +4,7 @@ import ButtonBase from '@mui/material/ButtonBase'; import Typography from '@mui/material/Typography'; import { Tile, tileBaseSx } from 'dashgui/tiles'; import { formatPrice } from '../../utils/price'; -import { articleSku } from '../../pages/artikel/articleRoute'; +import { articleSku } from '../article/articleRoute'; import ArticlePhoto from '../article/ArticlePhoto'; import { BrandLabel } from '../brand'; diff --git a/src/nav.js b/src/nav.js index 3664908..6ac8ca5 100644 --- a/src/nav.js +++ b/src/nav.js @@ -16,7 +16,7 @@ import StorefrontIcon from '@mui/icons-material/Storefront'; import RequestQuoteIcon from '@mui/icons-material/RequestQuote'; import ShoppingCartIcon from '@mui/icons-material/ShoppingCart'; import LabelIcon from '@mui/icons-material/Label'; -import { isKategorienPath } from './pages/artikel/categoryRoute'; +import { isKategorienPath } from './components/category/categoryRoute'; import { deliveryEditorAutomat } from './automats/deliveryEditorAutomat'; class DeliveryNavIcon extends PureComponent { diff --git a/src/routes/artikel.jsx b/src/routes/artikel.jsx index fd9345e..a0b8965 100644 --- a/src/routes/artikel.jsx +++ b/src/routes/artikel.jsx @@ -10,28 +10,28 @@ import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import SearchIcon from '@mui/icons-material/Search'; import ClearIcon from '@mui/icons-material/Clear'; -import { StorageManagerContext, getStorageManager } from '../../api/storageManagerContext'; -import BackendError from '../../components/BackendError'; -import { formatPrice } from '../../utils/price'; +import { StorageManagerContext, getStorageManager } from '../api/storageManagerContext'; +import BackendError from '../components/BackendError'; +import { formatPrice } from '../utils/price'; import { buildSearchUrl, queryFromParams, readArtikelQuery, writeArtikelQuery, -} from './artikelQuery'; -import ResultsPagination from './ResultsPagination'; +} from '../components/article/artikelQuery'; +import ResultsPagination from '../components/article/ResultsPagination'; import { buildFilter, formatCategoryList, formatStock, getCategoryDepth, parseFilter, -} from './searchFormat'; -import { preserveSearchFocus } from './searchFocus'; -import { artikelDetailPath } from './articleRoute'; -import withSearchParams from './withSearchParams'; -import { setLastArticleSku } from '../../automats'; -import { BrandLabel } from '../../components/brand'; +} from '../components/article/searchFormat'; +import { preserveSearchFocus } from '../components/article/searchFocus'; +import { artikelDetailPath } from '../components/article/articleRoute'; +import withSearchParams from '../components/article/withSearchParams'; +import { setLastArticleSku } from '../automats'; +import { BrandLabel } from '../components/brand'; const resultRowSx = { alignItems: 'center', diff --git a/src/routes/artikel/RedirectArtikelKategorien.jsx b/src/routes/artikel/RedirectArtikelKategorien.jsx index 0b18489..8fc46d8 100644 --- a/src/routes/artikel/RedirectArtikelKategorien.jsx +++ b/src/routes/artikel/RedirectArtikelKategorien.jsx @@ -1,5 +1,5 @@ import { Navigate, useParams } from 'react-router-dom'; -import { KATEGORIEN_BASE } from './categoryRoute'; +import { KATEGORIEN_BASE } from '../../components/category/categoryRoute'; export default function RedirectArtikelKategorien() { const { '*': rest = '' } = useParams(); diff --git a/src/routes/artikel/_sku.jsx b/src/routes/artikel/_sku.jsx index 71f12ea..36c2d8e 100644 --- a/src/routes/artikel/_sku.jsx +++ b/src/routes/artikel/_sku.jsx @@ -10,7 +10,7 @@ import { getArticle, setLastArticleSku, } from '../../automats'; -import withSkuRoute from './withSkuRoute'; +import withSkuRoute from '../../components/article/withSkuRoute'; /** Full-screen loading state while the shared article cache resolves. */ function ArticleLoading() { diff --git a/src/routes/artikel/kategorien.jsx b/src/routes/artikel/kategorien.jsx index 717b02a..a512ebd 100644 --- a/src/routes/artikel/kategorien.jsx +++ b/src/routes/artikel/kategorien.jsx @@ -5,7 +5,7 @@ import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import { enqueueSnackbar } from 'notistack'; import BackendError from '../../components/BackendError'; -import CategorySortable from './CategorySortable'; +import CategorySortable from '../../components/category/CategorySortable'; import CategoryPickerDialog from '../../components/article/CategoryPickerDialog'; import { NewCategoryTile, CategoryBreadcrumbs } from '../../components/category'; import { NewArticleTile } from '../../components/article'; @@ -17,14 +17,14 @@ import { CategoryTile, } from '../../components/tiles'; import { TILE_SIZE } from 'dashgui/tiles'; -import withCategoryRoute from './withCategoryRoute'; -import { artikelDetailPath, articleSku } from './articleRoute'; +import withCategoryRoute from '../../components/category/withCategoryRoute'; +import { artikelDetailPath, articleSku } from '../../components/article/articleRoute'; import { buildCategoryPath, defaultCategoryPath, resolveCategoryIdFromSlugPath, ROOT_CATEGORY_NAME, -} from './categoryRoute'; +} from '../../components/category/categoryRoute'; import categoryAutomat from '../../automats/categoryAutomat'; import posterminalAutomat from '../../automats/posterminalAutomat'; import companyAutomat from '../../automats/companyAutomat'; diff --git a/src/routes/auftrag.jsx b/src/routes/auftrag.jsx index 4637bfa..9954b57 100644 --- a/src/routes/auftrag.jsx +++ b/src/routes/auftrag.jsx @@ -1,5 +1,5 @@ import { PureComponent } from 'react'; -import { ManifestList } from '../../components/manifest'; +import { ManifestList } from '../components/manifest'; class AuftragAngebotPage extends PureComponent { render() { diff --git a/src/routes/auftrag/bestellung/_orderId.jsx b/src/routes/auftrag/bestellung/_orderId.jsx index 94e70ce..811efd1 100644 --- a/src/routes/auftrag/bestellung/_orderId.jsx +++ b/src/routes/auftrag/bestellung/_orderId.jsx @@ -1,5 +1,5 @@ import { PureComponent } from 'react'; -import { ManifestForm, withManifestId } from '../../components/manifest'; +import { ManifestForm, withManifestId } from '../../../components/manifest'; class AuftragBestellungEditPage extends PureComponent { render() { diff --git a/src/routes/auftrag/bestellung/neu.jsx b/src/routes/auftrag/bestellung/neu.jsx index 32cb394..c52595e 100644 --- a/src/routes/auftrag/bestellung/neu.jsx +++ b/src/routes/auftrag/bestellung/neu.jsx @@ -1,5 +1,5 @@ import { PureComponent } from 'react'; -import { ManifestForm } from '../../components/manifest'; +import { ManifestForm } from '../../../components/manifest'; class AuftragBestellungNeuPage extends PureComponent { render() { diff --git a/src/routes/infos.jsx b/src/routes/infos.jsx index ddd6a16..490a315 100644 --- a/src/routes/infos.jsx +++ b/src/routes/infos.jsx @@ -1,5 +1,5 @@ import Typography from '@mui/material/Typography'; -import PageLayout from '../../components/PageLayout'; +import PageLayout from '../components/PageLayout'; export default function InfosPage() { return ( diff --git a/src/routes/kunde.jsx b/src/routes/kunde.jsx index 3532249..507172d 100644 --- a/src/routes/kunde.jsx +++ b/src/routes/kunde.jsx @@ -1,11 +1,11 @@ import { PureComponent } from 'react'; import { enqueueSnackbar } from 'notistack'; -import BackendError from '../../components/BackendError'; +import BackendError from '../components/BackendError'; import { RecordList } from 'dashgui/lists'; -import { StorageManagerContext } from '../../api/storageManagerContext'; -import { router } from '../../appRouter'; -import { backendErrorFrom } from '../../utils/backendError'; -import { notifyError } from '../../utils/notify'; +import { StorageManagerContext } from '../api/storageManagerContext'; +import { router } from '../appRouter'; +import { backendErrorFrom } from '../utils/backendError'; +import { notifyError } from '../utils/notify'; function sortEntities(entities) { return [...entities].sort((a, b) => { diff --git a/src/routes/kunde/_entityId.jsx b/src/routes/kunde/_entityId.jsx index 433e33c..d31e6ce 100644 --- a/src/routes/kunde/_entityId.jsx +++ b/src/routes/kunde/_entityId.jsx @@ -15,7 +15,7 @@ import { StorageManagerContext } from '../../api/storageManagerContext'; import { requireArray, requireDefined, requireObject } from '../../utils/apiShape'; import { backendErrorFrom } from '../../utils/backendError'; import { notifyError } from '../../utils/notify'; -import withEntityRoute from './withEntityRoute'; +import withEntityRoute from '../../components/kunde/withEntityRoute'; const ADDRESS_FIELDS = [ 'addressType', diff --git a/src/routes/lieferung.jsx b/src/routes/lieferung.jsx index 616ef67..8ff18d9 100644 --- a/src/routes/lieferung.jsx +++ b/src/routes/lieferung.jsx @@ -1,6 +1,6 @@ import { PureComponent } from 'react'; -import { DeliveryList } from '../../components/manifest'; -import { setLastDeliveryPath } from '../../automats'; +import { DeliveryList } from '../components/manifest'; +import { setLastDeliveryPath } from '../automats'; class LieferungListePage extends PureComponent { componentDidMount() {