-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat-add-leave_requests_on-faircalendar
- Loading branch information
Showing
51 changed files
with
591 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
migrations/1718114720685-add-postponed-worked-free-day-leave-request-type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class AddPostponedWorkedFreeDayLeaveRequestType1718114720685 | ||
implements MigrationInterface { | ||
name = 'AddPostponedWorkedFreeDayLeaveRequestType1718114720685'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TYPE "public"."leave_request_type_enum" RENAME TO "leave_request_type_enum_old"` | ||
); | ||
await queryRunner.query( | ||
`CREATE TYPE "public"."leave_request_type_enum" AS ENUM('paid', 'unpaid', 'special', 'medical', 'illimited', 'postponedWorkedFreeDay')` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "leave_request" ALTER COLUMN "type" TYPE "public"."leave_request_type_enum" USING "type"::"text"::"public"."leave_request_type_enum"` | ||
); | ||
await queryRunner.query(`DROP TYPE "public"."leave_request_type_enum_old"`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`CREATE TYPE "public"."leave_request_type_enum_old" AS ENUM('paid', 'unpaid', 'special', 'medical', 'illimited')` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "leave_request" ALTER COLUMN "type" TYPE "public"."leave_request_type_enum_old" USING "type"::"text"::"public"."leave_request_type_enum_old"` | ||
); | ||
await queryRunner.query(`DROP TYPE "public"."leave_request_type_enum"`); | ||
await queryRunner.query( | ||
`ALTER TYPE "public"."leave_request_type_enum_old" RENAME TO "leave_request_type_enum"` | ||
); | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
src/Application/HumanResource/Leave/Query/GetLeaveRequestByIdQuery.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { IQuery } from 'src/Application/IQuery'; | ||
import { User } from 'src/Domain/HumanResource/User/User.entity'; | ||
|
||
export class GetLeaveRequestByIdQuery implements IQuery { | ||
constructor(public readonly id: string) {} | ||
constructor(public readonly id: string, public readonly currentUser: User) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.