Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bphh 2165 add tool tip to auto compliance to explain what this means #883

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
16 changes: 9 additions & 7 deletions app/frontend/components/domains/users/profile-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,15 @@ export const ProfileScreen = observer(({}: IProfileScreenProps) => {
</>
)}
<Divider my={1} />
<TextFormControl
// @ts-ignore
label={currentUser.omniauthProviderLabel}
hint={currentUser.omniauthEmail}
inputProps={{ value: currentUser.omniauthUsername }}
isDisabled
/>
{currentUser.omniauthProvider !== 'bcsc' && (
<TextFormControl
// @ts-ignore
label={currentUser.omniauthProviderLabel}
hint={currentUser.omniauthEmail}
inputProps={{ value: currentUser.omniauthUsername }}
isDisabled
/>
)}
{!currentUser.isSuperAdmin && (
<Alert
status="info"
Expand Down
53 changes: 28 additions & 25 deletions app/frontend/components/shared/select/selectors/sites-select.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, FormControl, FormLabel, HStack, InputGroup, Text } from "@chakra-ui/react"
import { Flex, FormControl, FormLabel, HStack, InputGroup, Tooltip, Text } from "@chakra-ui/react"
import { MapPin } from "@phosphor-icons/react"
import debounce from "lodash/debounce"
import { observer } from "mobx-react-lite"
Expand Down Expand Up @@ -131,30 +131,33 @@ export const SitesSelect = observer(function ({
}}
render={({ field: { onChange, value } }) => {
return (
<CreatableSelect
// @ts-ignore
options={pidOptions}
ref={pidSelectRef}
value={{
label: formatPidLabel(value),
value: formatPidValue(value),
}}
onChange={(option) => {
if (!option) {
setValue(siteName, null)
}
onChange(formatPidValue(option?.value))
}}
onCreateOption={(inputValue: string) => {
const newValue = { label: formatPidLabel(inputValue), value: formatPidValue(inputValue) }
onChange(newValue.value)
}}
formatCreateLabel={(inputValue: string) =>
t("permitApplication.usePid", { inputValue: formatPidLabel(inputValue) })
}
isClearable
isSearchable
/>
<Tooltip label={t("permitApplication.pidToolTip")}>
<CreatableSelect
// @ts-ignore
options={pidOptions}
ref={pidSelectRef}
title={t("permitApplication.pidToolTip")}
value={{
label: formatPidLabel(value),
value: formatPidValue(value),
}}
onChange={(option) => {
if (!option) {
setValue(siteName, null)
}
onChange(formatPidValue(option?.value))
}}
onCreateOption={(inputValue: string) => {
const newValue = { label: formatPidLabel(inputValue), value: formatPidValue(inputValue) }
onChange(newValue.value)
}}
formatCreateLabel={(inputValue: string) =>
t("permitApplication.usePid", { inputValue: formatPidLabel(inputValue) })
}
isClearable
isSearchable
/>
</Tooltip>
)
}}
/>
Expand Down
1 change: 1 addition & 0 deletions app/frontend/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ const options = {
searchKnowledge_link:
"https://www2.gov.bc.ca/gov/content/housing-tenancy/building-or-renovating/permits/building-permit-hub-search",
pidLabel: "Parcel Identification (PID) No.",
pidToolTip: "Auto Compliance: This feature checks the entered data against predefined standards or regulatory agencies to ensure it meets a completeness check automatically. It reduces manual errors and speeds up the review process by flagging discrepancies or confirming compliance.",
addressLabel: "Address",
viewed: "Viewed",
notViewed: "New",
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/styles/chakra-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

// Fix the down arrow icon position on the login page accordians
.chakra-accordion__item {
button {
button.chakra-accordion__button {
span {
width: 100%;
}
Expand Down