mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
edited the pibi request ui
This commit is contained in:
parent
3793a55b44
commit
7bcac4f65a
1 changed files with 46 additions and 5 deletions
|
|
@ -131,11 +131,52 @@ const COLUMNS = [
|
|||
data-testid={`pibi-measure-select-${r.id}`}
|
||||
className="rounded border border-gray-200 px-1.5 py-0.5 text-xs text-gray-800 focus:outline-none focus:ring-1 focus:ring-brandblue/40 w-[130px]"
|
||||
>
|
||||
{MEASURE_NAMES.map((m) => (
|
||||
<option key={m} value={m}>
|
||||
{m}
|
||||
</option>
|
||||
))}
|
||||
{(() => {
|
||||
const approved = MEASURE_NAMES.filter((m) =>
|
||||
meta.approvedMeasures.includes(m),
|
||||
);
|
||||
const proposed = MEASURE_NAMES.filter(
|
||||
(m) =>
|
||||
meta.proposedMeasures.includes(m) &&
|
||||
!meta.approvedMeasures.includes(m),
|
||||
);
|
||||
const other = MEASURE_NAMES.filter(
|
||||
(m) =>
|
||||
!meta.approvedMeasures.includes(m) &&
|
||||
!meta.proposedMeasures.includes(m),
|
||||
);
|
||||
return (
|
||||
<>
|
||||
{approved.length > 0 && (
|
||||
<optgroup label="Approved">
|
||||
{approved.map((m) => (
|
||||
<option key={m} value={m}>
|
||||
{m}
|
||||
</option>
|
||||
))}
|
||||
</optgroup>
|
||||
)}
|
||||
{proposed.length > 0 && (
|
||||
<optgroup label="Proposed">
|
||||
{proposed.map((m) => (
|
||||
<option key={m} value={m}>
|
||||
{m}
|
||||
</option>
|
||||
))}
|
||||
</optgroup>
|
||||
)}
|
||||
{other.length > 0 && (
|
||||
<optgroup label="Other">
|
||||
{other.map((m) => (
|
||||
<option key={m} value={m}>
|
||||
{m}
|
||||
</option>
|
||||
))}
|
||||
</optgroup>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
})()}
|
||||
</select>
|
||||
) : (
|
||||
<span className="text-xs text-gray-800">{r.measureName}</span>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue