Compare commits
2 Commits
f878fa7886
...
2c23992e52
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c23992e52 | |||
| ba46c10449 |
@@ -171,6 +171,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
"created_by": "Created by",
|
||||||
|
"created_at": "Created at",
|
||||||
|
"updated_by": "Updated by",
|
||||||
|
"updated_at": "Updated at",
|
||||||
"individual": {
|
"individual": {
|
||||||
"type": "Individual",
|
"type": "Individual",
|
||||||
"lastname": "Lastname",
|
"lastname": "Lastname",
|
||||||
@@ -203,13 +207,15 @@
|
|||||||
"entity": {
|
"entity": {
|
||||||
"entity_data": "Informations",
|
"entity_data": "Informations",
|
||||||
"address": "Address",
|
"address": "Address",
|
||||||
"resource_title": "Entity"
|
"resource_title": "Entity",
|
||||||
|
"resource_plural": "Entities"
|
||||||
},
|
},
|
||||||
"provision_template": {
|
"provision_template": {
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"title": "Title",
|
"title": "Title",
|
||||||
"body": "Body",
|
"body": "Body",
|
||||||
"resource_title": "Provision Template"
|
"resource_title": "Provision Template",
|
||||||
|
"resource_plural": "Provision Templates"
|
||||||
},
|
},
|
||||||
"contract_template": {
|
"contract_template": {
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
@@ -217,7 +223,8 @@
|
|||||||
"provisions": "Provisions",
|
"provisions": "Provisions",
|
||||||
"parties": "Parties",
|
"parties": "Parties",
|
||||||
"variables": "Variables",
|
"variables": "Variables",
|
||||||
"resource_title": "Contract Template"
|
"resource_title": "Contract Template",
|
||||||
|
"resource_plural": "Contract Templates"
|
||||||
},
|
},
|
||||||
"party_template": {
|
"party_template": {
|
||||||
"entity_id": "Party Template",
|
"entity_id": "Party Template",
|
||||||
@@ -240,7 +247,8 @@
|
|||||||
"parties": "Parties",
|
"parties": "Parties",
|
||||||
"provisions": "Provisions",
|
"provisions": "Provisions",
|
||||||
"variables": "Variables",
|
"variables": "Variables",
|
||||||
"resource_title": "Contract Draft"
|
"resource_title": "Contract Draft",
|
||||||
|
"resource_plural": "Contract Drafts"
|
||||||
},
|
},
|
||||||
"draft_party": {
|
"draft_party": {
|
||||||
"entity_id": "Client",
|
"entity_id": "Client",
|
||||||
@@ -267,6 +275,7 @@
|
|||||||
"date": "Date",
|
"date": "Date",
|
||||||
"location": "Location",
|
"location": "Location",
|
||||||
"resource_title": "Contract",
|
"resource_title": "Contract",
|
||||||
|
"resource_plural": "Contracts",
|
||||||
"draft_id": "Draft"
|
"draft_id": "Draft"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,6 +171,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
"created_by": "Créé par",
|
||||||
|
"created_at": "Créé le",
|
||||||
|
"updated_by": "Modifié par",
|
||||||
|
"updated_at": "Modifié le",
|
||||||
"individual": {
|
"individual": {
|
||||||
"type": "Particulier",
|
"type": "Particulier",
|
||||||
"middlename": "Autres prénoms",
|
"middlename": "Autres prénoms",
|
||||||
@@ -203,13 +207,15 @@
|
|||||||
"entity": {
|
"entity": {
|
||||||
"entity_data": "Informations",
|
"entity_data": "Informations",
|
||||||
"address": "Adresse",
|
"address": "Adresse",
|
||||||
"resource_title": "Entité"
|
"resource_title": "Entité",
|
||||||
|
"resource_plural": "Entités"
|
||||||
},
|
},
|
||||||
"provision_template": {
|
"provision_template": {
|
||||||
"name": "Nom",
|
"name": "Nom",
|
||||||
"body": "Corps",
|
"body": "Corps",
|
||||||
"title": "Titre",
|
"title": "Titre",
|
||||||
"resource_title": "Template de Clause"
|
"resource_title": "Template de Clause",
|
||||||
|
"resource_plural": "Templates de Clauses"
|
||||||
},
|
},
|
||||||
"contract_template": {
|
"contract_template": {
|
||||||
"name": "Nom",
|
"name": "Nom",
|
||||||
@@ -217,7 +223,8 @@
|
|||||||
"parties": "Parties",
|
"parties": "Parties",
|
||||||
"provisions": "Clauses",
|
"provisions": "Clauses",
|
||||||
"variables": "Variables",
|
"variables": "Variables",
|
||||||
"resource_title": "Template de Contrat"
|
"resource_title": "Template de Contrat",
|
||||||
|
"resource_plural": "Templates de Contrats"
|
||||||
},
|
},
|
||||||
"party_template": {
|
"party_template": {
|
||||||
"entity_id": "Entité",
|
"entity_id": "Entité",
|
||||||
@@ -240,7 +247,8 @@
|
|||||||
"title": "Titre",
|
"title": "Titre",
|
||||||
"provisions": "Clauses",
|
"provisions": "Clauses",
|
||||||
"variables": "Variables",
|
"variables": "Variables",
|
||||||
"resource_title": "Brouillon de Contrat"
|
"resource_title": "Brouillon de Contrat",
|
||||||
|
"resource_plural": "Brouillons de Contrats"
|
||||||
},
|
},
|
||||||
"draft_party": {
|
"draft_party": {
|
||||||
"part": "Rôle",
|
"part": "Rôle",
|
||||||
@@ -266,6 +274,7 @@
|
|||||||
"contract": {
|
"contract": {
|
||||||
"draft_id": "Brouillon",
|
"draft_id": "Brouillon",
|
||||||
"resource_title": "Contrat",
|
"resource_title": "Contrat",
|
||||||
|
"resource_plural": "Contrats",
|
||||||
"location": "Lieu",
|
"location": "Lieu",
|
||||||
"date": "Date"
|
"date": "Date"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { useTranslation } from "@refinedev/core";
|
import { useTranslation } from "@refinedev/core";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import { FirmContext } from "../contexts/FirmContext";
|
import { FirmContext } from "../contexts/FirmContext";
|
||||||
|
import Grid2 from '@mui/material/Grid2';
|
||||||
|
|
||||||
type CartoucheProps = {
|
type CartoucheProps = {
|
||||||
record: any
|
record: any
|
||||||
@@ -11,16 +12,16 @@ const Cartouche = (props: CartoucheProps) => {
|
|||||||
const { translate: t } = useTranslation();
|
const { translate: t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ul>
|
<Grid2 container spacing={0}>
|
||||||
<li>
|
<Grid2 size={2}>{t("schemas.created_by")}:</Grid2>
|
||||||
{t("resource.created_at")}: {record.created_at} {t("resource.created_by")}:
|
<Grid2 size={4}><AuthorField partnerId={record.created_by} /></Grid2>
|
||||||
<AuthorField partnerId={record.created_by} />
|
<Grid2 size={2}>{t("schemas.created_at")}:</Grid2>
|
||||||
</li>
|
<Grid2 size={4}>{new Date(record.created_at).toLocaleString()}</Grid2>
|
||||||
<li>
|
<Grid2 size={2}>{t("schemas.updated_by")}:</Grid2>
|
||||||
{t("resource.updated_at")}: {record.updated_at} {t("resource.updated_by")}:
|
<Grid2 size={4}><AuthorField partnerId={record.updated_by} /></Grid2>
|
||||||
<AuthorField partnerId={record.updated_by} />
|
<Grid2 size={2}>{t("schemas.updated_at")}:</Grid2>
|
||||||
</li>
|
<Grid2 size={4}>{new Date(record.updated_at).toLocaleString()}</Grid2>
|
||||||
</ul>
|
</Grid2>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { Link, useNavigate } from "react-router"
|
|||||||
import React, { useContext } from "react";
|
import React, { useContext } from "react";
|
||||||
import { Button } from "@mui/material";
|
import { Button } from "@mui/material";
|
||||||
import { FirmContext } from "../../../contexts/FirmContext";
|
import { FirmContext } from "../../../contexts/FirmContext";
|
||||||
|
import { useTranslation } from "@refinedev/core";
|
||||||
|
|
||||||
type ListProps<T extends GridValidRowModel> = {
|
type ListProps<T extends GridValidRowModel> = {
|
||||||
resource: string,
|
resource: string,
|
||||||
@@ -15,6 +16,7 @@ type ListProps<T extends GridValidRowModel> = {
|
|||||||
|
|
||||||
const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
|
const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
|
||||||
const { resource, columns } = props;
|
const { resource, columns } = props;
|
||||||
|
const { translate: t } = useTranslation();
|
||||||
const { currentFirm } = useContext(FirmContext);
|
const { currentFirm } = useContext(FirmContext);
|
||||||
const resourceBasePath = `firm/${currentFirm.instance}/${currentFirm.firm}`
|
const resourceBasePath = `firm/${currentFirm.instance}/${currentFirm.firm}`
|
||||||
|
|
||||||
@@ -33,7 +35,7 @@ const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
|
|||||||
return (
|
return (
|
||||||
<RefineList>
|
<RefineList>
|
||||||
<Link to={"create"} >
|
<Link to={"create"} >
|
||||||
<Button>Create</Button>
|
<Button>{t("buttons.create")}</Button>
|
||||||
</Link>
|
</Link>
|
||||||
<DataGrid
|
<DataGrid
|
||||||
{...dataGridProps}
|
{...dataGridProps}
|
||||||
|
|||||||
@@ -32,21 +32,18 @@ export const FirmRoutes = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const FirmHome = () => {
|
const FirmHome = () => {
|
||||||
const { currentFirm } = useContext(FirmContext);
|
|
||||||
const { translate: t } = useTranslation();
|
const { translate: t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<h1>This is la firme {currentFirm.instance} / {currentFirm.firm}</h1>
|
<h1>{t("dashboard.title")}</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li><Link to="entities">Entitées</Link></li>
|
<li><Link to="entities">{t("schemas.entity.resource_plural")}</Link></li>
|
||||||
<li><Link to="provisions">Templates de Clauses</Link></li>
|
<li><Link to="provisions">{t("schemas.provision_template.resource_plural")}</Link></li>
|
||||||
<li><Link to="templates">Templates de Contrats</Link></li>
|
<li><Link to="templates">{t("schemas.contract_template.resource_plural")}</Link></li>
|
||||||
<li><Link to="drafts">Brouillons</Link></li>
|
<li><Link to="drafts">{t("schemas.contract_draft.resource_plural")}</Link></li>
|
||||||
<li><Link to="contracts">Contrats</Link></li>
|
<li><Link to="contracts">{t("schemas.contract.resource_plural")}</Link></li>
|
||||||
</ul>
|
</ul>
|
||||||
</>
|
</>
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user