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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 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 { PlanAgreementActions, PlanAgreementAssignmentActions } from './actions';
import {
archivePlanAgreementSubject,
bulkDownloadPlanAgreementSubject,
confirmPlanAgreementAssignmentSubject,
deletePlanAgreementAssignmentSubject,
deletePlanAgreementSubject,
duplicatePlanAgreementSubject,
editPlanAgreementSubject,
finalizePlanAgreementSubject,
previewPlanAgreementSubject,
refreshPlanAgreementTemplateSubject,
regeneratePlanAgreementAssignmentSubject,
sendPlanAgreementAssignmentSubject,
viewPlanAgreementAssignmentSubject,
viewPlanAgreementSubject,
type ArchivePlanAgreementSubject,
type BulkDownloadPlanAgreementSubject,
type ConfirmPlanAgreementAssignmentSubject,
type DeletePlanAgreementAssignmentSubject,
type DeletePlanAgreementSubject,
type DuplicatePlanAgreementSubject,
type EditPlanAgreementSubject,
type FinalizePlanAgreementSubject,
type PreviewPlanAgreementSubject,
type RefreshPlanAgreementTemplateSubject,
type RegeneratePlanAgreementAssignmentSubject,
type SendPlanAgreementAssignmentSubject,
type ViewPlanAgreementAssignmentSubject,
type ViewPlanAgreementSubject,
} from './subjects';
export const canArchivePlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.archive, SubjectsEnum.PlanAgreement);
export const canArchiveThisPlanAgreement = (ability: Ability, ...payload: ArchivePlanAgreementSubject) =>
ability.can(PlanAgreementActions.archive, archivePlanAgreementSubject(...payload));
export const canBulkDownloadPlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.bulk_download, SubjectsEnum.PlanAgreement);
export const canBulkDownloadThisPlanAgreement = (ability: Ability, ...payload: BulkDownloadPlanAgreementSubject) =>
ability.can(PlanAgreementActions.bulk_download, bulkDownloadPlanAgreementSubject(...payload));
export const canCreatePlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.create, SubjectsEnum.PlanAgreement);
export const canDuplicatePlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.duplicate, SubjectsEnum.PlanAgreement);
export const canDuplicateThisPlanAgreement = (ability: Ability, ...payload: DuplicatePlanAgreementSubject) =>
ability.can(PlanAgreementActions.duplicate, duplicatePlanAgreementSubject(...payload));
export const canDeletePlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.delete, SubjectsEnum.PlanAgreement);
export const canDeleteThisPlanAgreement = (ability: Ability, ...payload: DeletePlanAgreementSubject) =>
ability.can(PlanAgreementActions.delete, deletePlanAgreementSubject(...payload));
export const canEditPlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.edit, SubjectsEnum.PlanAgreement);
export const canEditThisPlanAgreement = (ability: Ability, ...payload: EditPlanAgreementSubject) =>
ability.can(PlanAgreementActions.edit, editPlanAgreementSubject(...payload));
export const canFinalizePlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.finalize, SubjectsEnum.PlanAgreement);
export const canFinalizeThisPlanAgreement = (ability: Ability, ...payload: FinalizePlanAgreementSubject) =>
ability.can(PlanAgreementActions.finalize, finalizePlanAgreementSubject(...payload));
export const canPreviewPlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.preview, SubjectsEnum.PlanAgreement);
export const canPreviewThisPlanAgreement = (ability: Ability, ...payload: PreviewPlanAgreementSubject) =>
ability.can(PlanAgreementActions.preview, previewPlanAgreementSubject(...payload));
export const canRefreshPlanAgreementTemplates = (ability: Ability) =>
ability.can(PlanAgreementActions.refresh_template, SubjectsEnum.PlanAgreement);
export const canRefreshThisPlanAgreementTemplate = (
ability: Ability,
...payload: RefreshPlanAgreementTemplateSubject
) => ability.can(PlanAgreementActions.refresh_template, refreshPlanAgreementTemplateSubject(...payload));
export const canSupervisePlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.supervise, SubjectsEnum.PlanAgreement);
export const canViewPlanAgreements = (ability: Ability) =>
ability.can(PlanAgreementActions.view, SubjectsEnum.PlanAgreement);
export const canViewThisPlanAgreement = (ability: Ability, payload: ViewPlanAgreementSubject) =>
ability.can(PlanAgreementActions.view, viewPlanAgreementSubject(payload));
export const canConfirmPlanAgreementAssignments = (ability: Ability) =>
ability.can(PlanAgreementAssignmentActions.confirm, SubjectsEnum.PlanAgreementAssignment);
export const canConfirmThisPlanAgreementAssignment = (
ability: Ability,
...payload: ConfirmPlanAgreementAssignmentSubject
) => ability.can(PlanAgreementAssignmentActions.confirm, confirmPlanAgreementAssignmentSubject(...payload));
export const canDeletePlanAgreementAssignments = (ability: Ability) =>
ability.can(PlanAgreementAssignmentActions.delete, SubjectsEnum.PlanAgreementAssignment);
export const canDeleteThisPlanAgreementAssignment = (
ability: Ability,
...payload: DeletePlanAgreementAssignmentSubject
) => ability.can(PlanAgreementAssignmentActions.delete, deletePlanAgreementAssignmentSubject(...payload));
export const canRegeneratePlanAgreementAssignments = (ability: Ability) =>
ability.can(PlanAgreementAssignmentActions.regenerate, SubjectsEnum.PlanAgreementAssignment);
export const canRegenerateThisPlanAgreementAssignment = (
ability: Ability,
...payload: RegeneratePlanAgreementAssignmentSubject
) => ability.can(PlanAgreementAssignmentActions.regenerate, regeneratePlanAgreementAssignmentSubject(...payload));
export const canSendPlanAgreementAssignments = (ability: Ability) =>
ability.can(PlanAgreementAssignmentActions.send, SubjectsEnum.PlanAgreementAssignment);
export const canSendThisPlanAgreementAssignment = (ability: Ability, ...payload: SendPlanAgreementAssignmentSubject) =>
ability.can(PlanAgreementAssignmentActions.send, sendPlanAgreementAssignmentSubject(...payload));
export const canViewPlanAgreementAssignments = (ability: Ability) =>
ability.can(PlanAgreementAssignmentActions.view, SubjectsEnum.PlanAgreementAssignment);
export const canViewThisPlanAgreementAssignment = (ability: Ability, payload: ViewPlanAgreementAssignmentSubject) =>
ability.can(PlanAgreementAssignmentActions.view, viewPlanAgreementAssignmentSubject(payload));
|