import { Status } from '../LeaveRequest.entity' ; import { User } from '../../User/User.entity' ; import { LeaveRequest } from '../LeaveRequest.entity' ; export class CanLeaveRequestBeModerated { public isSatisfiedBy ( leaveRequest , user ) { return ( leaveRequest . getStatus ( ) === Status . PENDING && leaveRequest . getUser ( ) . getId ( ) !== user . getId ( ) ) ; } }