Loading analyst/src/components/ActionLogOptions/displayActionFilter.ts +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ export const displayActionFilter = ({ }): boolean => { const { team, details, logType } = actionLog if (!displayAction.all) { // if displayAction.all === null, displayAction.all is not used if (displayAction.all === false) { return false } if (!displayAction.types[ACTION_TYPES.indexOf(logType)]) { Loading analyst/src/components/ActionLogOptions/index.tsx +2 −2 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ export const ActionLogOptions: FC<ActionLogOptionsProps> = ({ ) const filters = (() => { if (displayAuto && setDisplayAuto) { if (displayAuto && setDisplayAuto && displayAction.all !== null) { return ( <> <Checkbox Loading Loading @@ -207,7 +207,7 @@ export const ActionLogOptions: FC<ActionLogOptionsProps> = ({ const setAllDisplayStates = (state: boolean) => { setDisplayAction(prev => ({ all: state, all: prev.all === null ? null : state, types: prev.types.map(() => state), email: { sent: state, Loading analyst/src/components/ActionLogOptions/types.ts +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ export type DisplayAutoType = { } export type DisplayActionType = { all: boolean all: boolean | null // use null when only using DisplayAction (without DisplayAuto) types: boolean[] email: { sent: boolean Loading analyst/src/components/ActionLogOptions/useActionLogOptionsProps.ts +4 −1 Original line number Diff line number Diff line Loading @@ -9,10 +9,12 @@ export const useActionLogOptionsProps = ({ teamCount, teamLimitDefault, selectedTeamId, withAuto, }: { teamCount: number teamLimitDefault: TeamLimitOptions selectedTeamId: string | null withAuto?: boolean }): ActionLogOptionsProps => { const tools = useTools() Loading @@ -28,7 +30,7 @@ export const useActionLogOptionsProps = ({ }, [selectedTeamId, teamLimitDefault]) const [displayAction, setDisplayAction] = useState<DisplayActionType>({ all: true, all: withAuto ? true : null, types: ACTION_TYPES.map(() => true), email: { sent: true, Loading Loading @@ -60,6 +62,7 @@ export const useActionLogOptionsWithAutoProps = ({ teamCount, teamLimitDefault, selectedTeamId, withAuto: true, }) const [displayAuto, setDisplayAuto] = useState<DisplayAutoType>({ Loading Loading
analyst/src/components/ActionLogOptions/displayActionFilter.ts +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ export const displayActionFilter = ({ }): boolean => { const { team, details, logType } = actionLog if (!displayAction.all) { // if displayAction.all === null, displayAction.all is not used if (displayAction.all === false) { return false } if (!displayAction.types[ACTION_TYPES.indexOf(logType)]) { Loading
analyst/src/components/ActionLogOptions/index.tsx +2 −2 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ export const ActionLogOptions: FC<ActionLogOptionsProps> = ({ ) const filters = (() => { if (displayAuto && setDisplayAuto) { if (displayAuto && setDisplayAuto && displayAction.all !== null) { return ( <> <Checkbox Loading Loading @@ -207,7 +207,7 @@ export const ActionLogOptions: FC<ActionLogOptionsProps> = ({ const setAllDisplayStates = (state: boolean) => { setDisplayAction(prev => ({ all: state, all: prev.all === null ? null : state, types: prev.types.map(() => state), email: { sent: state, Loading
analyst/src/components/ActionLogOptions/types.ts +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ export type DisplayAutoType = { } export type DisplayActionType = { all: boolean all: boolean | null // use null when only using DisplayAction (without DisplayAuto) types: boolean[] email: { sent: boolean Loading
analyst/src/components/ActionLogOptions/useActionLogOptionsProps.ts +4 −1 Original line number Diff line number Diff line Loading @@ -9,10 +9,12 @@ export const useActionLogOptionsProps = ({ teamCount, teamLimitDefault, selectedTeamId, withAuto, }: { teamCount: number teamLimitDefault: TeamLimitOptions selectedTeamId: string | null withAuto?: boolean }): ActionLogOptionsProps => { const tools = useTools() Loading @@ -28,7 +30,7 @@ export const useActionLogOptionsProps = ({ }, [selectedTeamId, teamLimitDefault]) const [displayAction, setDisplayAction] = useState<DisplayActionType>({ all: true, all: withAuto ? true : null, types: ACTION_TYPES.map(() => true), email: { sent: true, Loading Loading @@ -60,6 +62,7 @@ export const useActionLogOptionsWithAutoProps = ({ teamCount, teamLimitDefault, selectedTeamId, withAuto: true, }) const [displayAuto, setDisplayAuto] = useState<DisplayAutoType>({ Loading