Skip to content

Commit

Permalink
Merge branch 'master' into feat/missions-tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
fuuuzz authored Feb 14, 2025
2 parents 6dae8e4 + 047d2dd commit ac9c461
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v1
Expand All @@ -13,7 +13,7 @@ jobs:
cache: 'npm'
cache-dependency-path: package-lock.json

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
6 changes: 6 additions & 0 deletions src/Domain/HumanResource/Leave/LeaveRequest.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ export enum Type {
RELOCATION = 'relocation'
}

export function getSelectableLeaveRequestTypes() {
const types = Object.values(Type);

return types.filter(t => t !== Type.MEDICAL);
}

export interface ILeaveRequestModeration {
getStatus(): string;
getUserId(): string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { LoggedUser } from '../../User/Decorator/LoggedUser';
import { IsAuthenticatedGuard } from '../../User/Security/IsAuthenticatedGuard';
import { WithName } from 'src/Infrastructure/Common/ExtendedRouting/WithName';
import { User } from 'src/Domain/HumanResource/User/User.entity';
import { Type } from 'src/Domain/HumanResource/Leave/LeaveRequest.entity';
import { getSelectableLeaveRequestTypes } from 'src/Domain/HumanResource/Leave/LeaveRequest.entity';
import { RouteNameResolver } from 'src/Infrastructure/Common/ExtendedRouting/RouteNameResolver';

@Controller('app/people/leave-requests/add')
Expand All @@ -33,10 +33,8 @@ export class AddLeaveRequestController {
@WithName('people_leave_requests_add')
@Render('pages/leave_requests/add.njk')
public async get() {
const types = Object.values(Type);

return {
types
types: getSelectableLeaveRequestTypes()
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { IsAuthenticatedGuard } from '../../User/Security/IsAuthenticatedGuard';
import { WithName } from 'src/Infrastructure/Common/ExtendedRouting/WithName';
import { User } from 'src/Domain/HumanResource/User/User.entity';
import {
getSelectableLeaveRequestTypes,
Status,
Type
} from 'src/Domain/HumanResource/Leave/LeaveRequest.entity';
Expand Down Expand Up @@ -48,7 +49,7 @@ export class EditLeaveRequestController {
new GetLeaveRequestByIdQuery(id, user)
);

const types = Object.values(Type);
const types = getSelectableLeaveRequestTypes();

return {
leaveRequest,
Expand Down

0 comments on commit ac9c461

Please sign in to comment.