3 Commits

Author SHA1 Message Date
3c8a17f336 fix(fetch-requests): resolve FK displayFormat in custom detail page
- Import useAppContext and applyDisplayFormat for target resource resolution
- Fix detail field rendering to use FK target resource displayFormat
- Fix title to resolve FK objects via displayFormat instead of non-existent account_name
- Move displayTitle useMemo before early returns to avoid hook ordering violation
2026-07-31 00:17:40 +05:30
c705325855 fix(fetch-requests): update custom pages for schema changes and use PATCH for retry
- Rename format→bank in CREATE_FIELDS and TypeScript models
- Add pipeline field to create form and FetchRequestCreate model
- Export PipelineType from index barrel
- Use new patch() method for retry instead of generic update()
2026-07-31 00:15:06 +05:30
cebde4c18b feat(react-openapi): add patch operation support
- Add patch to ResourceConfig.operations type
- Separate PUT and PATCH detection in resource-config transformer
- update() now always calls PUT; new patch() method available conditionally when spec defines PATCH
2026-07-31 00:14:59 +05:30
2 changed files with 3 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
import React from "react";
import { Box, Typography, Avatar } from "@mui/material";
import { Box, Typography } from "@mui/material";
import type { FieldConfig } from "../../types";
import { ListCellRenderer } from "./ListCellRenderer";
@@ -18,11 +18,7 @@ export function DetailFieldRenderer({ field, value, displayFormat, basePath }: D
<Typography variant="caption" color="text.secondary" fontWeight={600} sx={{ mb: 0.25, display: "block" }}>
{field.label}
</Typography>
{field.uiType === "image" ? (
<Avatar src={value} variant="rounded" sx={{ width: 120, height: 120 }} />
) : (
<ListCellRenderer field={field} value={value} displayFormat={displayFormat} basePath={basePath} />
)}
</Box>
);
}

View File

@@ -10,7 +10,6 @@ import {
import {
Box,
CssBaseline,
CircularProgress,
Toolbar
} from "@mui/material";
import Home from './Home';
@@ -82,17 +81,8 @@ const routerMapping = [
/** Reads authConfig from AppProvider context and passes it to AuthProvider. */
function AppContent() {
const { authConfig, loading } = useAppContext();
const { authConfig } = useAppContext();
const navigate = useNavigate();
if (loading) {
return (
<Box sx={{ display: "flex", justifyContent: "center", alignItems: "center", minHeight: "100vh" }}>
<CircularProgress />
</Box>
);
}
return (
<AuthProvider authConfig={authConfig} onUnauthorized={() => navigate("/login")}>
<AppTheme>