reoutre 2
This commit is contained in:
@@ -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 = [
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { PureComponent } from 'react';
|
||||
import { ManifestList } from '../../components/manifest';
|
||||
import { ManifestList } from '../components/manifest';
|
||||
|
||||
class AuftragAngebotPage extends PureComponent {
|
||||
render() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { PureComponent } from 'react';
|
||||
import { ManifestForm } from '../../components/manifest';
|
||||
import { ManifestForm } from '../../../components/manifest';
|
||||
|
||||
class AuftragBestellungNeuPage extends PureComponent {
|
||||
render() {
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user