feat: enhance product filtering in ProductSelect component
This commit is contained in:
@@ -10,8 +10,10 @@ import getRenderOptions from "./utils/getRenderOptions.tsx";
|
|||||||
type RestProps = {
|
type RestProps = {
|
||||||
clientId: number;
|
clientId: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
const MAX_PRODUCTS = 200;
|
const MAX_PRODUCTS = 200;
|
||||||
type Props = Omit<ObjectSelectProps<ProductSchema>, "data"> & RestProps;
|
type Props = Omit<ObjectSelectProps<ProductSchema>, "data"> & RestProps;
|
||||||
|
|
||||||
const ProductSelect: FC<Props> = (props: Props) => {
|
const ProductSelect: FC<Props> = (props: Props) => {
|
||||||
const [searchValue, setSearchValue] = useState("");
|
const [searchValue, setSearchValue] = useState("");
|
||||||
const [debounced] = useDebouncedValue(searchValue, 500);
|
const [debounced] = useDebouncedValue(searchValue, 500);
|
||||||
@@ -22,11 +24,22 @@ const ProductSelect: FC<Props> = (props: Props) => {
|
|||||||
itemsPerPage: MAX_PRODUCTS,
|
itemsPerPage: MAX_PRODUCTS,
|
||||||
});
|
});
|
||||||
const restProps = omit(props, ["clientId"]);
|
const restProps = omit(props, ["clientId"]);
|
||||||
|
const filterProducts = (searchFilter: string): ProductSchema[] => {
|
||||||
const optionsFilter: OptionsFilter = ({ options }) => options;
|
searchFilter = searchFilter.toLowerCase().trim();
|
||||||
|
if (!searchFilter) return products;
|
||||||
|
const filteredByName = products.filter((v) => v.name.toLowerCase().includes(searchFilter));
|
||||||
|
const filteredByBarcodes = products.filter((v) => v.barcodes?.some(barcode => barcode.toLowerCase().includes(searchFilter)));
|
||||||
|
const filteredByArticle = products.filter((v) => v.article == searchFilter);
|
||||||
|
const uniqueProducts = new Set([...filteredByName, ...filteredByBarcodes, ...filteredByArticle]);
|
||||||
|
return Array.from(uniqueProducts).sort((a, b) => a.id - b.id);
|
||||||
|
};
|
||||||
|
const optionsFilter: OptionsFilter = ({ search }) => {
|
||||||
|
return filterProducts(search).map(product => ({ label: product.name, value: product.id.toString() }));
|
||||||
|
};
|
||||||
const setSearchValueImpl = (value: string) => {
|
const setSearchValueImpl = (value: string) => {
|
||||||
const names = products.map(product => product.name);
|
value = value.toLowerCase().trim();
|
||||||
if (names.includes(value)) return;
|
if (!value) return;
|
||||||
|
if (filterProducts(value)) return;
|
||||||
setSearchValue(value);
|
setSearchValue(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,262 +10,110 @@
|
|||||||
|
|
||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from '@tanstack/react-router'
|
||||||
|
|
||||||
// Import Routes
|
import { Route as rootRouteImport } from './routes/__root'
|
||||||
|
import { Route as LeadsDealIdRouteImport } from './routes/leads.$dealId'
|
||||||
|
import { Route as DealsDealIdRouteImport } from './routes/deals.$dealId'
|
||||||
|
|
||||||
import { Route as rootRoute } from './routes/__root'
|
const TestLazyRouteImport = createFileRoute('/test')()
|
||||||
import { Route as LeadsDealIdImport } from './routes/leads.$dealId'
|
const StatisticsLazyRouteImport = createFileRoute('/statistics')()
|
||||||
import { Route as DealsDealIdImport } from './routes/deals.$dealId'
|
const Shipping_warehousesLazyRouteImport = createFileRoute(
|
||||||
|
'/shipping_warehouses',
|
||||||
|
)()
|
||||||
|
const ServicesLazyRouteImport = createFileRoute('/services')()
|
||||||
|
const ResiduesLazyRouteImport = createFileRoute('/residues')()
|
||||||
|
const ReceiptLazyRouteImport = createFileRoute('/receipt')()
|
||||||
|
const ProductsLazyRouteImport = createFileRoute('/products')()
|
||||||
|
const MarketplacesLazyRouteImport = createFileRoute('/marketplaces')()
|
||||||
|
const LoginLazyRouteImport = createFileRoute('/login')()
|
||||||
|
const LeadsLazyRouteImport = createFileRoute('/leads')()
|
||||||
|
const ClientsLazyRouteImport = createFileRoute('/clients')()
|
||||||
|
const BarcodeLazyRouteImport = createFileRoute('/barcode')()
|
||||||
|
const AdminLazyRouteImport = createFileRoute('/admin')()
|
||||||
|
const IndexLazyRouteImport = createFileRoute('/')()
|
||||||
|
|
||||||
// Create Virtual Routes
|
const TestLazyRoute = TestLazyRouteImport.update({
|
||||||
|
|
||||||
const TestLazyImport = createFileRoute('/test')()
|
|
||||||
const StatisticsLazyImport = createFileRoute('/statistics')()
|
|
||||||
const ShippingwarehousesLazyImport = createFileRoute('/shipping_warehouses')()
|
|
||||||
const ServicesLazyImport = createFileRoute('/services')()
|
|
||||||
const ResiduesLazyImport = createFileRoute('/residues')()
|
|
||||||
const ReceiptLazyImport = createFileRoute('/receipt')()
|
|
||||||
const ProductsLazyImport = createFileRoute('/products')()
|
|
||||||
const MarketplacesLazyImport = createFileRoute('/marketplaces')()
|
|
||||||
const LoginLazyImport = createFileRoute('/login')()
|
|
||||||
const LeadsLazyImport = createFileRoute('/leads')()
|
|
||||||
const ClientsLazyImport = createFileRoute('/clients')()
|
|
||||||
const BarcodeLazyImport = createFileRoute('/barcode')()
|
|
||||||
const AdminLazyImport = createFileRoute('/admin')()
|
|
||||||
const IndexLazyImport = createFileRoute('/')()
|
|
||||||
|
|
||||||
// Create/Update Routes
|
|
||||||
|
|
||||||
const TestLazyRoute = TestLazyImport.update({
|
|
||||||
id: '/test',
|
id: '/test',
|
||||||
path: '/test',
|
path: '/test',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/test.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/test.lazy').then((d) => d.Route))
|
||||||
|
const StatisticsLazyRoute = StatisticsLazyRouteImport.update({
|
||||||
const StatisticsLazyRoute = StatisticsLazyImport.update({
|
|
||||||
id: '/statistics',
|
id: '/statistics',
|
||||||
path: '/statistics',
|
path: '/statistics',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/statistics.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/statistics.lazy').then((d) => d.Route))
|
||||||
|
const Shipping_warehousesLazyRoute = Shipping_warehousesLazyRouteImport.update({
|
||||||
const ShippingwarehousesLazyRoute = ShippingwarehousesLazyImport.update({
|
|
||||||
id: '/shipping_warehouses',
|
id: '/shipping_warehouses',
|
||||||
path: '/shipping_warehouses',
|
path: '/shipping_warehouses',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() =>
|
} as any).lazy(() =>
|
||||||
import('./routes/shipping_warehouses.lazy').then((d) => d.Route),
|
import('./routes/shipping_warehouses.lazy').then((d) => d.Route),
|
||||||
)
|
)
|
||||||
|
const ServicesLazyRoute = ServicesLazyRouteImport.update({
|
||||||
const ServicesLazyRoute = ServicesLazyImport.update({
|
|
||||||
id: '/services',
|
id: '/services',
|
||||||
path: '/services',
|
path: '/services',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/services.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/services.lazy').then((d) => d.Route))
|
||||||
|
const ResiduesLazyRoute = ResiduesLazyRouteImport.update({
|
||||||
const ResiduesLazyRoute = ResiduesLazyImport.update({
|
|
||||||
id: '/residues',
|
id: '/residues',
|
||||||
path: '/residues',
|
path: '/residues',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/residues.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/residues.lazy').then((d) => d.Route))
|
||||||
|
const ReceiptLazyRoute = ReceiptLazyRouteImport.update({
|
||||||
const ReceiptLazyRoute = ReceiptLazyImport.update({
|
|
||||||
id: '/receipt',
|
id: '/receipt',
|
||||||
path: '/receipt',
|
path: '/receipt',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/receipt.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/receipt.lazy').then((d) => d.Route))
|
||||||
|
const ProductsLazyRoute = ProductsLazyRouteImport.update({
|
||||||
const ProductsLazyRoute = ProductsLazyImport.update({
|
|
||||||
id: '/products',
|
id: '/products',
|
||||||
path: '/products',
|
path: '/products',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/products.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/products.lazy').then((d) => d.Route))
|
||||||
|
const MarketplacesLazyRoute = MarketplacesLazyRouteImport.update({
|
||||||
const MarketplacesLazyRoute = MarketplacesLazyImport.update({
|
|
||||||
id: '/marketplaces',
|
id: '/marketplaces',
|
||||||
path: '/marketplaces',
|
path: '/marketplaces',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/marketplaces.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/marketplaces.lazy').then((d) => d.Route))
|
||||||
|
const LoginLazyRoute = LoginLazyRouteImport.update({
|
||||||
const LoginLazyRoute = LoginLazyImport.update({
|
|
||||||
id: '/login',
|
id: '/login',
|
||||||
path: '/login',
|
path: '/login',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/login.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/login.lazy').then((d) => d.Route))
|
||||||
|
const LeadsLazyRoute = LeadsLazyRouteImport.update({
|
||||||
const LeadsLazyRoute = LeadsLazyImport.update({
|
|
||||||
id: '/leads',
|
id: '/leads',
|
||||||
path: '/leads',
|
path: '/leads',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/leads.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/leads.lazy').then((d) => d.Route))
|
||||||
|
const ClientsLazyRoute = ClientsLazyRouteImport.update({
|
||||||
const ClientsLazyRoute = ClientsLazyImport.update({
|
|
||||||
id: '/clients',
|
id: '/clients',
|
||||||
path: '/clients',
|
path: '/clients',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/clients.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/clients.lazy').then((d) => d.Route))
|
||||||
|
const BarcodeLazyRoute = BarcodeLazyRouteImport.update({
|
||||||
const BarcodeLazyRoute = BarcodeLazyImport.update({
|
|
||||||
id: '/barcode',
|
id: '/barcode',
|
||||||
path: '/barcode',
|
path: '/barcode',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/barcode.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/barcode.lazy').then((d) => d.Route))
|
||||||
|
const AdminLazyRoute = AdminLazyRouteImport.update({
|
||||||
const AdminLazyRoute = AdminLazyImport.update({
|
|
||||||
id: '/admin',
|
id: '/admin',
|
||||||
path: '/admin',
|
path: '/admin',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/admin.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/admin.lazy').then((d) => d.Route))
|
||||||
|
const IndexLazyRoute = IndexLazyRouteImport.update({
|
||||||
const IndexLazyRoute = IndexLazyImport.update({
|
|
||||||
id: '/',
|
id: '/',
|
||||||
path: '/',
|
path: '/',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any).lazy(() => import('./routes/index.lazy').then((d) => d.Route))
|
} as any).lazy(() => import('./routes/index.lazy').then((d) => d.Route))
|
||||||
|
const LeadsDealIdRoute = LeadsDealIdRouteImport.update({
|
||||||
const LeadsDealIdRoute = LeadsDealIdImport.update({
|
|
||||||
id: '/$dealId',
|
id: '/$dealId',
|
||||||
path: '/$dealId',
|
path: '/$dealId',
|
||||||
getParentRoute: () => LeadsLazyRoute,
|
getParentRoute: () => LeadsLazyRoute,
|
||||||
} as any)
|
} as any)
|
||||||
|
const DealsDealIdRoute = DealsDealIdRouteImport.update({
|
||||||
const DealsDealIdRoute = DealsDealIdImport.update({
|
|
||||||
id: '/deals/$dealId',
|
id: '/deals/$dealId',
|
||||||
path: '/deals/$dealId',
|
path: '/deals/$dealId',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
|
||||||
// Populate the FileRoutesByPath interface
|
|
||||||
|
|
||||||
declare module '@tanstack/react-router' {
|
|
||||||
interface FileRoutesByPath {
|
|
||||||
'/': {
|
|
||||||
id: '/'
|
|
||||||
path: '/'
|
|
||||||
fullPath: '/'
|
|
||||||
preLoaderRoute: typeof IndexLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/admin': {
|
|
||||||
id: '/admin'
|
|
||||||
path: '/admin'
|
|
||||||
fullPath: '/admin'
|
|
||||||
preLoaderRoute: typeof AdminLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/barcode': {
|
|
||||||
id: '/barcode'
|
|
||||||
path: '/barcode'
|
|
||||||
fullPath: '/barcode'
|
|
||||||
preLoaderRoute: typeof BarcodeLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/clients': {
|
|
||||||
id: '/clients'
|
|
||||||
path: '/clients'
|
|
||||||
fullPath: '/clients'
|
|
||||||
preLoaderRoute: typeof ClientsLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/leads': {
|
|
||||||
id: '/leads'
|
|
||||||
path: '/leads'
|
|
||||||
fullPath: '/leads'
|
|
||||||
preLoaderRoute: typeof LeadsLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/login': {
|
|
||||||
id: '/login'
|
|
||||||
path: '/login'
|
|
||||||
fullPath: '/login'
|
|
||||||
preLoaderRoute: typeof LoginLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/marketplaces': {
|
|
||||||
id: '/marketplaces'
|
|
||||||
path: '/marketplaces'
|
|
||||||
fullPath: '/marketplaces'
|
|
||||||
preLoaderRoute: typeof MarketplacesLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/products': {
|
|
||||||
id: '/products'
|
|
||||||
path: '/products'
|
|
||||||
fullPath: '/products'
|
|
||||||
preLoaderRoute: typeof ProductsLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/receipt': {
|
|
||||||
id: '/receipt'
|
|
||||||
path: '/receipt'
|
|
||||||
fullPath: '/receipt'
|
|
||||||
preLoaderRoute: typeof ReceiptLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/residues': {
|
|
||||||
id: '/residues'
|
|
||||||
path: '/residues'
|
|
||||||
fullPath: '/residues'
|
|
||||||
preLoaderRoute: typeof ResiduesLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/services': {
|
|
||||||
id: '/services'
|
|
||||||
path: '/services'
|
|
||||||
fullPath: '/services'
|
|
||||||
preLoaderRoute: typeof ServicesLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/shipping_warehouses': {
|
|
||||||
id: '/shipping_warehouses'
|
|
||||||
path: '/shipping_warehouses'
|
|
||||||
fullPath: '/shipping_warehouses'
|
|
||||||
preLoaderRoute: typeof ShippingwarehousesLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/statistics': {
|
|
||||||
id: '/statistics'
|
|
||||||
path: '/statistics'
|
|
||||||
fullPath: '/statistics'
|
|
||||||
preLoaderRoute: typeof StatisticsLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/test': {
|
|
||||||
id: '/test'
|
|
||||||
path: '/test'
|
|
||||||
fullPath: '/test'
|
|
||||||
preLoaderRoute: typeof TestLazyImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/deals/$dealId': {
|
|
||||||
id: '/deals/$dealId'
|
|
||||||
path: '/deals/$dealId'
|
|
||||||
fullPath: '/deals/$dealId'
|
|
||||||
preLoaderRoute: typeof DealsDealIdImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/leads/$dealId': {
|
|
||||||
id: '/leads/$dealId'
|
|
||||||
path: '/$dealId'
|
|
||||||
fullPath: '/leads/$dealId'
|
|
||||||
preLoaderRoute: typeof LeadsDealIdImport
|
|
||||||
parentRoute: typeof LeadsLazyImport
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create and export the route tree
|
|
||||||
|
|
||||||
interface LeadsLazyRouteChildren {
|
|
||||||
LeadsDealIdRoute: typeof LeadsDealIdRoute
|
|
||||||
}
|
|
||||||
|
|
||||||
const LeadsLazyRouteChildren: LeadsLazyRouteChildren = {
|
|
||||||
LeadsDealIdRoute: LeadsDealIdRoute,
|
|
||||||
}
|
|
||||||
|
|
||||||
const LeadsLazyRouteWithChildren = LeadsLazyRoute._addFileChildren(
|
|
||||||
LeadsLazyRouteChildren,
|
|
||||||
)
|
|
||||||
|
|
||||||
export interface FileRoutesByFullPath {
|
export interface FileRoutesByFullPath {
|
||||||
'/': typeof IndexLazyRoute
|
'/': typeof IndexLazyRoute
|
||||||
'/admin': typeof AdminLazyRoute
|
'/admin': typeof AdminLazyRoute
|
||||||
@@ -278,13 +126,12 @@ export interface FileRoutesByFullPath {
|
|||||||
'/receipt': typeof ReceiptLazyRoute
|
'/receipt': typeof ReceiptLazyRoute
|
||||||
'/residues': typeof ResiduesLazyRoute
|
'/residues': typeof ResiduesLazyRoute
|
||||||
'/services': typeof ServicesLazyRoute
|
'/services': typeof ServicesLazyRoute
|
||||||
'/shipping_warehouses': typeof ShippingwarehousesLazyRoute
|
'/shipping_warehouses': typeof Shipping_warehousesLazyRoute
|
||||||
'/statistics': typeof StatisticsLazyRoute
|
'/statistics': typeof StatisticsLazyRoute
|
||||||
'/test': typeof TestLazyRoute
|
'/test': typeof TestLazyRoute
|
||||||
'/deals/$dealId': typeof DealsDealIdRoute
|
'/deals/$dealId': typeof DealsDealIdRoute
|
||||||
'/leads/$dealId': typeof LeadsDealIdRoute
|
'/leads/$dealId': typeof LeadsDealIdRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FileRoutesByTo {
|
export interface FileRoutesByTo {
|
||||||
'/': typeof IndexLazyRoute
|
'/': typeof IndexLazyRoute
|
||||||
'/admin': typeof AdminLazyRoute
|
'/admin': typeof AdminLazyRoute
|
||||||
@@ -297,15 +144,14 @@ export interface FileRoutesByTo {
|
|||||||
'/receipt': typeof ReceiptLazyRoute
|
'/receipt': typeof ReceiptLazyRoute
|
||||||
'/residues': typeof ResiduesLazyRoute
|
'/residues': typeof ResiduesLazyRoute
|
||||||
'/services': typeof ServicesLazyRoute
|
'/services': typeof ServicesLazyRoute
|
||||||
'/shipping_warehouses': typeof ShippingwarehousesLazyRoute
|
'/shipping_warehouses': typeof Shipping_warehousesLazyRoute
|
||||||
'/statistics': typeof StatisticsLazyRoute
|
'/statistics': typeof StatisticsLazyRoute
|
||||||
'/test': typeof TestLazyRoute
|
'/test': typeof TestLazyRoute
|
||||||
'/deals/$dealId': typeof DealsDealIdRoute
|
'/deals/$dealId': typeof DealsDealIdRoute
|
||||||
'/leads/$dealId': typeof LeadsDealIdRoute
|
'/leads/$dealId': typeof LeadsDealIdRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FileRoutesById {
|
export interface FileRoutesById {
|
||||||
__root__: typeof rootRoute
|
__root__: typeof rootRouteImport
|
||||||
'/': typeof IndexLazyRoute
|
'/': typeof IndexLazyRoute
|
||||||
'/admin': typeof AdminLazyRoute
|
'/admin': typeof AdminLazyRoute
|
||||||
'/barcode': typeof BarcodeLazyRoute
|
'/barcode': typeof BarcodeLazyRoute
|
||||||
@@ -317,13 +163,12 @@ export interface FileRoutesById {
|
|||||||
'/receipt': typeof ReceiptLazyRoute
|
'/receipt': typeof ReceiptLazyRoute
|
||||||
'/residues': typeof ResiduesLazyRoute
|
'/residues': typeof ResiduesLazyRoute
|
||||||
'/services': typeof ServicesLazyRoute
|
'/services': typeof ServicesLazyRoute
|
||||||
'/shipping_warehouses': typeof ShippingwarehousesLazyRoute
|
'/shipping_warehouses': typeof Shipping_warehousesLazyRoute
|
||||||
'/statistics': typeof StatisticsLazyRoute
|
'/statistics': typeof StatisticsLazyRoute
|
||||||
'/test': typeof TestLazyRoute
|
'/test': typeof TestLazyRoute
|
||||||
'/deals/$dealId': typeof DealsDealIdRoute
|
'/deals/$dealId': typeof DealsDealIdRoute
|
||||||
'/leads/$dealId': typeof LeadsDealIdRoute
|
'/leads/$dealId': typeof LeadsDealIdRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FileRouteTypes {
|
export interface FileRouteTypes {
|
||||||
fileRoutesByFullPath: FileRoutesByFullPath
|
fileRoutesByFullPath: FileRoutesByFullPath
|
||||||
fullPaths:
|
fullPaths:
|
||||||
@@ -381,7 +226,6 @@ export interface FileRouteTypes {
|
|||||||
| '/leads/$dealId'
|
| '/leads/$dealId'
|
||||||
fileRoutesById: FileRoutesById
|
fileRoutesById: FileRoutesById
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RootRouteChildren {
|
export interface RootRouteChildren {
|
||||||
IndexLazyRoute: typeof IndexLazyRoute
|
IndexLazyRoute: typeof IndexLazyRoute
|
||||||
AdminLazyRoute: typeof AdminLazyRoute
|
AdminLazyRoute: typeof AdminLazyRoute
|
||||||
@@ -394,12 +238,141 @@ export interface RootRouteChildren {
|
|||||||
ReceiptLazyRoute: typeof ReceiptLazyRoute
|
ReceiptLazyRoute: typeof ReceiptLazyRoute
|
||||||
ResiduesLazyRoute: typeof ResiduesLazyRoute
|
ResiduesLazyRoute: typeof ResiduesLazyRoute
|
||||||
ServicesLazyRoute: typeof ServicesLazyRoute
|
ServicesLazyRoute: typeof ServicesLazyRoute
|
||||||
ShippingwarehousesLazyRoute: typeof ShippingwarehousesLazyRoute
|
Shipping_warehousesLazyRoute: typeof Shipping_warehousesLazyRoute
|
||||||
StatisticsLazyRoute: typeof StatisticsLazyRoute
|
StatisticsLazyRoute: typeof StatisticsLazyRoute
|
||||||
TestLazyRoute: typeof TestLazyRoute
|
TestLazyRoute: typeof TestLazyRoute
|
||||||
DealsDealIdRoute: typeof DealsDealIdRoute
|
DealsDealIdRoute: typeof DealsDealIdRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module '@tanstack/react-router' {
|
||||||
|
interface FileRoutesByPath {
|
||||||
|
'/test': {
|
||||||
|
id: '/test'
|
||||||
|
path: '/test'
|
||||||
|
fullPath: '/test'
|
||||||
|
preLoaderRoute: typeof TestLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/statistics': {
|
||||||
|
id: '/statistics'
|
||||||
|
path: '/statistics'
|
||||||
|
fullPath: '/statistics'
|
||||||
|
preLoaderRoute: typeof StatisticsLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/shipping_warehouses': {
|
||||||
|
id: '/shipping_warehouses'
|
||||||
|
path: '/shipping_warehouses'
|
||||||
|
fullPath: '/shipping_warehouses'
|
||||||
|
preLoaderRoute: typeof Shipping_warehousesLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/services': {
|
||||||
|
id: '/services'
|
||||||
|
path: '/services'
|
||||||
|
fullPath: '/services'
|
||||||
|
preLoaderRoute: typeof ServicesLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/residues': {
|
||||||
|
id: '/residues'
|
||||||
|
path: '/residues'
|
||||||
|
fullPath: '/residues'
|
||||||
|
preLoaderRoute: typeof ResiduesLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/receipt': {
|
||||||
|
id: '/receipt'
|
||||||
|
path: '/receipt'
|
||||||
|
fullPath: '/receipt'
|
||||||
|
preLoaderRoute: typeof ReceiptLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/products': {
|
||||||
|
id: '/products'
|
||||||
|
path: '/products'
|
||||||
|
fullPath: '/products'
|
||||||
|
preLoaderRoute: typeof ProductsLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/marketplaces': {
|
||||||
|
id: '/marketplaces'
|
||||||
|
path: '/marketplaces'
|
||||||
|
fullPath: '/marketplaces'
|
||||||
|
preLoaderRoute: typeof MarketplacesLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/login': {
|
||||||
|
id: '/login'
|
||||||
|
path: '/login'
|
||||||
|
fullPath: '/login'
|
||||||
|
preLoaderRoute: typeof LoginLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/leads': {
|
||||||
|
id: '/leads'
|
||||||
|
path: '/leads'
|
||||||
|
fullPath: '/leads'
|
||||||
|
preLoaderRoute: typeof LeadsLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/clients': {
|
||||||
|
id: '/clients'
|
||||||
|
path: '/clients'
|
||||||
|
fullPath: '/clients'
|
||||||
|
preLoaderRoute: typeof ClientsLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/barcode': {
|
||||||
|
id: '/barcode'
|
||||||
|
path: '/barcode'
|
||||||
|
fullPath: '/barcode'
|
||||||
|
preLoaderRoute: typeof BarcodeLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/admin': {
|
||||||
|
id: '/admin'
|
||||||
|
path: '/admin'
|
||||||
|
fullPath: '/admin'
|
||||||
|
preLoaderRoute: typeof AdminLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/': {
|
||||||
|
id: '/'
|
||||||
|
path: '/'
|
||||||
|
fullPath: '/'
|
||||||
|
preLoaderRoute: typeof IndexLazyRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
'/leads/$dealId': {
|
||||||
|
id: '/leads/$dealId'
|
||||||
|
path: '/$dealId'
|
||||||
|
fullPath: '/leads/$dealId'
|
||||||
|
preLoaderRoute: typeof LeadsDealIdRouteImport
|
||||||
|
parentRoute: typeof LeadsLazyRoute
|
||||||
|
}
|
||||||
|
'/deals/$dealId': {
|
||||||
|
id: '/deals/$dealId'
|
||||||
|
path: '/deals/$dealId'
|
||||||
|
fullPath: '/deals/$dealId'
|
||||||
|
preLoaderRoute: typeof DealsDealIdRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface LeadsLazyRouteChildren {
|
||||||
|
LeadsDealIdRoute: typeof LeadsDealIdRoute
|
||||||
|
}
|
||||||
|
|
||||||
|
const LeadsLazyRouteChildren: LeadsLazyRouteChildren = {
|
||||||
|
LeadsDealIdRoute: LeadsDealIdRoute,
|
||||||
|
}
|
||||||
|
|
||||||
|
const LeadsLazyRouteWithChildren = LeadsLazyRoute._addFileChildren(
|
||||||
|
LeadsLazyRouteChildren,
|
||||||
|
)
|
||||||
|
|
||||||
const rootRouteChildren: RootRouteChildren = {
|
const rootRouteChildren: RootRouteChildren = {
|
||||||
IndexLazyRoute: IndexLazyRoute,
|
IndexLazyRoute: IndexLazyRoute,
|
||||||
AdminLazyRoute: AdminLazyRoute,
|
AdminLazyRoute: AdminLazyRoute,
|
||||||
@@ -412,91 +385,11 @@ const rootRouteChildren: RootRouteChildren = {
|
|||||||
ReceiptLazyRoute: ReceiptLazyRoute,
|
ReceiptLazyRoute: ReceiptLazyRoute,
|
||||||
ResiduesLazyRoute: ResiduesLazyRoute,
|
ResiduesLazyRoute: ResiduesLazyRoute,
|
||||||
ServicesLazyRoute: ServicesLazyRoute,
|
ServicesLazyRoute: ServicesLazyRoute,
|
||||||
ShippingwarehousesLazyRoute: ShippingwarehousesLazyRoute,
|
Shipping_warehousesLazyRoute: Shipping_warehousesLazyRoute,
|
||||||
StatisticsLazyRoute: StatisticsLazyRoute,
|
StatisticsLazyRoute: StatisticsLazyRoute,
|
||||||
TestLazyRoute: TestLazyRoute,
|
TestLazyRoute: TestLazyRoute,
|
||||||
DealsDealIdRoute: DealsDealIdRoute,
|
DealsDealIdRoute: DealsDealIdRoute,
|
||||||
}
|
}
|
||||||
|
export const routeTree = rootRouteImport
|
||||||
export const routeTree = rootRoute
|
|
||||||
._addFileChildren(rootRouteChildren)
|
._addFileChildren(rootRouteChildren)
|
||||||
._addFileTypes<FileRouteTypes>()
|
._addFileTypes<FileRouteTypes>()
|
||||||
|
|
||||||
/* ROUTE_MANIFEST_START
|
|
||||||
{
|
|
||||||
"routes": {
|
|
||||||
"__root__": {
|
|
||||||
"filePath": "__root.tsx",
|
|
||||||
"children": [
|
|
||||||
"/",
|
|
||||||
"/admin",
|
|
||||||
"/barcode",
|
|
||||||
"/clients",
|
|
||||||
"/leads",
|
|
||||||
"/login",
|
|
||||||
"/marketplaces",
|
|
||||||
"/products",
|
|
||||||
"/receipt",
|
|
||||||
"/residues",
|
|
||||||
"/services",
|
|
||||||
"/shipping_warehouses",
|
|
||||||
"/statistics",
|
|
||||||
"/test",
|
|
||||||
"/deals/$dealId"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"/": {
|
|
||||||
"filePath": "index.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/admin": {
|
|
||||||
"filePath": "admin.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/barcode": {
|
|
||||||
"filePath": "barcode.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/clients": {
|
|
||||||
"filePath": "clients.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/leads": {
|
|
||||||
"filePath": "leads.lazy.tsx",
|
|
||||||
"children": [
|
|
||||||
"/leads/$dealId"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"/login": {
|
|
||||||
"filePath": "login.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/marketplaces": {
|
|
||||||
"filePath": "marketplaces.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/products": {
|
|
||||||
"filePath": "products.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/receipt": {
|
|
||||||
"filePath": "receipt.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/residues": {
|
|
||||||
"filePath": "residues.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/services": {
|
|
||||||
"filePath": "services.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/shipping_warehouses": {
|
|
||||||
"filePath": "shipping_warehouses.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/statistics": {
|
|
||||||
"filePath": "statistics.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/test": {
|
|
||||||
"filePath": "test.lazy.tsx"
|
|
||||||
},
|
|
||||||
"/deals/$dealId": {
|
|
||||||
"filePath": "deals.$dealId.tsx"
|
|
||||||
},
|
|
||||||
"/leads/$dealId": {
|
|
||||||
"filePath": "leads.$dealId.tsx",
|
|
||||||
"parent": "/leads"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ROUTE_MANIFEST_END */
|
|
||||||
|
|||||||
Reference in New Issue
Block a user