@@ -106,7 +123,7 @@ export const CreateContractTemplate = () => {
{t('table_header.title')}
-
+ {!readonly &&
}
@@ -114,7 +131,6 @@ export const CreateContractTemplate = () => {
// TODO: descarca necompletat functionality
onClick={() => { }}
/>
- {/* // TODO: save functionality */}
+
}
{/* TABLE BODY */}
-
+
diff --git a/frontend/src/routes/Router.tsx b/frontend/src/routes/Router.tsx
index 4cc648d9..60f1d752 100644
--- a/frontend/src/routes/Router.tsx
+++ b/frontend/src/routes/Router.tsx
@@ -97,6 +97,8 @@ const Router = () => {
}>
} />
+
} />
+
} />
} />
}>
} />
diff --git a/frontend/src/services/documents-templates/documents-templates.api.ts b/frontend/src/services/documents-templates/documents-templates.api.ts
index f5d7e350..83093653 100644
--- a/frontend/src/services/documents-templates/documents-templates.api.ts
+++ b/frontend/src/services/documents-templates/documents-templates.api.ts
@@ -17,7 +17,7 @@ export const getTemplates = async (params: {
return API.get('documents/templates', { params }).then((res) => res.data);
};
-export const getTemplateById = async (id: string): Promise
=> {
+export const getTemplateById = async (id?: string): Promise => {
return API.get(`/documents/templates/${id}`).then((res) => res.data);
};
diff --git a/frontend/src/services/documents-templates/documents-templates.service.ts b/frontend/src/services/documents-templates/documents-templates.service.ts
index 8250e343..a6a1f02f 100644
--- a/frontend/src/services/documents-templates/documents-templates.service.ts
+++ b/frontend/src/services/documents-templates/documents-templates.service.ts
@@ -68,7 +68,7 @@ export const useDocumentTemplatesQuery = ({
);
};
-export const useDocumentTemplateByIdQuery = (id: string) => {
+export const useDocumentTemplateByIdQuery = (id?: string) => {
return useQuery({
queryKey: ['document-template', id],
queryFn: () => getTemplateById(id),