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

[Provider] Upload the list of employees #1621

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

HlibBondarev
Copy link
Contributor

  1. Added UploadEmployeeDto class for uploading new employees.
  2. Changed IProviderService interface - added method signature: Task UploadEmployeesForProvider(Guid id, UploadEmployeeDto[] data);
  3. Changed ProviderService class:
  • injected repositories for Individual, Official and Position to the service;
  • added async method: Task UploadEmployeesForProvider(Guid id, UploadEmployeeDto[] data).
  1. Changed ProviderServiceV2 class: injected repositories for Individual, Official and Position to the service.
  2. Changed MappingProfile class: added mapping UploadEmployeeDto => Individual and Individual => UploadEmployeeDto.
  3. Changed Constants class: added constants - MaxIndividualNameLength, MinIndividualNameLength and MaxNumberOfEmployeesToUpload.
  4. Changed Position class: added default value (string.Empty) for properties - GenitiveName and ClassifierType.
  5. Changed User class: reodered properties and added comment - TODO.
  6. Added ProviderController class: added action - async Task Upload(Guid id, [FromBody] UploadEmployeeDto[] uploadEployees).
  7. Changed tests in classes ProviderServiceTests, ProviderServiceV2, ProviderServiceTests and ProviderServiceUpdate - added mocks of repositories for Individual, Official and Position.

2) Changed IProviderService interface - added method signature:
Task UploadEmployeesForProvider(Guid id, UploadEmployeeDto[] data);
3) Changed ProviderService class:
- injected repositories for Individual, Official and Position to the service;
- added async method: Task UploadEmployeesForProvider(Guid id, UploadEmployeeDto[] data).
4) Changed ProviderServiceV2 class: injected repositories for Individual, Official and Position to the service.
5) Changed MappingProfile class: added mapping UploadEmployeeDto => Individual and Individual => UploadEmployeeDto.
6) Changed Constants class: added constants - MaxIndividualNameLength, MinIndividualNameLength and MaxNumberOfEmployeesToUpload.
7) Changed Position class: added default value (string.Empty) for properties - GenitiveName and ClassifierType.
8) Changed User class: reodered properties and added comment - TODO.
9) Added ProviderController class: added action - async Task<IActionResult> Upload(Guid id, [FromBody] UploadEmployeeDto[] uploadEployees).
10) Changed tests in classes ProviderServiceTests, ProviderServiceV2, ProviderServiceTests and  ProviderServiceUpdate -
added mocks of repositories for Individual, Official and Position.
@HlibBondarev HlibBondarev added enhancement New feature or request user story labels Dec 25, 2024
@HlibBondarev HlibBondarev self-assigned this Dec 25, 2024
@HlibBondarev HlibBondarev linked an issue Dec 25, 2024 that may be closed by this pull request
…ss: extracted CheckListOfEmployeesForUploading() method for checking employees.
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
22.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

2) Created UploadEmployeeResponseDto class.
3) Changed signature of method Task<UploadEmployeeResponseDto> UploadEmployeesForProvider(Guid id, UploadEmployeeRequestDto[] data) in IProviderService interface and ProviderService class.
4) Changed Upload() action of ProviderController class.
5) Added tests for UploadEmployeesForProvider() method of ProviderService class to ProviderServiceTests class.
6) Created UploadEmployeeDtoGenerator class for generating UploadEmployeeDto instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request user story
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Provider] Upload the list of employees
1 participant