Skip to content

S5#150

Merged
Denis973 merged 65 commits intodevfrom
S5
May 24, 2023
Merged

S5#150
Denis973 merged 65 commits intodevfrom
S5

Conversation

@Maslyna
Copy link

@Maslyna Maslyna commented May 24, 2023

No description provided.

LordRenDS and others added 30 commits April 22, 2023 01:24
* Working with sponsor
* US2 COMPLETED!
Created new PATCH edpoint (.../sponsors/id)

* US2 COMPLETED 2nd TIME, YAY!

* DELETE IS WORKING!!!!! *sounds of cry*
* us3

* us3 bug fix

* bug fix

* add swagger kudos and sponsor

* add ExceptionHandler
- new changesets
- Created and implemented new refactor idea use @annotations to documenting REST API with Open API
--- Created: ---
DeleteProofApiDoc
DeleteSponsorApiDoc
DeleteTalentApiDoc
GetAllProofsApiDoc
GetAllSponsorsApiDoc
GetAllTalentsApiDoc
GetAmountOfKudosApiDoc
GetKudosForSponsorApiDoc
GetSponsorApiDoc
GetTalentApiDoc
GetTalentInformationWithProofsApiDoc
GetTalentProofByProofIdApiDoc
PatchEditProofApiDoc
PatchEditSponsorApiDoc
PatchEditTalentApiDoc
PostAddKudosToProofApiDoc
PostSponsorRegistrationApiDoc
PostTalentRegistrationApiDoc
PostUserLoginApiDoc
# Conflicts:
#	src/main/java/com/provedcode/aws/service/S3Service.java
* Updated liquibase:
- new changesets

