Skip to content

Commit bafb0a8

Browse files
committed
feat(ui): Add LOINC to sections & headers sticky
1 parent e718d9c commit bafb0a8

1 file changed

Lines changed: 54 additions & 54 deletions

File tree

  • client/src/pages/Configurations/ConfigBuild/Sections

client/src/pages/Configurations/ConfigBuild/Sections/index.tsx

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -97,39 +97,40 @@ export function Sections({
9797
</p>
9898
</div>
9999

100-
<table className="w-full table-fixed">
101-
<thead>
102-
<tr className="border-gray-cool-20 text-gray-cool-60 border-b">
103-
<th scope="col" className="w-32 pb-3">
104-
Include
105-
</th>
106-
<th scope="col" className="w-auto pb-3 text-left">
107-
Section name
108-
</th>
109-
<th scope="col" className="align-right w-2/6 pb-3">
110-
<div className="flex items-center justify-center gap-1">
111-
<span>Data handling approach</span>
112-
<Tooltip
113-
position="left"
114-
label={`Set to "Refine & optimize" if you'd like to filter the
115-
content of this section down to coded elements matching the
116-
codes in your configuration in your refined output. Set to
117-
"Preserve & retain" if you'd like to keep the information in
118-
this section in its entirety in the refined output.`}
119-
/>
120-
</div>
121-
</th>
122-
<th scope="col" className="w-1/6 pb-3">
123-
<div className="flex items-center justify-center gap-1">
124-
<span>Narrative</span>
125-
<Tooltip
126-
position="left"
127-
label="Enable to retain the narrative block for this section in the refined output or disable to omit it."
128-
/>
129-
</div>
130-
</th>
131-
</tr>
132-
</thead>
100+
<div className="max-h-[calc(100vh-400px)] overflow-y-auto">
101+
<table className="w-full table-fixed">
102+
<thead className="sticky top-0 z-10 bg-white">
103+
<tr className="border-gray-cool-20 text-gray-cool-60 border-b">
104+
<th scope="col" className="w-32 pb-3 pt-3">
105+
Include
106+
</th>
107+
<th scope="col" className="w-auto pb-3 pt-3 text-left">
108+
Section name
109+
</th>
110+
<th scope="col" className="align-right w-2/6 pb-3 pt-3">
111+
<div className="flex items-center justify-center gap-1">
112+
<span>Data handling approach</span>
113+
<Tooltip
114+
position="left"
115+
label={`Set to "Refine & optimize" if you'd like to filter the
116+
content of this section down to coded elements matching the
117+
codes in your configuration in the refined output. Set to
118+
"Preserve & retain" if you'd like to keep the information in
119+
this section in its entirety in the refined output.`}
120+
/>
121+
</div>
122+
</th>
123+
<th scope="col" className="w-1/6 pb-3 pt-3">
124+
<div className="flex items-center justify-center gap-1">
125+
<span>Narrative</span>
126+
<Tooltip
127+
position="left"
128+
label="Enable to retain the narrative block for this section in the refined output or disable to omit it."
129+
/>
130+
</div>
131+
</th>
132+
</tr>
133+
</thead>
133134
<tbody className="divide-gray-cool-20 divide-y">
134135
{sectionProcessing.map((section) => (
135136
<tr key={section.code} className="text-gray-cool-60">
@@ -181,6 +182,7 @@ export function Sections({
181182
))}
182183
</tbody>
183184
</table>
185+
</div>
184186
</section>
185187
);
186188
}
@@ -213,27 +215,25 @@ function SectionName({
213215
</span>
214216
{isCustom ? <CustomSectionBadge /> : null}
215217
</div>
216-
{isCustom ? (
217-
<div className="flex items-center gap-2">
218-
<span className="truncate text-sm">{section.code}</span>
219-
{disabled ? null : (
220-
<div className="flex items-center gap-1">
221-
<EditButton
222-
name={section.name}
223-
setSelectedSection={setSelectedSection}
224-
/>
225-
<span className="text-sm" aria-hidden>
226-
|
227-
</span>
228-
<DeleteButton
229-
configurationId={configurationId}
230-
code={section.code}
231-
name={section.name}
232-
/>
233-
</div>
234-
)}
235-
</div>
236-
) : null}
218+
<div className="flex items-center gap-2">
219+
<span className="truncate text-sm">{section.code}</span>
220+
{isCustom && !disabled ? (
221+
<div className="flex items-center gap-1">
222+
<EditButton
223+
name={section.name}
224+
setSelectedSection={setSelectedSection}
225+
/>
226+
<span className="text-sm" aria-hidden>
227+
|
228+
</span>
229+
<DeleteButton
230+
configurationId={configurationId}
231+
code={section.code}
232+
name={section.name}
233+
/>
234+
</div>
235+
) : null}
236+
</div>
237237
</div>
238238
);
239239
}

0 commit comments

Comments
 (0)