agentic-dev 0.2.9 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -8
- package/bin/agentic-dev.mjs +692 -55
- package/lib/scaffold.mjs +109 -6
- package/package.json +1 -1
- package/client/admin/.dockerignore +0 -3
- package/client/admin/.env.example +0 -1
- package/client/admin/Dockerfile +0 -16
- package/client/admin/Dockerfile.dev +0 -18
- package/client/admin/README.md +0 -20
- package/client/admin/index.html +0 -12
- package/client/admin/package.json +0 -41
- package/client/admin/postcss.config.js +0 -6
- package/client/admin/scripts/ui-parity-admin-adapter.mjs +0 -65
- package/client/admin/src/api/alerts.ts +0 -33
- package/client/admin/src/api/client.ts +0 -71
- package/client/admin/src/api/orders.ts +0 -33
- package/client/admin/src/api/support.ts +0 -11
- package/client/admin/src/app/App.tsx +0 -23
- package/client/admin/src/auth/AuthProvider.tsx +0 -122
- package/client/admin/src/auth/ProtectedRoute.tsx +0 -22
- package/client/admin/src/auth/auth-client.ts +0 -38
- package/client/admin/src/auth/types.ts +0 -18
- package/client/admin/src/components/AdminNotificationsDrawer.tsx +0 -162
- package/client/admin/src/components/AdminShell.tsx +0 -76
- package/client/admin/src/components/ui/button.tsx +0 -34
- package/client/admin/src/components/ui/input.tsx +0 -21
- package/client/admin/src/lib/cn.ts +0 -6
- package/client/admin/src/lib/specRouteCatalog.json +0 -30
- package/client/admin/src/lib/specScreens.json +0 -22
- package/client/admin/src/main.tsx +0 -17
- package/client/admin/src/pages/AdminDashboardPage.tsx +0 -171
- package/client/admin/src/pages/AdminLoginPage.tsx +0 -75
- package/client/admin/src/pages/AdminQueuePage.tsx +0 -107
- package/client/admin/src/pages/AdminSupportPage.tsx +0 -61
- package/client/admin/src/styles/globals.css +0 -17
- package/client/admin/src/theme-vars.ts +0 -18
- package/client/admin/src/theme.ts +0 -25
- package/client/admin/src/vite-env.d.ts +0 -1
- package/client/admin/tailwind.config.js +0 -8
- package/client/admin/tsconfig.json +0 -25
- package/client/admin/vite.config.ts +0 -12
- package/client/landing/.dockerignore +0 -3
- package/client/landing/.env.example +0 -1
- package/client/landing/Dockerfile +0 -16
- package/client/landing/Dockerfile.dev +0 -18
- package/client/landing/README.md +0 -18
- package/client/landing/index.html +0 -12
- package/client/landing/package.json +0 -41
- package/client/landing/postcss.config.js +0 -6
- package/client/landing/scripts/ui-parity-landing-adapter.mjs +0 -65
- package/client/landing/src/App.tsx +0 -21
- package/client/landing/src/api/catalog.ts +0 -30
- package/client/landing/src/api/client.ts +0 -30
- package/client/landing/src/auth/AuthProvider.tsx +0 -122
- package/client/landing/src/auth/ProtectedRoute.tsx +0 -22
- package/client/landing/src/auth/auth-client.ts +0 -38
- package/client/landing/src/auth/types.ts +0 -18
- package/client/landing/src/components/LandingShell.tsx +0 -34
- package/client/landing/src/lib/specRouteCatalog.json +0 -23
- package/client/landing/src/lib/specScreens.json +0 -17
- package/client/landing/src/main.tsx +0 -17
- package/client/landing/src/pages/LandingHomePage.tsx +0 -215
- package/client/landing/src/pages/LandingLoginPage.tsx +0 -90
- package/client/landing/src/pages/LandingWorkspacePage.tsx +0 -126
- package/client/landing/src/styles/globals.css +0 -17
- package/client/landing/src/theme-vars.ts +0 -16
- package/client/landing/src/theme.ts +0 -21
- package/client/landing/src/vite-env.d.ts +0 -1
- package/client/landing/tailwind.config.js +0 -8
- package/client/landing/tsconfig.json +0 -25
- package/client/landing/vite.config.ts +0 -12
- package/client/mobile/.dockerignore +0 -2
- package/client/mobile/.env.example +0 -1
- package/client/mobile/Dockerfile +0 -16
- package/client/mobile/Dockerfile.dev +0 -18
- package/client/mobile/README.md +0 -19
- package/client/mobile/index.html +0 -12
- package/client/mobile/package.json +0 -42
- package/client/mobile/postcss.config.js +0 -6
- package/client/mobile/scripts/ui-parity-mobile-adapter.mjs +0 -67
- package/client/mobile/src/App.tsx +0 -1
- package/client/mobile/src/api/client.ts +0 -62
- package/client/mobile/src/api/fulfillment.ts +0 -55
- package/client/mobile/src/api/shipping.ts +0 -56
- package/client/mobile/src/app/App.tsx +0 -23
- package/client/mobile/src/auth/AuthProvider.tsx +0 -122
- package/client/mobile/src/auth/ProtectedRoute.tsx +0 -27
- package/client/mobile/src/auth/auth-client.ts +0 -38
- package/client/mobile/src/auth/types.ts +0 -18
- package/client/mobile/src/components/InShell.tsx +0 -74
- package/client/mobile/src/components/ui/button.tsx +0 -35
- package/client/mobile/src/components/ui/card.tsx +0 -15
- package/client/mobile/src/components/ui/input.tsx +0 -21
- package/client/mobile/src/lib/cn.ts +0 -6
- package/client/mobile/src/lib/specRouteCatalog.json +0 -26
- package/client/mobile/src/lib/specScreens.json +0 -22
- package/client/mobile/src/lib/useSpeechRecognitionInput.ts +0 -271
- package/client/mobile/src/main.tsx +0 -17
- package/client/mobile/src/pages/DashboardPage.tsx +0 -172
- package/client/mobile/src/pages/FulfillmentPage.tsx +0 -138
- package/client/mobile/src/pages/LoginPage.tsx +0 -74
- package/client/mobile/src/pages/ShippingPage.tsx +0 -338
- package/client/mobile/src/styles/globals.css +0 -23
- package/client/mobile/src/theme-vars.ts +0 -16
- package/client/mobile/src/theme.ts +0 -21
- package/client/mobile/src/vite-env.d.ts +0 -1
- package/client/mobile/tailwind.config.js +0 -8
- package/client/mobile/tsconfig.json +0 -25
- package/client/mobile/vite.config.ts +0 -12
- package/client/web/.dockerignore +0 -3
- package/client/web/.env.example +0 -1
- package/client/web/Dockerfile +0 -16
- package/client/web/Dockerfile.dev +0 -18
- package/client/web/README.md +0 -47
- package/client/web/index.html +0 -12
- package/client/web/package.json +0 -42
- package/client/web/postcss.config.js +0 -6
- package/client/web/scripts/ui-parity-web-adapter.mjs +0 -66
- package/client/web/src/api/client.ts +0 -30
- package/client/web/src/api/orders.ts +0 -42
- package/client/web/src/app/App.tsx +0 -21
- package/client/web/src/auth/AuthProvider.tsx +0 -122
- package/client/web/src/auth/ProtectedRoute.tsx +0 -22
- package/client/web/src/auth/auth-client.ts +0 -38
- package/client/web/src/auth/types.ts +0 -18
- package/client/web/src/components/AppShell.tsx +0 -59
- package/client/web/src/components/ui/button.tsx +0 -35
- package/client/web/src/components/ui/card.tsx +0 -7
- package/client/web/src/components/ui/input.tsx +0 -21
- package/client/web/src/lib/cn.ts +0 -6
- package/client/web/src/lib/specRouteCatalog.json +0 -23
- package/client/web/src/lib/specScreens.json +0 -17
- package/client/web/src/main.tsx +0 -17
- package/client/web/src/pages/DashboardPage.tsx +0 -158
- package/client/web/src/pages/LoginPage.tsx +0 -72
- package/client/web/src/pages/OrdersPage.tsx +0 -123
- package/client/web/src/styles/globals.css +0 -17
- package/client/web/src/theme-vars.ts +0 -18
- package/client/web/src/theme.ts +0 -25
- package/client/web/src/vite-env.d.ts +0 -1
- package/client/web/tailwind.config.js +0 -8
- package/client/web/tsconfig.json +0 -25
- package/client/web/vite.config.ts +0 -12
- package/server/.dockerignore +0 -4
- package/server/.env.example +0 -19
- package/server/Dockerfile +0 -22
- package/server/Dockerfile.dev +0 -19
- package/server/README.md +0 -33
- package/server/__init__.py +0 -0
- package/server/api/__init__.py +0 -1
- package/server/api/http/__init__.py +0 -4
- package/server/api/http/app.py +0 -53
- package/server/api/http/router.py +0 -24
- package/server/config.py +0 -52
- package/server/contexts/__init__.py +0 -12
- package/server/contexts/alerts/__init__.py +0 -1
- package/server/contexts/alerts/application/__init__.py +0 -13
- package/server/contexts/alerts/application/services.py +0 -41
- package/server/contexts/alerts/contracts/__init__.py +0 -3
- package/server/contexts/alerts/contracts/http/__init__.py +0 -3
- package/server/contexts/alerts/contracts/http/router.py +0 -37
- package/server/contexts/alerts/domain/__init__.py +0 -15
- package/server/contexts/alerts/domain/models.py +0 -29
- package/server/contexts/alerts/infrastructure/__init__.py +0 -11
- package/server/contexts/alerts/infrastructure/repository.py +0 -41
- package/server/contexts/auth/__init__.py +0 -1
- package/server/contexts/auth/application/__init__.py +0 -3
- package/server/contexts/auth/application/ports.py +0 -10
- package/server/contexts/auth/application/services.py +0 -64
- package/server/contexts/auth/contracts/__init__.py +0 -4
- package/server/contexts/auth/contracts/http/__init__.py +0 -4
- package/server/contexts/auth/contracts/http/dependencies.py +0 -37
- package/server/contexts/auth/contracts/http/router.py +0 -19
- package/server/contexts/auth/domain/__init__.py +0 -3
- package/server/contexts/auth/domain/models.py +0 -24
- package/server/contexts/auth/infrastructure/__init__.py +0 -4
- package/server/contexts/auth/infrastructure/adapters/memory.py +0 -19
- package/server/contexts/auth/infrastructure/adapters/mongodb.py +0 -24
- package/server/contexts/auth/infrastructure/adapters/sqlalchemy.py +0 -74
- package/server/contexts/auth/infrastructure/repository.py +0 -28
- package/server/contexts/catalog/__init__.py +0 -1
- package/server/contexts/catalog/application/__init__.py +0 -28
- package/server/contexts/catalog/application/ports.py +0 -15
- package/server/contexts/catalog/application/services.py +0 -154
- package/server/contexts/catalog/contracts/__init__.py +0 -3
- package/server/contexts/catalog/contracts/http/__init__.py +0 -3
- package/server/contexts/catalog/contracts/http/router.py +0 -60
- package/server/contexts/catalog/domain/__init__.py +0 -45
- package/server/contexts/catalog/domain/models.py +0 -113
- package/server/contexts/catalog/infrastructure/__init__.py +0 -4
- package/server/contexts/catalog/infrastructure/adapters/memory.py +0 -62
- package/server/contexts/catalog/infrastructure/repository.py +0 -8
- package/server/contexts/fulfillment/__init__.py +0 -1
- package/server/contexts/fulfillment/application/__init__.py +0 -13
- package/server/contexts/fulfillment/application/ports.py +0 -20
- package/server/contexts/fulfillment/application/services.py +0 -85
- package/server/contexts/fulfillment/contracts/__init__.py +0 -3
- package/server/contexts/fulfillment/contracts/http/__init__.py +0 -3
- package/server/contexts/fulfillment/contracts/http/router.py +0 -40
- package/server/contexts/fulfillment/domain/__init__.py +0 -25
- package/server/contexts/fulfillment/domain/models.py +0 -73
- package/server/contexts/fulfillment/infrastructure/__init__.py +0 -13
- package/server/contexts/fulfillment/infrastructure/adapters/memory.py +0 -43
- package/server/contexts/fulfillment/infrastructure/repository.py +0 -97
- package/server/contexts/health/__init__.py +0 -1
- package/server/contexts/health/application/__init__.py +0 -3
- package/server/contexts/health/application/services.py +0 -2
- package/server/contexts/health/contracts/__init__.py +0 -3
- package/server/contexts/health/contracts/http/__init__.py +0 -3
- package/server/contexts/health/contracts/http/router.py +0 -10
- package/server/contexts/inventory/__init__.py +0 -1
- package/server/contexts/inventory/application/__init__.py +0 -28
- package/server/contexts/inventory/application/ports.py +0 -11
- package/server/contexts/inventory/application/services.py +0 -214
- package/server/contexts/inventory/contracts/__init__.py +0 -3
- package/server/contexts/inventory/contracts/http/__init__.py +0 -3
- package/server/contexts/inventory/contracts/http/router.py +0 -82
- package/server/contexts/inventory/domain/__init__.py +0 -33
- package/server/contexts/inventory/domain/models.py +0 -93
- package/server/contexts/inventory/infrastructure/__init__.py +0 -4
- package/server/contexts/inventory/infrastructure/adapters/memory.py +0 -24
- package/server/contexts/inventory/infrastructure/repository.py +0 -8
- package/server/contexts/orders/__init__.py +0 -1
- package/server/contexts/orders/application/__init__.py +0 -19
- package/server/contexts/orders/application/services.py +0 -127
- package/server/contexts/orders/contracts/__init__.py +0 -3
- package/server/contexts/orders/contracts/http/__init__.py +0 -3
- package/server/contexts/orders/contracts/http/router.py +0 -82
- package/server/contexts/orders/domain/__init__.py +0 -29
- package/server/contexts/orders/domain/models.py +0 -95
- package/server/contexts/orders/infrastructure/__init__.py +0 -7
- package/server/contexts/orders/infrastructure/repository.py +0 -104
- package/server/contexts/shipping/__init__.py +0 -1
- package/server/contexts/shipping/application/__init__.py +0 -13
- package/server/contexts/shipping/application/services.py +0 -92
- package/server/contexts/shipping/contracts/__init__.py +0 -3
- package/server/contexts/shipping/contracts/http/__init__.py +0 -3
- package/server/contexts/shipping/contracts/http/router.py +0 -40
- package/server/contexts/shipping/domain/__init__.py +0 -19
- package/server/contexts/shipping/domain/models.py +0 -48
- package/server/contexts/shipping/infrastructure/__init__.py +0 -9
- package/server/contexts/shipping/infrastructure/repository.py +0 -50
- package/server/contexts/support/__init__.py +0 -1
- package/server/contexts/support/application/__init__.py +0 -13
- package/server/contexts/support/application/services.py +0 -29
- package/server/contexts/support/contracts/__init__.py +0 -3
- package/server/contexts/support/contracts/http/__init__.py +0 -3
- package/server/contexts/support/contracts/http/router.py +0 -40
- package/server/contexts/support/domain/__init__.py +0 -13
- package/server/contexts/support/domain/models.py +0 -27
- package/server/contexts/support/infrastructure/__init__.py +0 -11
- package/server/contexts/support/infrastructure/repository.py +0 -70
- package/server/contexts/user/__init__.py +0 -1
- package/server/contexts/user/application/__init__.py +0 -3
- package/server/contexts/user/application/ports.py +0 -11
- package/server/contexts/user/application/services.py +0 -44
- package/server/contexts/user/contracts/__init__.py +0 -3
- package/server/contexts/user/contracts/http/__init__.py +0 -3
- package/server/contexts/user/contracts/http/router.py +0 -26
- package/server/contexts/user/domain/__init__.py +0 -3
- package/server/contexts/user/domain/models.py +0 -22
- package/server/contexts/user/infrastructure/__init__.py +0 -3
- package/server/contexts/user/infrastructure/adapters/memory.py +0 -27
- package/server/contexts/user/infrastructure/adapters/mongodb.py +0 -41
- package/server/contexts/user/infrastructure/adapters/sqlalchemy.py +0 -94
- package/server/contexts/user/infrastructure/factory.py +0 -28
- package/server/data/README.md +0 -24
- package/server/data/bootstrap/alerts.json +0 -38
- package/server/data/bootstrap/auth_accounts.json +0 -18
- package/server/data/bootstrap/catalog_products.json +0 -179
- package/server/data/bootstrap/fulfillment_events.json +0 -5
- package/server/data/bootstrap/fulfillment_notes.json +0 -5
- package/server/data/bootstrap/fulfillment_tasks.json +0 -50
- package/server/data/bootstrap/inventory_levels.json +0 -80
- package/server/data/bootstrap/orders.json +0 -62
- package/server/data/bootstrap/shipping_shipments.json +0 -50
- package/server/data/bootstrap/support_faqs.json +0 -26
- package/server/data/bootstrap/users.json +0 -20
- package/server/data/bootstrap_loader.py +0 -15
- package/server/docker-entrypoint.sh +0 -56
- package/server/main.py +0 -3
- package/server/pyproject.toml +0 -36
- package/server/shared/__init__.py +0 -1
- package/server/shared/application/__init__.py +0 -3
- package/server/shared/application/health.py +0 -2
- package/server/shared/infrastructure/__init__.py +0 -10
- package/server/shared/infrastructure/runtime.py +0 -6
- package/server/shared/infrastructure/security.py +0 -33
- package/server/tests/e2e/test_domain_feature_flows.py +0 -483
- package/server/tests/test_health.py +0 -49
- package/server/uv.lock +0 -1169
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import ReactDOM from "react-dom/client";
|
|
3
|
-
import { BrowserRouter } from "react-router-dom";
|
|
4
|
-
|
|
5
|
-
import { AuthProvider } from "@/auth/AuthProvider";
|
|
6
|
-
import { App } from "./App";
|
|
7
|
-
import "./styles/globals.css";
|
|
8
|
-
|
|
9
|
-
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
10
|
-
<React.StrictMode>
|
|
11
|
-
<AuthProvider>
|
|
12
|
-
<BrowserRouter>
|
|
13
|
-
<App />
|
|
14
|
-
</BrowserRouter>
|
|
15
|
-
</AuthProvider>
|
|
16
|
-
</React.StrictMode>,
|
|
17
|
-
);
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
import { ArrowUpRight, AlertTriangle, PackageCheck, Truck } from "lucide-react";
|
|
3
|
-
import { Link } from "react-router-dom";
|
|
4
|
-
|
|
5
|
-
import { useAuth } from "@/auth/AuthProvider";
|
|
6
|
-
import {
|
|
7
|
-
fetchFulfillmentOverview,
|
|
8
|
-
type FulfillmentOverviewResponse,
|
|
9
|
-
} from "@/api/fulfillment";
|
|
10
|
-
import { Card } from "@/components/ui/card";
|
|
11
|
-
|
|
12
|
-
const statIcons = {
|
|
13
|
-
"Open tasks": PackageCheck,
|
|
14
|
-
Blocked: AlertTriangle,
|
|
15
|
-
"Outbound ready": Truck,
|
|
16
|
-
} as const;
|
|
17
|
-
|
|
18
|
-
function timelineToneClassName(tone: string) {
|
|
19
|
-
if (tone === "success") {
|
|
20
|
-
return "bg-[#dff3ec] text-[var(--in-accent)]";
|
|
21
|
-
}
|
|
22
|
-
if (tone === "warning") {
|
|
23
|
-
return "bg-[#fff0d8] text-[#b56a1f]";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return "bg-[#e9f4ff] text-[#245f92]";
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function DashboardPage() {
|
|
30
|
-
const { token } = useAuth();
|
|
31
|
-
const [overview, setOverview] = useState<FulfillmentOverviewResponse | null>(null);
|
|
32
|
-
const [loading, setLoading] = useState(true);
|
|
33
|
-
const [error, setError] = useState<string | null>(null);
|
|
34
|
-
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
if (!token?.access_token) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let cancelled = false;
|
|
41
|
-
|
|
42
|
-
setLoading(true);
|
|
43
|
-
setError(null);
|
|
44
|
-
|
|
45
|
-
fetchFulfillmentOverview(token.access_token)
|
|
46
|
-
.then((response) => {
|
|
47
|
-
if (!cancelled) {
|
|
48
|
-
setOverview(response);
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
.catch((nextError: Error) => {
|
|
52
|
-
if (!cancelled) {
|
|
53
|
-
setError(nextError.message);
|
|
54
|
-
setOverview(null);
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
.finally(() => {
|
|
58
|
-
if (!cancelled) {
|
|
59
|
-
setLoading(false);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
return () => {
|
|
64
|
-
cancelled = true;
|
|
65
|
-
};
|
|
66
|
-
}, [token?.access_token]);
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<div className="grid gap-6 xl:grid-cols-[1fr_320px]">
|
|
70
|
-
<div className="space-y-6">
|
|
71
|
-
<section className="rounded-[32px] bg-[linear-gradient(135deg,#fff7e8_0%,#f4efe6_45%,#e2f3ec_100%)] px-6 py-7">
|
|
72
|
-
<p className="text-sm font-semibold uppercase tracking-[0.18em] text-[var(--in-accent)]">Daily relay</p>
|
|
73
|
-
<div className="mt-3 flex flex-wrap items-end justify-between gap-4">
|
|
74
|
-
<div className="max-w-2xl">
|
|
75
|
-
<h1 className="text-4xl font-black tracking-[-0.04em] text-[var(--in-text)]">주문 이행 상태와 예외 대응을 한 화면에서 이어붙이는 모바일 셸</h1>
|
|
76
|
-
<p className="mt-4 text-base leading-7 text-[var(--in-muted)]">
|
|
77
|
-
픽킹, 패킹, 예외 검토, 출고 준비까지 현재 이행 상태를 한눈에 보여주는 운영 모바일 surface다.
|
|
78
|
-
</p>
|
|
79
|
-
</div>
|
|
80
|
-
<div className="rounded-[28px] border border-white/70 bg-white/80 px-5 py-4 shadow-sm">
|
|
81
|
-
<p className="text-sm text-[var(--in-muted)]">Units in motion</p>
|
|
82
|
-
<p className="mt-2 text-3xl font-black text-[var(--in-accent)]">{loading && !overview ? "..." : `${overview?.throughput_total ?? "0"} units`}</p>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
{error ? <p className="mt-4 text-sm font-semibold text-[#9d4d26]">{error}</p> : null}
|
|
86
|
-
</section>
|
|
87
|
-
|
|
88
|
-
<section className="grid gap-4 md:grid-cols-3">
|
|
89
|
-
{(overview?.stats ?? []).map((stat) => {
|
|
90
|
-
const Icon = statIcons[stat.label as keyof typeof statIcons] ?? PackageCheck;
|
|
91
|
-
return (
|
|
92
|
-
<Card key={stat.label} className="p-5 shadow-[0_18px_48px_rgba(25,54,46,0.06)]">
|
|
93
|
-
<div className="flex items-start justify-between gap-4">
|
|
94
|
-
<div>
|
|
95
|
-
<p className="text-sm text-[var(--in-muted)]">{stat.label}</p>
|
|
96
|
-
<p className="mt-3 text-3xl font-black text-[var(--in-text)]">{stat.value}</p>
|
|
97
|
-
</div>
|
|
98
|
-
<div className="rounded-2xl bg-[var(--in-accent-soft)] p-3 text-[var(--in-accent)]">
|
|
99
|
-
<Icon className="h-5 w-5" />
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
</Card>
|
|
103
|
-
);
|
|
104
|
-
})}
|
|
105
|
-
{loading && !overview ? (
|
|
106
|
-
<Card className="p-5 shadow-[0_18px_48px_rgba(25,54,46,0.06)] md:col-span-3">
|
|
107
|
-
<p className="text-sm text-[var(--in-muted)]">Overview</p>
|
|
108
|
-
<p className="mt-3 text-lg font-semibold text-[var(--in-text)]">서비스 현황을 불러오는 중입니다.</p>
|
|
109
|
-
</Card>
|
|
110
|
-
) : null}
|
|
111
|
-
</section>
|
|
112
|
-
|
|
113
|
-
<Card className="p-6 shadow-[0_18px_48px_rgba(25,54,46,0.06)]">
|
|
114
|
-
<div className="flex items-center justify-between gap-3">
|
|
115
|
-
<div>
|
|
116
|
-
<h2 className="text-xl font-black text-[var(--in-text)]">Relay timeline</h2>
|
|
117
|
-
<p className="mt-2 text-sm text-[var(--in-muted)]">이행 단계별 handoff와 예외 대응 이벤트를 시간축으로 배치한다.</p>
|
|
118
|
-
</div>
|
|
119
|
-
<div className="flex items-center gap-2">
|
|
120
|
-
<Link
|
|
121
|
-
className="inline-flex items-center gap-2 rounded-full bg-[var(--in-accent-soft)] px-3 py-2 text-sm font-semibold text-[var(--in-accent)]"
|
|
122
|
-
to="/shipping"
|
|
123
|
-
>
|
|
124
|
-
Shipping
|
|
125
|
-
<ArrowUpRight className="h-4 w-4" />
|
|
126
|
-
</Link>
|
|
127
|
-
<Link
|
|
128
|
-
className="inline-flex items-center gap-2 rounded-full bg-[var(--in-accent-soft)] px-3 py-2 text-sm font-semibold text-[var(--in-accent)]"
|
|
129
|
-
to="/fulfillment"
|
|
130
|
-
>
|
|
131
|
-
Fulfillment
|
|
132
|
-
<ArrowUpRight className="h-4 w-4" />
|
|
133
|
-
</Link>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<div className="mt-6 grid gap-4 md:grid-cols-3">
|
|
138
|
-
{loading && !(overview?.timeline.length ?? 0) ? <div className="text-sm text-[var(--in-muted)] md:col-span-3">타임라인을 불러오는 중입니다.</div> : null}
|
|
139
|
-
{!loading && !error && !(overview?.timeline.length ?? 0) ? (
|
|
140
|
-
<div className="text-sm text-[var(--in-muted)] md:col-span-3">표시할 타임라인 이벤트가 없습니다.</div>
|
|
141
|
-
) : null}
|
|
142
|
-
{(overview?.timeline ?? []).map((item) => (
|
|
143
|
-
<div key={item.time} className="rounded-[24px] border border-[var(--in-border)] bg-white p-5">
|
|
144
|
-
<div className={`inline-flex rounded-full px-3 py-1 text-xs font-semibold ${timelineToneClassName(item.tone)}`}>{item.time}</div>
|
|
145
|
-
<p className="mt-4 text-lg font-bold text-[var(--in-text)]">{item.title}</p>
|
|
146
|
-
</div>
|
|
147
|
-
))}
|
|
148
|
-
</div>
|
|
149
|
-
</Card>
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
<Card className="p-6 shadow-[0_18px_48px_rgba(25,54,46,0.06)]">
|
|
153
|
-
<h2 className="text-xl font-black text-[var(--in-text)]">Stage load</h2>
|
|
154
|
-
<p className="mt-2 text-sm text-[var(--in-muted)]">현재 진행 중인 단계별 작업량과 병목 구간을 우선순위 큐로 보여준다.</p>
|
|
155
|
-
|
|
156
|
-
<div className="mt-6 space-y-4">
|
|
157
|
-
{loading && !(overview?.stage_load.length ?? 0) ? <div className="text-sm text-[var(--in-muted)]">단계별 적재량을 불러오는 중입니다.</div> : null}
|
|
158
|
-
{!loading && !error && !(overview?.stage_load.length ?? 0) ? <div className="text-sm text-[var(--in-muted)]">표시할 단계 데이터가 없습니다.</div> : null}
|
|
159
|
-
{(overview?.stage_load ?? []).map((entry) => (
|
|
160
|
-
<div key={entry.label}>
|
|
161
|
-
<div className="flex items-center justify-between text-sm">
|
|
162
|
-
<span className="font-semibold text-[var(--in-text)]">{entry.label}</span>
|
|
163
|
-
<span className="text-[var(--in-muted)]">{entry.value}</span>
|
|
164
|
-
</div>
|
|
165
|
-
</div>
|
|
166
|
-
))}
|
|
167
|
-
{error ? <div className="text-sm font-semibold text-[#9d4d26]">{error}</div> : null}
|
|
168
|
-
</div>
|
|
169
|
-
</Card>
|
|
170
|
-
</div>
|
|
171
|
-
);
|
|
172
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
|
|
3
|
-
import { useAuth } from "@/auth/AuthProvider";
|
|
4
|
-
import {
|
|
5
|
-
fetchFulfillmentBoard,
|
|
6
|
-
type FulfillmentBoardResponse,
|
|
7
|
-
} from "@/api/fulfillment";
|
|
8
|
-
import { Card } from "@/components/ui/card";
|
|
9
|
-
|
|
10
|
-
function fulfillmentStatusClassName(status: string) {
|
|
11
|
-
if (status === "Completed") {
|
|
12
|
-
return "bg-[#dff3ec] text-[var(--in-accent)]";
|
|
13
|
-
}
|
|
14
|
-
if (status === "Blocked") {
|
|
15
|
-
return "bg-[#ffe2d7] text-[#c4663a]";
|
|
16
|
-
}
|
|
17
|
-
if (status === "In progress") {
|
|
18
|
-
return "bg-[#fff0d8] text-[#b56a1f]";
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return "bg-[#efe7d8] text-[var(--in-muted)]";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function FulfillmentPage() {
|
|
25
|
-
const { token } = useAuth();
|
|
26
|
-
const [board, setBoard] = useState<FulfillmentBoardResponse | null>(null);
|
|
27
|
-
const [loading, setLoading] = useState(true);
|
|
28
|
-
const [error, setError] = useState<string | null>(null);
|
|
29
|
-
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
if (!token?.access_token) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
let cancelled = false;
|
|
36
|
-
|
|
37
|
-
setLoading(true);
|
|
38
|
-
setError(null);
|
|
39
|
-
|
|
40
|
-
fetchFulfillmentBoard(token.access_token)
|
|
41
|
-
.then((response) => {
|
|
42
|
-
if (!cancelled) {
|
|
43
|
-
setBoard(response);
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
.catch((nextError: Error) => {
|
|
47
|
-
if (!cancelled) {
|
|
48
|
-
setError(nextError.message);
|
|
49
|
-
setBoard(null);
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
.finally(() => {
|
|
53
|
-
if (!cancelled) {
|
|
54
|
-
setLoading(false);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
return () => {
|
|
59
|
-
cancelled = true;
|
|
60
|
-
};
|
|
61
|
-
}, [token?.access_token]);
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<div className="grid gap-6 xl:grid-cols-[1fr_300px]">
|
|
65
|
-
<Card className="overflow-hidden shadow-[0_18px_48px_rgba(25,54,46,0.06)]">
|
|
66
|
-
<div className="border-b border-[var(--in-border)] px-6 py-5">
|
|
67
|
-
<h2 className="text-xl font-black text-[var(--in-text)]">Fulfillment board</h2>
|
|
68
|
-
<p className="mt-2 text-sm text-[var(--in-muted)]">작업 단위, 담당자, 단계, SLA를 한 번에 보여주는 이행 보드 surface다.</p>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<table className="w-full border-collapse text-sm">
|
|
72
|
-
<thead className="bg-[#faf6ef] text-left text-[var(--in-muted)]">
|
|
73
|
-
<tr>
|
|
74
|
-
{["Order", "Task", "Assignee", "Status", "SLA"].map((cell) => (
|
|
75
|
-
<th key={cell} className="border-b border-[var(--in-border)] px-6 py-4 font-semibold">
|
|
76
|
-
{cell}
|
|
77
|
-
</th>
|
|
78
|
-
))}
|
|
79
|
-
</tr>
|
|
80
|
-
</thead>
|
|
81
|
-
<tbody>
|
|
82
|
-
{loading ? (
|
|
83
|
-
<tr>
|
|
84
|
-
<td className="border-b border-[var(--in-border)] px-6 py-4 text-[var(--in-muted)]" colSpan={5}>
|
|
85
|
-
이행 보드를 불러오는 중입니다.
|
|
86
|
-
</td>
|
|
87
|
-
</tr>
|
|
88
|
-
) : null}
|
|
89
|
-
{error ? (
|
|
90
|
-
<tr>
|
|
91
|
-
<td className="border-b border-[var(--in-border)] px-6 py-4 text-[#9d4d26]" colSpan={5}>
|
|
92
|
-
{error}
|
|
93
|
-
</td>
|
|
94
|
-
</tr>
|
|
95
|
-
) : null}
|
|
96
|
-
{!loading && !error && !(board?.tasks.length ?? 0) ? (
|
|
97
|
-
<tr>
|
|
98
|
-
<td className="border-b border-[var(--in-border)] px-6 py-4 text-[var(--in-muted)]" colSpan={5}>
|
|
99
|
-
현재 표시할 작업이 없습니다.
|
|
100
|
-
</td>
|
|
101
|
-
</tr>
|
|
102
|
-
) : null}
|
|
103
|
-
{(board?.tasks ?? []).map((task) => (
|
|
104
|
-
<tr key={task.id}>
|
|
105
|
-
<td className="border-b border-[var(--in-border)] px-6 py-4 font-semibold text-[var(--in-accent)]">{task.order_id}</td>
|
|
106
|
-
<td className="border-b border-[var(--in-border)] px-6 py-4">
|
|
107
|
-
<div className="font-semibold text-[var(--in-text)]">{task.title}</div>
|
|
108
|
-
<div className="mt-1 text-xs text-[var(--in-muted)]">
|
|
109
|
-
{task.stage} · {task.priority}
|
|
110
|
-
</div>
|
|
111
|
-
</td>
|
|
112
|
-
<td className="border-b border-[var(--in-border)] px-6 py-4 text-[var(--in-muted)]">{task.assignee}</td>
|
|
113
|
-
<td className="border-b border-[var(--in-border)] px-6 py-4">
|
|
114
|
-
<span className={`rounded-full px-3 py-1 text-xs font-semibold ${fulfillmentStatusClassName(task.status)}`}>{task.status}</span>
|
|
115
|
-
</td>
|
|
116
|
-
<td className="border-b border-[var(--in-border)] px-6 py-4 text-[var(--in-text)]">{task.sla}</td>
|
|
117
|
-
</tr>
|
|
118
|
-
))}
|
|
119
|
-
</tbody>
|
|
120
|
-
</table>
|
|
121
|
-
</Card>
|
|
122
|
-
|
|
123
|
-
<Card className="p-6 shadow-[0_18px_48px_rgba(25,54,46,0.06)]">
|
|
124
|
-
<h2 className="text-xl font-black text-[var(--in-text)]">Fulfillment notes</h2>
|
|
125
|
-
<div className="mt-5 space-y-4">
|
|
126
|
-
{loading ? <div className="text-sm text-[var(--in-muted)]">노트를 불러오는 중입니다.</div> : null}
|
|
127
|
-
{error ? <div className="text-sm font-semibold text-[#9d4d26]">{error}</div> : null}
|
|
128
|
-
{!loading && !error && !(board?.notes.length ?? 0) ? <div className="text-sm text-[var(--in-muted)]">노트가 없습니다.</div> : null}
|
|
129
|
-
{(board?.notes ?? []).map((note) => (
|
|
130
|
-
<div key={note.id} className="rounded-[22px] border border-[var(--in-border)] bg-white px-4 py-4 text-sm leading-6 text-[var(--in-muted)]">
|
|
131
|
-
{note.note}
|
|
132
|
-
</div>
|
|
133
|
-
))}
|
|
134
|
-
</div>
|
|
135
|
-
</Card>
|
|
136
|
-
</div>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Navigate, useLocation } from "react-router-dom";
|
|
3
|
-
|
|
4
|
-
import { useAuth } from "@/auth/AuthProvider";
|
|
5
|
-
import { Button } from "@/components/ui/button";
|
|
6
|
-
import { Card } from "@/components/ui/card";
|
|
7
|
-
import { Input } from "@/components/ui/input";
|
|
8
|
-
import { inTheme } from "@/theme";
|
|
9
|
-
import { inThemeVars } from "@/theme-vars";
|
|
10
|
-
|
|
11
|
-
export function LoginPage() {
|
|
12
|
-
const { authenticating, login, user } = useAuth();
|
|
13
|
-
const location = useLocation();
|
|
14
|
-
const [email, setEmail] = useState("operator@example.com");
|
|
15
|
-
const [password, setPassword] = useState("");
|
|
16
|
-
const [error, setError] = useState<string | null>(null);
|
|
17
|
-
|
|
18
|
-
if (user) {
|
|
19
|
-
const destination = (location.state as { from?: { pathname?: string } } | null)?.from?.pathname ?? "/";
|
|
20
|
-
return <Navigate to={destination} replace />;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
|
|
24
|
-
event.preventDefault();
|
|
25
|
-
setError(null);
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
await login({ email, password });
|
|
29
|
-
} catch (submitError) {
|
|
30
|
-
setError(submitError instanceof Error ? submitError.message : "로그인에 실패했습니다.");
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<div className="min-h-screen bg-[var(--in-shell-bg)] px-6 py-12 text-[var(--in-text)]" style={inThemeVars(inTheme)}>
|
|
36
|
-
<div className="mx-auto grid max-w-6xl gap-10 lg:grid-cols-[1.05fr_430px] lg:items-center">
|
|
37
|
-
<div>
|
|
38
|
-
<p className="inline-flex rounded-full bg-[var(--in-accent-soft)] px-4 py-2 text-sm font-semibold text-[var(--in-accent)]">
|
|
39
|
-
IN operator workspace
|
|
40
|
-
</p>
|
|
41
|
-
<h1 className="mt-6 text-5xl font-black tracking-[-0.05em]">상담 흐름과 운영 상태를 동시에 여는 로그인 템플릿</h1>
|
|
42
|
-
<p className="mt-5 max-w-xl text-lg leading-8 text-[var(--in-muted)]">
|
|
43
|
-
`VITE_API_BASE_URL/auth/login`으로 인증한 뒤 `auth/me`를 재호출해 권한과 사용자 surface를 맞춘다.
|
|
44
|
-
</p>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<Card className="p-7 shadow-[0_24px_70px_rgba(25,54,46,0.08)]">
|
|
48
|
-
<form className="space-y-5" onSubmit={handleSubmit}>
|
|
49
|
-
<div>
|
|
50
|
-
<p className="text-2xl font-black">Sign in to IN</p>
|
|
51
|
-
<p className="mt-2 text-sm text-[var(--in-muted)]">예시 계정은 `operator@example.com`이다.</p>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<label className="block space-y-2">
|
|
55
|
-
<span className="text-sm font-semibold">Email</span>
|
|
56
|
-
<Input type="email" value={email} onChange={(event) => setEmail(event.target.value)} required />
|
|
57
|
-
</label>
|
|
58
|
-
|
|
59
|
-
<label className="block space-y-2">
|
|
60
|
-
<span className="text-sm font-semibold">Password</span>
|
|
61
|
-
<Input type="password" value={password} onChange={(event) => setPassword(event.target.value)} required />
|
|
62
|
-
</label>
|
|
63
|
-
|
|
64
|
-
{error ? <p className="text-sm font-semibold text-[#c4663a]">{error}</p> : null}
|
|
65
|
-
|
|
66
|
-
<Button className="w-full" size="lg" type="submit" disabled={authenticating}>
|
|
67
|
-
{authenticating ? "Signing in..." : "Continue to IN"}
|
|
68
|
-
</Button>
|
|
69
|
-
</form>
|
|
70
|
-
</Card>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
);
|
|
74
|
-
}
|