Skip to content

Commit 5ac88b1

Browse files
committed
feat: added subjectIdDisplay length option to subject layout page
1 parent 12b4eda commit 5ac88b1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/web/src/features/datahub/components/SubjectLayout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Outlet, useParams } from 'react-router-dom';
88
import { LoadingFallback } from '@/components/LoadingFallback';
99
import { PageHeader } from '@/components/PageHeader';
1010
import { config } from '@/config';
11+
import { useAppStore } from '@/store';
1112

1213
import { TabLink } from './TabLink';
1314

@@ -16,6 +17,7 @@ export const SubjectLayout = () => {
1617
const { t } = useTranslation('datahub');
1718
const subjectId = params.subjectId!;
1819
const basePathname = `/datahub/${subjectId}`;
20+
const subjectIdDisplaySetting = useAppStore((store) => store.currentGroup?.settings.subjectIdDisplayLength);
1921

2022
return (
2123
<React.Fragment>
@@ -26,7 +28,9 @@ export const SubjectLayout = () => {
2628
en: 'Instrument Records for Subject {}',
2729
fr: "Dossiers d'instruments pour le client {}"
2830
},
29-
removeSubjectIdScope(subjectId).slice(0, 9)
31+
subjectIdDisplaySetting
32+
? removeSubjectIdScope(subjectId).slice(0, subjectIdDisplaySetting)
33+
: removeSubjectIdScope(subjectId).slice(0, 9)
3034
)}
3135
</Heading>
3236
</PageHeader>

0 commit comments

Comments
 (0)