Skip to content

Commit

Permalink
make routine rows global const
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 18, 2024
1 parent 54d8f48 commit 5603345
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ const REVERSE_CHOICES = {
},
} as const;

const ROUTINE_ROWS = [
{ field: "sleep" } as const,
{ field: "bowel_issue" } as const,
{ title: "Bladder" } as const,
{ subField: true, field: "bladder_drainage" } as const,
{ subField: true, field: "bladder_issue" } as const,
{ subField: true, field: "is_experiencing_dysuria" } as const,
{ subField: true, field: "urination_frequency" } as const,
{ title: "Nutrition" } as const,
{ subField: true, field: "nutrition_route" } as const,
{ subField: true, field: "oral_issue" } as const,
{ subField: true, field: "appetite" } as const,
];

const RoutineSection = ({ consultationId }: ConsultationTabProps) => {
const { t } = useTranslation();
const [page, setPage] = useState(1);
Expand Down Expand Up @@ -156,19 +170,7 @@ const RoutineSection = ({ consultationId }: ConsultationTabProps) => {
</tr>
</thead>
<tbody className="bg-secondary-200">
{[
{ field: "sleep" } as const,
{ field: "bowel_issue" } as const,
{ title: "Bladder" } as const,
{ subField: true, field: "bladder_drainage" } as const,
{ subField: true, field: "bladder_issue" } as const,
{ subField: true, field: "is_experiencing_dysuria" } as const,
{ subField: true, field: "urination_frequency" } as const,
{ title: "Nutrition" } as const,
{ subField: true, field: "nutrition_route" } as const,
{ subField: true, field: "oral_issue" } as const,
{ subField: true, field: "appetite" } as const,
].map((row) => (
{ROUTINE_ROWS.map((row) => (
<tr
key={row.field ?? row.title}
className={classNames(
Expand Down

0 comments on commit 5603345

Please sign in to comment.