* BUGFIX: `GET(/api/v3/proofs/1/kudos)`` has problems after deleting a `sponsor`

* Little update

* Removed exception handler for Exception.class

* Code refactor:
- Created and implemented new refactor idea use @annotations to documenting REST API with Open API
--- Created: ---
DeleteProofApiDoc
DeleteSponsorApiDoc
DeleteTalentApiDoc
GetAllProofsApiDoc
GetAllSponsorsApiDoc
GetAllTalentsApiDoc
GetAmountOfKudosApiDoc
GetKudosForSponsorApiDoc
GetSponsorApiDoc
GetTalentApiDoc
GetTalentInformationWithProofsApiDoc
GetTalentProofByProofIdApiDoc
PatchEditProofApiDoc
PatchEditSponsorApiDoc
PatchEditTalentApiDoc
PostAddKudosToProofApiDoc
PostSponsorRegistrationApiDoc
PostTalentRegistrationApiDoc
PostUserLoginApiDoc

* bug fix

* aws update

* Created PhotoService

* minore update

* refactored and optimized code

* fix .findByLogin(authentication.getName()) - getTalentProofs

* fix !userInfo.getTalent().getId().equals(talentId)

* Doc update

* New test endpoint for images

* DB EDIT: SIZE UP

---------

Co-authored-by: Denis Boyko <denboy973@gmail.com>
Co-authored-by: Ren <sergeysolovyov2016@gmail.com>
# Conflicts:
#	src/main/java/com/provedcode/aws/controller/AWSS3BucketController.java
#	src/main/java/com/provedcode/aws/service/S3Service.java
#	src/main/resources/db/changelog/changeset/V2/schema-V2.sql
  - skill
  - talent skill
* update table relationship
* add index in user_info table on login
* edit existing entity:
  - remove TalentTalents and their references
  - add <Set> skills to TalentProof
* AWS update

* US1T3 FINISHED!
---------

Co-authored-by: Maslyna <sanci324@gmail.com>
* add getAllSkillsOnProof

* add deleteSkillOnProof
* Story 2 completed: filter by words

* bugfix

* bug fix in getTalentProofs

---------

Co-authored-by: Denis Boyko <denboy973@gmail.com>
Maslyna and others added 16 commits May 19, 2023 20:05
To improve the organization of the database, SQL queries were refactored to use new table names and columns. The corresponding code was modified to insert data into the updated tables. The commit message describes the changes made to the SQL statements and the affected tables without going into specifics.
Changed constraints in Kudos and Sponsor entity tables, along with attributes and relationships. Also updated SkillMapper to reflect SkillDTO changes.
…act information

Changed table names for talents' skill sets, attached files, and contact information for clarity and consistency.
This commit refactors entity and table names for coherence between TalentLink, TalentProof, and TalentDescription entities.
…ices and repositories

The Skills entity has been renamed to Skill. All references to Skills have been updated in ProofSkillsService, TalentProofService, and SkillsRepository. This refactor allows for more intuitive and consistent code.
- Use Skill instead of Skills to represent a unique skill
- Use "authorities" instead of "authority" table name for UserInfo entity
- Use "users_info" and "users_authorities" instead of "user_info" and "user_authorities" respectively for UserInfo entity

This commit refactors TalentService, Authority, and UserInfo models to use Skill instead of Skills and updates table names for UserInfo entity to use plural form for consistency and clarity.
This commit has removed unused imports and introduced cleaner code for retrieving kudos from a sponsor. Skill's kudos retrieval was optimized by replacing a fetching architecture using flatMap() for the stream with collecting stream results into a hash table. Finally, the `KudosService` class has been refactored to accommodate these changes.

In SkillsRepository, a minor fix has been made to ensure that the 'Skill' table is queried correctly.

In 'dataSkill-V5.sql', the IDs in the insert statements have been removed, and the queries have been changed accordingly to make the statements more readable. Annotations have been added for easier reading.
* preparation for US3

* getAllKudosOnTalent

* not yet getSkillWithLargestNumberOfKudos

* finish getProofWithLargestNumberOfKudos

* finish getSkillWithLargestNumberOfKudos

* refactor addKudosToProof: you can give kudos even if you gave not a multiple of the amount
* feat: Add endpoints for adding and getting kudos to skills

This commit adds two new endpoints for adding kudos to a skill and getting the amount of kudos for a skill under a given proof. These endpoints require sponsor authentication and take a valid SetAmountKudos object.

* Add access permission to PROOF API endpoint and modify H2 URL

- Permit access to PROOF API endpoint by updating SecurityConfig.java.
- Change H2 URL format in application-dev.properties.

* Add KudosRepository and KudosService changes

- Added a new interface method to KudosRepository that returns Kudos list by ProofSkill
- Added getKudosForSponsor and getProofKudos methods to KudosService that returns kudos amount for sponsor and kudos amount with sponsor respectively

* add @transactional(readOnly = true) to getSkillKudos

* change the logic:
* skill-id is an id from the skills table, not proofs_skills

* Refactor wrong datasource configuration properties for H2 database

* Update skill column size to 50 chars in talents_skills table

The skill column in the talents_skills table has been increased from 30 chars to 50 chars to accommodate longer skill names. This update ensures compatibility with future use cases that may require longer skill names.
* refactor userInfo: add uuid and isLocked, add DeletedUser

* add deleted-user-schema.sql and refactor user-info-schema-V5.sql

* refactor register in AuthenticationServiceImpl

* refactor application.properties

* add EmailDefaultProps

* add GlobalControllerAdvice

* add EmailConfig

* add EmailService and dependency

* add ServerInfoConfig

* refactor deleteTalentById, add email

* refactor deleteSponsor, add email account recovery

* add DeleteUsersScheduler

* update properties

* AWS minore update

* update

* sponsor service update

* Requested update: sponsor can see amount of kudos on user account
User restore account now available!

* MERGE UPDATE

* MERGE UPDATE

---------

Co-authored-by: Denis Boyko <denboy973@gmail.com>
# Conflicts:
#	src/main/java/com/provedcode/config/SecurityConfig.java
#	src/main/java/com/provedcode/kudos/service/KudosService.java
#	src/main/java/com/provedcode/talent/controller/TalentController.java
#	src/main/java/com/provedcode/talent/controller/TalentSkillsController.java
#	src/main/java/com/provedcode/talent/mapper/SkillMapper.java
#	src/main/java/com/provedcode/talent/mapper/TalentMapper.java
#	src/main/java/com/provedcode/talent/model/dto/SkillDTO.java
#	src/main/java/com/provedcode/talent/model/dto/SkillsOnProofDTO.java
#	src/main/java/com/provedcode/talent/model/entity/Talent.java
#	src/main/java/com/provedcode/talent/model/entity/TalentProof.java
#	src/main/java/com/provedcode/talent/repo/SkillsRepository.java
#	src/main/java/com/provedcode/talent/repo/TalentRepository.java
#	src/main/java/com/provedcode/talent/service/TalentProofService.java
#	src/main/java/com/provedcode/talent/service/TalentService.java
#	src/main/resources/db/changelog/changeset/V4/data-V4.1.sql
#	src/main/resources/db/changelog/changeset/V4/data-V4.sql
#	src/main/resources/db/changelog/changeset/V4/schema-V4.sql
#	src/main/resources/db/changelog/db.changelog-master.yaml
@Maslyna Maslyna added enhancement New feature or request 🐸 backend Tasks for backend team user story #1 Tasks for 1st user story user story #2 Tasks for 2nd user story user story #3 Tasks for 3d user story user story #4 Tasks for 4d user story general general tascks labels May 24, 2023
@Maslyna Maslyna added this to the Sprint 5 milestone May 24, 2023
@Denis973 Denis973 self-requested a review May 24, 2023 13:12
Copy link

@Denis973 Denis973 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all ok

@Denis973 Denis973 merged commit 4d09ec5 into dev May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request 🐸 backend Tasks for backend team general general tascks user story #1 Tasks for 1st user story user story #2 Tasks for 2nd user story user story #3 Tasks for 3d user story user story #4 Tasks for 4d user story

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants