Skip to content

Commit

Permalink
diet preference value moved to constants as snake_case
Browse files Browse the repository at this point in the history
  • Loading branch information
arhamathar committed Jan 9, 2025
1 parent 0592e63 commit 9c6fbd2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
16 changes: 16 additions & 0 deletions src/common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1757,3 +1757,19 @@ export const HEADER_CONTENT_TYPES = {
} as const;

export const ADMIN_USER_TYPES = ["DistrictAdmin", "StateAdmin"] as const;

/**
* @deprecated use `LocalStorageKeys.patientTokenKey` instead
*/
export const CarePatientTokenKey = LocalStorageKeys.patientTokenKey;

export const DIET_PREFERENCE_OPTIONS = [
{ label: "Vegetarian", value: "vegetarian" },
{ label: "Dairy Free", value: "diary_free" },
{ label: "Nut Free", value: "nut_free" },
{ label: "Gluten Free", value: "gluten_free" },
{ label: "Vegan", value: "vegan" },
{ label: "Halal", value: "halal" },
{ label: "Kosher", value: "kosher" },
{ label: "None", value: "none" },
] as const;
15 changes: 7 additions & 8 deletions src/components/Questionnaire/QuestionTypes/EncounterQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
SelectValue,
} from "@/components/ui/select";

import { DIET_PREFERENCE_OPTIONS } from "@/common/constants";

import routes from "@/Utils/request/api";
import query from "@/Utils/request/query";
import {
Expand Down Expand Up @@ -391,14 +393,11 @@ export function EncounterQuestion({
<SelectValue placeholder="Select diet preference" />
</SelectTrigger>
<SelectContent>
<SelectItem value="vegetarian">Vegetarian</SelectItem>
<SelectItem value="diary_free">Dairy Free</SelectItem>
<SelectItem value="nut_free">Nut Free</SelectItem>
<SelectItem value="gluten_free">Gluten Free</SelectItem>
<SelectItem value="vegan">Vegan</SelectItem>
<SelectItem value="halal">Halal</SelectItem>
<SelectItem value="kosher">Kosher</SelectItem>
<SelectItem value="none">None</SelectItem>
{DIET_PREFERENCE_OPTIONS.map((option) => (
<SelectItem key={option.value} value={option.value}>
{option.label}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
Expand Down

0 comments on commit 9c6fbd2

Please sign in to comment.