Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Rectuitment session module #17

Merged
merged 40 commits into from
Jan 22, 2024
Merged

Conversation

AlbertoBaroso
Copy link
Collaborator

No description provided.

@AlbertoBaroso AlbertoBaroso merged commit dc85236 into dev Jan 22, 2024
2 checks passed
AlbertoBaroso added a commit that referenced this pull request Apr 9, 2024
whiitex added a commit that referenced this pull request Apr 12, 2024
* Feature/rectuitment session (#20)

* feat: session service, controller, entity

* feat: update recruitment-session: service, controller, entity

* test: mock recruitment session service, insert data mock

* fix: relative import of recruitment-session from shared folder

* fix: recruitment-session service Delete test

* fix: removed lastModified from UpdateRecruitmentSessionDto

* fix: ability check on recruitment session creation

* feat: check if recruitment session has pending interviews before deleting it

* feat: check for conflicts and consistency when updating a recruitment session state

* fix: check ability for update recruitment session

* refactor: removed unused imports in recruitment-session.controller.ts

* fix: use const for unchanged variable in createRecruitmentSession service method

* refactor: removed unused code in creatre-recruitment-session.dto.ts

* fix: updated Date[] in create and update Recruitment session DTOs

* test: Recruitment Session Controller tests

* refactor: removed unused imports

* feat: Recruitment session module

* fix: import of RecruitmentSessionState in recruitment-session.service.ts

* fix: find function recreuitment session

* fix: set findBy functions

* fix: adjustments about array of recruitment session

* test: create recruitment session

* add: test create RS on service.spec

* fix: changed array into scalar value in findBy and findActive

---------

Co-authored-by: Alberto Baroso <[email protected]>

* feat: created availability module

* fix: mock data timestamp for midnight

* fix: added http exceptions and removed unnecessary request fields

* test: Initial tests for availability controller

* test: Initial tests for availability service

* fix: relationship between timeslot and availability entities

* fix: removed relationship fields in entities

* test: CRUD unit tests for availability

* RecruitmentSession: controller, service, entity, tests (#15)

RecruitmentSessionController:
- findActive: Retrieve the active recruitment session if it exists.
- createRecruitmentSession
- updateRecruitmentSession
- deleteRecruitmentSession

RecruitmentSessionService:
- createRecruitmentSession
- findAllRecruitmentSessions
- findRecruitmentSessionById
- findActiveRecruitmentSession
- deletRecruitmentSession
- updateRecruitmentSession
- sessionHasPendingInterviews: Check if a recruitment session has pending interviews (to be implemented).

DTOs:
- CreateRecruitmentSessionDTO
- UpdateRecruitmentSessionDTO
- RecruitmentSessionResponseDTO

Tests:
- Controller Unit tests: recruitment-session.controller.spec.ts
- Service Unit tests: recruitment-session.service.spec.ts


Commits:

* fix: missing dependencies and imports (#9)

* fix: added @joi/date library

* fix: added missing useState import
  fix: removed loading screen when auth token is empty

* docs: updated project description, useful links, and contributors in README.md (#10)

* feat session: service, controller, entity

* feat: update recruitment-session: service, controller, entity

* feat: update recruitment-session: service, controller, entity

* fix: dependencies in shared/abilities

* fix: mock shared -> required/optional fields

* fix: mock recruitment session service, insert data mock

* fix: relative import of recruitment-session from shared folder

* fix: recruitment-session service Delete test

* fix: removed lastModified from UpdateRecruitmentSessionDto

* fix: ability check on recruitment session creation

* feat: check if recruitment session has pending interviews before deleting it

* feat: check for conflicts and consistency when updating a recruitment session state

* fix: check ability for update recruitment session

* refactor: removed unused imports in recruitment-session.controller.ts

* fix: use const for unchanged variable in createRecruitmentSession service method

* refactor: removed unused code in creatre-recruitment-session.dto.ts

* fix: updated Date[] in create and update Recruitment session DTOs

* fix: added 'state' to recruitmentSession response DTO

* test: Recruitment Session Controller tests

* refactor: removed unused imports

---------

Co-authored-by: Alberto Baroso <[email protected]>

* fix: updated imports from shared/recruitment-session

* Feature: Rectuitment session module (#17)

* SonarCloud Analysis (#18)

* feat: setup coverageDirectory and coveragePathIgnorePatterns

* ci: added SonarCloud Analysis job in GitHub actions

* ci: sonar-project.properties configuration

* Simplified workflow, single task, maximum gain

---------

Co-authored-by: Vincenzo Pellegrini <[email protected]>

* fix: removed unused avaiability endpoints

* feat: added existance checks and conflict check upon availability creation

* feat: return 404 when attempting to delete non-existing availabilities

refactor: availability.controller.ts using prettier

* fix: Availability authorizations and creation schema

* fix!: updated AvailabilityState enum values

* test: role abilities on Availability
test: validate insert Availability schema

* feat: additional checks before deleting availability

* test: availability controller unit tests

* feat: added findByUserAndTimeSlot in Availability service

fix: used Relation as type of fields in Availability entity

* fix!: removed unnecessary fields in CreateAvailabilityDto

* test: Availability service unit tests

* fix!: removed create/delete timeslot endpoint

* feat: TimeSlot service generateTimeslots()

* test: TimeSlot service generateTimeslots()

* feat: create recruitment session's timeslots atomically using a transaction

* feat: added jest-mock-extended library to auto mock classes

* fix: added DbAwareColumn to overcome sqlite column type limitation

* fix: apply abilities on TimeSlots

* fix: imported missing modules

* fix: import Joi in availability controller

* test: mock recruitment session for timeslot generation

* fix: added coverage exclusions in sonar-project.properties

* refactor: format according to prettier rules, reduced code duplication in timeslots.service.spec.ts

* feat: User is_board and is_expert flags

---------

Co-authored-by: whiitex <[email protected]>
Co-authored-by: Marco De Luca <[email protected]>
Co-authored-by: whiteOFF <[email protected]>
Co-authored-by: Vincenzo Pellegrini <[email protected]>
Co-authored-by: Mugna0990 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants