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 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | import { subject } from '@casl/ability';
import { type Statement } from '@amalia/core/types';
import { SubjectsEnum } from '../../types';
export type SimulateForecastedStatementSubject = Pick<Statement, 'userId'> & {
user?: Pick<Required<Statement>['user'], 'id'>;
plan?: Pick<Required<Statement>['plan'], 'id' | 'isHidden'>;
period?: Pick<Required<Statement>['period'], 'endDate' | 'startDate'>;
};
export const simulateForecastedStatementSubject = (payload: SimulateForecastedStatementSubject) =>
subject(SubjectsEnum.Forecasted_Statement, { ...payload });
export type CalculateForecastedStatementSubject = Pick<Statement, 'userId'>;
export const calculateForecastedStatementSubject = (payload: CalculateForecastedStatementSubject) =>
subject(SubjectsEnum.Forecasted_Statement, { ...payload });
|