Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | import { SubjectsEnum, type Ability } from '../../types';
import { ForecastedStatementsActions } from './actions';
import {
calculateForecastedStatementSubject,
simulateForecastedStatementSubject,
type CalculateForecastedStatementSubject,
type SimulateForecastedStatementSubject,
} from './subjects';
export const canSimulateForecastedStatements = (ability: Ability) =>
ability.can(ForecastedStatementsActions.simulate, SubjectsEnum.Forecasted_Statement);
export const canSimulateThisForecastedStatement = (ability: Ability, statement: SimulateForecastedStatementSubject) =>
ability.can(ForecastedStatementsActions.simulate, simulateForecastedStatementSubject(statement));
export const canCalculateForecastedStatements = (ability: Ability) =>
ability.can(ForecastedStatementsActions.calculate, SubjectsEnum.Forecasted_Statement);
export const canCalculateThisForecastedStatement = (ability: Ability, statement: CalculateForecastedStatementSubject) =>
ability.can(ForecastedStatementsActions.calculate, calculateForecastedStatementSubject(statement));
|