diff --git a/back/app/template/models.py b/back/app/template/models.py index 1725b646..afedeca4 100644 --- a/back/app/template/models.py +++ b/back/app/template/models.py @@ -1,4 +1,4 @@ -from typing import List +from typing import List, Dict from pydantic import BaseModel, Field, validator @@ -44,11 +44,18 @@ class ProvisionTemplateReference(BaseModel): ) +class DictionaryEntry(BaseModel): + key: str + value: str = "" + + class ContractTemplate(CrudDocument): name: str parties: List[PartyTemplate] = [] provisions: List[ProvisionTemplateReference] = Field( default=[], - props={"items-per-row": "1"} + props={"items-per-row": "1", "numbered": True} ) + variables: List[DictionaryEntry] = Field(default=[], format="dictionary") + diff --git a/front/app/src/common/crud/types/array.type.ts b/front/app/src/common/crud/types/array.type.ts index 3dfbd191..eedad435 100644 --- a/front/app/src/common/crud/types/array.type.ts +++ b/front/app/src/common/crud/types/array.type.ts @@ -14,6 +14,9 @@ import { FieldArrayType } from '@ngx-formly/core';
+
+ {{ i + 1 }} +