Liste Translations

This commit is contained in:
2025-05-02 17:39:38 +02:00
parent 2b88e46ca6
commit 6cc99812d2
3 changed files with 8 additions and 2 deletions

View File

@@ -175,6 +175,8 @@
"created_at": "Created at", "created_at": "Created at",
"updated_by": "Updated by", "updated_by": "Updated by",
"updated_at": "Updated at", "updated_at": "Updated at",
"label": "Label",
"type": "Type",
"individual": { "individual": {
"type": "Individual", "type": "Individual",
"lastname": "Lastname", "lastname": "Lastname",

View File

@@ -175,6 +175,8 @@
"created_at": "Créé le", "created_at": "Créé le",
"updated_by": "Modifié par", "updated_by": "Modifié par",
"updated_at": "Modifié le", "updated_at": "Modifié le",
"label": "Label",
"type": "Type",
"individual": { "individual": {
"type": "Particulier", "type": "Particulier",
"middlename": "Autres prénoms", "middlename": "Autres prénoms",

View File

@@ -1,4 +1,5 @@
import { Route, Routes } from "react-router"; import { Route, Routes } from "react-router";
import { useTranslation } from "@refinedev/core";
import List from "./base-page/List"; import List from "./base-page/List";
import Edit from "./base-page/Edit"; import Edit from "./base-page/Edit";
import New from "./base-page/New"; import New from "./base-page/New";
@@ -21,9 +22,10 @@ export const EntityRoutes = () => {
} }
const ListEntity = () => { const ListEntity = () => {
const { translate: t } = useTranslation();
const columns = [ const columns = [
{ field: "label", headerName: "Label", flex: 1 }, { field: "entity_data", headerName: t("schemas.type"), width: 110, valueFormatter: ({ type }: {type: string}) => type },
{ field: "entity_data", headerName: "Type", flex: 1, valueFormatter: ({ type }: {type: string}) => type } { field: "label", headerName: t("schemas.label"), flex: 1 },
]; ];
return <List<Entity> resource={`entities`} columns={columns} /> return <List<Entity> resource={`entities`} columns={columns} />
} }