IBFEC-53 – Updated Agreement handling (BE)
Questions:
Possibles questions about this feature
Technical Refinement
Description
intl-user-service
TASK 1 - Add attribute on Dto
We will add the new attribute on class
UserDetailsBaseDto
:path:
intl-user-service/src/users/dtos/users.dtos.ts
@ApiProperty({ required: false, description: 'Required acceptance agreement info', type: [RequiredAcceptanceAgreementInfoDto], nullable: true, }) @Type(() => RequiredAcceptanceAgreementInfoDto) @IsArray() @IsOptional() public requiredAcceptanceAgreementInfo?: RequiredAcceptanceAgreementInfoDto[] | null;
On
class UserDetailsDto
onconstructor
, we will add a mapper:const requiredAcceptanceAgreementInfo = userDetails.requiredAcceptanceAgreementInfo?.map( (ra: IRequiredAcceptanceAgreementInfo) => ra as RequiredAcceptanceAgreementInfoDto, );
this.requiredAcceptanceAgreementInfo = requiredAcceptanceAgreementInfo;
ctg-packages
TASK 2 - add the attribute on TUserDetails
We will add the attribute
requiredAcceptanceAgreementInfo
onTUserDetails
:path:
intl-packages/packages/users/src/schemata.ts
intl-packages
TASK 3 - add the attribute on TUserDetails
Duplicate change to done on ctg-packages
intl-whitelabel-graphql
TASK 4 - add the attribute on UpdateUserDetailsInput
We will add the attribute
requiredAcceptanceAgreementInfo
onUpdateUserDetailsInput
path:
intl-whitelabel-graphql/src/functions/graphql/schemas/users.gql
We will run the command:
After that, will be created an automatic code on file:
intl-whitelabel-graphql/src/functions/graphql/generated/graphql.ts
, probably, will be many changes, but we can to discard all, except of change related aboutrequiredAcceptanceAgreementInfo
intl-whitelabel-app
TASK 5 - Create method to update requiredAcceptanceAgreementInfo
We will create an update method to
requiredAcceptanceAgreementInfo
path:
intl-whitelabel-app/workspaces/frontend/src/state/auth/hooks/use-current-user.ts
And we will export this method from hook
Screenshots
TODO
POC
TODO
Impact Analysis
Authentication
Unit Test
Authentication
MOCKS
TODO
Useful Links
Workflows: Lucidchart document | Lucidchart
Existent behavior: Terms and Conditions - Technical Refinement - Discovery As-Is