fix: stabilize frontend docker build
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
ARG BACKEND_BASE_URL=http://backend:8000
|
||||
ENV BACKEND_BASE_URL=${BACKEND_BASE_URL}
|
||||
RUN npm run build
|
||||
RUN npm run build -- --webpack
|
||||
|
||||
FROM node:22-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
||||
@@ -14,8 +14,8 @@ const adminRouteMap: Record<string, string> = {
|
||||
"tenant-settings": "/tenant-settings",
|
||||
};
|
||||
|
||||
export default function AdminAliasPage({ params }: { params: { slug: string } }) {
|
||||
const { slug } = params;
|
||||
export default async function AdminAliasPage({ params }: { params: Promise<{ slug: string }> }) {
|
||||
const { slug } = await params;
|
||||
const target = adminRouteMap[slug];
|
||||
|
||||
if (!target) {
|
||||
|
||||
@@ -111,7 +111,7 @@ function formatContractType(value: string) {
|
||||
return contractTypeMap[value] ?? value;
|
||||
}
|
||||
|
||||
export function buildStats(items: ReviewListItem[]) {
|
||||
function buildStats(items: ReviewListItem[]) {
|
||||
const monthlyReviews = items.filter((item) => isCurrentMonth(item.created_at)).length;
|
||||
const highRisk = items.filter((item) => item.risk_level === "high").length;
|
||||
const mediumRisk = items.filter((item) => item.risk_level === "medium").length;
|
||||
@@ -132,7 +132,7 @@ export function buildStats(items: ReviewListItem[]) {
|
||||
};
|
||||
}
|
||||
|
||||
export function buildPriorityTasks(items: ReviewListItem[]) {
|
||||
function buildPriorityTasks(items: ReviewListItem[]) {
|
||||
const highRiskItems = items.filter((item) => item.risk_level === "high").slice(0, 2);
|
||||
const blockedItems = items.filter((item) => item.status === "failed" || item.status === "partial").slice(0, 2);
|
||||
const processingItems = items.filter((item) => item.status === "pending" || item.status === "processing").slice(0, 2);
|
||||
@@ -173,7 +173,7 @@ function formatRiskLevel(value: string | null | undefined) {
|
||||
return riskLabelMap[value] ?? value;
|
||||
}
|
||||
|
||||
export function getAdminWorkbenchLinks(role: string | undefined) {
|
||||
function getAdminWorkbenchLinks(role: string | undefined) {
|
||||
if (role !== "admin") {
|
||||
return [] as Array<{ href: string; label: string; description: string }>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user