feat(information_management): Ability to link Knowledge Base article to a Project Type

ref: #426 #427
This commit is contained in:
2024-12-21 17:10:20 +09:30
parent 4bddbd151d
commit e34a5eec5b
2 changed files with 18 additions and 0 deletions

View File

@ -79,6 +79,16 @@ class ProjectType(ProjectTypeCommonFields):
}
]
},
{
"name": "Knowledge Base",
"slug": "kb_articles",
"sections": [
{
"layout": "table",
"field": "knowledge_base",
}
]
},
{
"name": "Notes",
"slug": "notes",

View File

@ -55,6 +55,14 @@ class ProjectTypeModelSerializer(
return {
'_self': item.get_url( request = self._context['view'].request ),
'knowledge_base': reverse(
"v2:_api_v2_model_kb-list",
request=self._context['view'].request,
kwargs={
'model': self.Meta.model._meta.model_name,
'model_pk': item.pk
}
),
}