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

feat(features): add tooltip to the inactive field publisher records #2925

Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ import MonthSelector from '@features/reports/service_year_month_selector/month_s
import Publishers from '../publishers';
import SwitchWithLabel from '@components/switch_with_label';
import TotalStatistics from '../total_statistics';
import Tooltip from '@components/tooltip';

const YearDetails = (props: YearDetailsProps) => {
const { t } = useAppTranslation();
@@ -25,13 +26,25 @@ const YearDetails = (props: YearDetailsProps) => {
alignItems={laptopUp ? 'center' : 'stretch'}
justifyContent="space-between"
>
<MonthSelector
year={year}
value={month}
onChange={handleMonthChange}
readOnly={wholeYear}
sx={{ flex: 1 }}
/>
<Tooltip
title={t('tr_wholeYearIsSelected')}
delaySpeed={'fast'}
show={wholeYear}
followCursor
sx={{
flex: 1,
}}
>
<MonthSelector
year={year}
value={month}
onChange={handleMonthChange}
readOnly={wholeYear}
sx={{
flex: 1,
}}
/>
</Tooltip>
<Box>
<SwitchWithLabel
label={t('tr_wholeYearSetting')}
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@ export type MonthSelectorProps = {
year: string;
value: string;
onChange: (value: string) => void;
readOnly?: boolean
readOnly?: boolean;
sx?: SxProps<Theme>;
};
1 change: 1 addition & 0 deletions src/locales/en/general.json
Original file line number Diff line number Diff line change
@@ -127,5 +127,6 @@
"tr_verified": "Verified",
"tr_notSubmitted": "Not submitted",
"tr_pendingVerification": "Pending verification",
"tr_wholeYearIsSelected": "The 'Whole year' option is currently selected",
"tr_forceRefreshButtonTooltip": "Force refresh the app to check for updates if they aren't showing up. No data will be cleared."
}