-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Member edit form split into two (#249)
member edit form split into two: - `{{host}}/members/1/editOwnMemberInfoForm` => form for members to edit own info - `{{host}}/members/1/editByAdminForm` => form for admins to edit info about other members * Updated API Specs for splitted members form * Added forms for edit own and another member details * Corrected format of birth certificate number for initial loaded data * Oris proxy controller bug fix - HTTP 500 for unknown regnum * ArchUnit failures fix * Validations for existing birthday certificate and one of email/phone contacts doesn't respond with HTTP 500 now
- Loading branch information
Showing
23 changed files
with
498 additions
and
35 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
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
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
25 changes: 25 additions & 0 deletions
25
...ava/club/klabis/adapters/api/members/mappers/EditAnotherMemberInfoByAdminFormMappers.java
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,25 @@ | ||
package club.klabis.adapters.api.members.mappers; | ||
|
||
import club.klabis.api.dto.EditAnotherMemberDetailsFormApiDto; | ||
import club.klabis.common.mapstruct.DomainFormMapperConfiguration; | ||
import club.klabis.domain.members.Member; | ||
import club.klabis.domain.members.forms.EditAnotherMemberInfoByAdminForm; | ||
import org.mapstruct.InheritInverseConfiguration; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.ReportingPolicy; | ||
import org.mapstruct.extensions.spring.DelegatingConverter; | ||
import org.springframework.core.convert.converter.Converter; | ||
|
||
@Mapper(config = DomainFormMapperConfiguration.class, unmappedSourcePolicy = ReportingPolicy.IGNORE) | ||
interface EditAnotherMemberInfoByAdminFormMappers extends Converter<EditAnotherMemberInfoByAdminForm, EditAnotherMemberDetailsFormApiDto> { | ||
|
||
@Override | ||
EditAnotherMemberDetailsFormApiDto convert(EditAnotherMemberInfoByAdminForm source); | ||
|
||
@InheritInverseConfiguration | ||
@DelegatingConverter | ||
EditAnotherMemberInfoByAdminForm convertReverse(EditAnotherMemberDetailsFormApiDto source); | ||
|
||
@DelegatingConverter | ||
EditAnotherMemberInfoByAdminForm fromDomain(Member member); | ||
} |
26 changes: 26 additions & 0 deletions
26
...labis/adapters/api/members/mappers/MemberEditOwnInfoFormApiDtoFromMemberDomainMapper.java
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,26 @@ | ||
package club.klabis.adapters.api.members.mappers; | ||
|
||
import club.klabis.api.dto.EditMyDetailsFormApiDto; | ||
import club.klabis.common.mapstruct.DomainFormMapperConfiguration; | ||
import club.klabis.domain.members.Member; | ||
import club.klabis.domain.members.forms.EditOwnMemberInfoForm; | ||
import org.mapstruct.InheritInverseConfiguration; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.extensions.spring.DelegatingConverter; | ||
import org.springframework.core.convert.converter.Converter; | ||
|
||
@Mapper(config = DomainFormMapperConfiguration.class) | ||
interface MemberEditOwnInfoFormApiDtoFromMemberDomainMapper extends Converter<EditOwnMemberInfoForm, EditMyDetailsFormApiDto> { | ||
@Override | ||
EditMyDetailsFormApiDto convert(EditOwnMemberInfoForm source); | ||
|
||
@InheritInverseConfiguration | ||
@DelegatingConverter | ||
EditOwnMemberInfoForm convertReverse(EditMyDetailsFormApiDto source); | ||
|
||
@Mapping(target = "guardians", source = "legalGuardians") | ||
@Mapping(target = "contact", source = "contact") | ||
@DelegatingConverter | ||
EditOwnMemberInfoForm fromDomain(Member member); | ||
} |
2 changes: 1 addition & 1 deletion
2
...abis/domain/oris/OrisProxyController.java → ...dapters/api/oris/OrisProxyController.java
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
2 changes: 1 addition & 1 deletion
2
...labis/domain/oris/OrisUserInfoMapper.java → ...adapters/api/oris/OrisUserInfoMapper.java
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
13 changes: 13 additions & 0 deletions
13
backend/src/main/java/club/klabis/common/mapstruct/DomainFormMapperConfiguration.java
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,13 @@ | ||
package club.klabis.common.mapstruct; | ||
|
||
import club.klabis.common.ConversionServiceAdapter; | ||
import org.mapstruct.MapperConfig; | ||
import org.mapstruct.ReportingPolicy; | ||
|
||
/** | ||
* Mapstruct configuration for API DTO mappers. | ||
* These mappers shall implement `Converter<DOMAIN, APIDTO>` (APIDTO needs to be target, DOMAIN object needs to be source) | ||
*/ | ||
@MapperConfig(componentModel = "spring", uses = {ConversionServiceAdapter.class, OptionalMapstructSupport.class}, unmappedSourcePolicy = ReportingPolicy.IGNORE, unmappedTargetPolicy = ReportingPolicy.ERROR) | ||
public interface DomainFormMapperConfiguration { | ||
} |
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
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.