mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 16:40:56 +00:00
Backend (edr-freight-api): - Warehouse, WarehouseYard, WarehouseZone, WarehouseInventory entities - CRUD for warehouses/yards/zones with scoped code uniqueness - Inventory receive with location-hierarchy + capacity validation and transactional capacity-counter updates - inspect / ready-for-loading status transitions - inventory inquiry (booking/customer/container/cargo-type joins) - migration creating freight.warehouse* tables Frontend (freight backoffice): - types, service, react-query hooks, URL constants - reusable components: badges, filters, table/card views, inventory and inquiry tables, create/receive modals - pages: Warehouse list, detail (overview/yards/zones/inventory tabs), inventory, inventory inquiry - Warehouse Information card + Receive At Warehouse on booking detail - routes + sidebar nav; app-wide ErrorBoundary Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
import { StrictMode } from "react";
|
|
import { createRoot } from "react-dom/client";
|
|
import { BrowserRouter } from "react-router-dom";
|
|
import { MantineProvider } from "@mantine/core";
|
|
import "@mantine/core/styles.css";
|
|
import "@edr/ui-common/styles.css";
|
|
import "../index.css";
|
|
import "@edr/ui-common/theme.css";
|
|
|
|
import { Toaster } from "react-hot-toast";
|
|
|
|
import App from "./App";
|
|
import { ErrorBoundary } from "./components/ErrorBoundary";
|
|
import { AuthProvider } from "./auth/AuthProvider";
|
|
import { queryClient } from "./lib/queryClient";
|
|
import { freightMantineTheme } from "./theme/freight-brand";
|
|
import { QueryClientProvider } from "@tanstack/react-query";
|
|
|
|
const THEME_STORAGE_KEY = "edr-theme";
|
|
|
|
const applyStoredTheme = () => {
|
|
const storedTheme = window.localStorage.getItem(THEME_STORAGE_KEY);
|
|
const prefersDark = window.matchMedia?.("(prefers-color-scheme: dark)").matches;
|
|
const theme = storedTheme === "dark" || storedTheme === "light"
|
|
? storedTheme
|
|
: prefersDark
|
|
? "dark"
|
|
: "light";
|
|
|
|
if (theme === "dark") {
|
|
document.documentElement.classList.add("dark");
|
|
return;
|
|
}
|
|
|
|
document.documentElement.classList.remove("dark");
|
|
};
|
|
|
|
applyStoredTheme();
|
|
|
|
const rootElement = document.getElementById("root");
|
|
|
|
if (!rootElement) {
|
|
throw new Error("Root element not found");
|
|
}
|
|
|
|
createRoot(rootElement).render(
|
|
<QueryClientProvider client={queryClient}>
|
|
<MantineProvider theme={freightMantineTheme}>
|
|
<StrictMode>
|
|
<BrowserRouter>
|
|
<AuthProvider>
|
|
<ErrorBoundary>
|
|
<App />
|
|
</ErrorBoundary>
|
|
<Toaster position="top-right" />
|
|
</AuthProvider>
|
|
</BrowserRouter>
|
|
</StrictMode>
|
|
</MantineProvider>
|
|
</QueryClientProvider>
|
|
);
|