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 { subject } from '@casl/ability';
import { type Dashboard } from '@amalia/reporting/dashboards-v2/types';
import { SubjectsEnum } from '../../types';
export type ViewDashboardSubject = Pick<Dashboard, 'createdBy' | 'permissions'>;
export const viewDashboardSubject = (payload: ViewDashboardSubject) =>
subject(SubjectsEnum.DashboardsV2, { ...payload });
export type ModifyDashboardSubject = Pick<Dashboard, 'createdBy' | 'permissions'>;
export const modifyDashboardSubject = (payload: ModifyDashboardSubject) =>
subject(SubjectsEnum.DashboardsV2, { ...payload });
export type DeleteDashboardSubject = Pick<Dashboard, 'createdBy' | 'permissions'>;
export const deleteDashboardSubject = (payload: DeleteDashboardSubject) =>
subject(SubjectsEnum.DashboardsV2, { ...payload });
export type ShareDashboardSubject = Pick<Dashboard, 'createdBy' | 'permissions'>;
export const shareDashboardSubject = (payload: ShareDashboardSubject) =>
subject(SubjectsEnum.DashboardsV2, { ...payload });
|