Skip to content

Commit

Permalink
avniproject/avni-server#803 | Add tooltip for subject type custom reg…
Browse files Browse the repository at this point in the history
…istration location advanced setting
  • Loading branch information
1t5j0y committed Oct 31, 2024
1 parent 9bed038 commit ab78608
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions public/documentation/toolTip.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"APP_DESIGNER_SUBJECT_TYPE_SYNC_BY_DIRECT_ASSIGNMENT": "This will sync the subjects which are directly assigned to the users",
"APP_DESIGNER_SUBJECT_TYPE_DISPLAY_REGISTRATION_DETAILS": "Controls if registration details are shown to the field user on subject profile screen",
"APP_DESIGNER_SUBJECT_TYPE_DISPLAY_PLANNED_ENCOUNTERS": "Controls if planned visits are shown to the field user on the subject dashboard screens",
"APP_DESIGNER_SUBJECT_TYPE_ADVANCED_ADDRESS": "If this is not configured, subjects can be registered only at location type with the lowest level.",
"APP_DESIGNER_SUBJECT_MEMBER_SUBJECT_TYPE": "Person subject type that can be added as member to the household",
"APP_DESIGNER_PROFILE_PICTURE_ICON": "Profile picture of an individual",
"APP_DESIGNER_PROGRAM_NAME": "Name of the program.",
Expand Down
10 changes: 6 additions & 4 deletions src/adminApp/SubjectType/AddressLevelSetting.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import FormControl from "@material-ui/core/FormControl";
import FormLabel from "@material-ui/core/FormLabel";
import Select from "react-select";
import { filter, includes, map } from "lodash";
import { AvniFormLabel } from "../../common/components/AvniFormLabel";

export const AddressLevelSetting = ({ levelUUIDs, setLevelUUIDs, locationTypes }) => {
const selectedTypes = filter(locationTypes, ({ uuid }) => includes(levelUUIDs, uuid));
Expand All @@ -15,9 +15,11 @@ export const AddressLevelSetting = ({ levelUUIDs, setLevelUUIDs, locationTypes }

return (
<FormControl fullWidth component="fieldset">
<FormLabel component="legend">
{"Location type where this subject can be registered"}
</FormLabel>
<AvniFormLabel
component="legend"
toolTipKey={"APP_DESIGNER_SUBJECT_TYPE_ADVANCED_ADDRESS"}
label={"Location type where this subject can be registered"}
/>
<Select
isMulti
isSearchable
Expand Down

0 comments on commit ab78608

Please sign in to comment.