-
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.
feat(src): Add onboarding proccess to load names
- Loading branch information
Victor Pino
committed
Aug 26, 2024
1 parent
e7593e6
commit e161bff
Showing
18 changed files
with
632 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Customer } from "src/modules/customer/entities/customer.entity"; | ||
import { IndividualCustomer } from "src/modules/individual-customer/entities/individual-customer.entity"; | ||
|
||
export interface LoginResponse { | ||
customer: Customer, | ||
individual: IndividualCustomer | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsString, Length } from 'class-validator'; | ||
|
||
export class AddressDTO { | ||
@ApiProperty({ | ||
description: 'Address of the individual customer', | ||
example: '123 Main St', | ||
}) | ||
@IsString() | ||
@Length(1, 200) | ||
address: string; | ||
|
||
@ApiProperty({ | ||
description: 'State of the individual customer', | ||
example: 'California', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
state: string; | ||
|
||
@ApiProperty({ | ||
description: 'City of the individual customer', | ||
example: 'Los Angeles', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
city: string; | ||
|
||
@ApiProperty({ | ||
description: 'Town or locality', | ||
example: 'Downtown', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
town: string; | ||
} |
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,59 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsString, Length, IsPhoneNumber, IsNumberString } from 'class-validator'; | ||
|
||
export class CompanyInfoDTO { | ||
@ApiProperty({ | ||
description: 'Name of the company', | ||
example: 'Tech Solutions Inc.', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
name: string; | ||
|
||
@ApiProperty({ | ||
description: 'Phone number of the company', | ||
example: '+1-800-123-4567', | ||
}) | ||
@IsPhoneNumber(null) | ||
phone: string; | ||
|
||
@ApiProperty({ | ||
description: 'Address of the company', | ||
example: '456 Business Rd', | ||
}) | ||
@IsString() | ||
@Length(1, 200) | ||
address: string; | ||
|
||
@ApiProperty({ | ||
description: 'State where the company is located', | ||
example: 'New York', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
state: string; | ||
|
||
@ApiProperty({ | ||
description: 'City where the company is located', | ||
example: 'New York City', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
city: string; | ||
|
||
@ApiProperty({ | ||
description: 'Year the company was founded or the individual joined', | ||
example: '2015', | ||
}) | ||
@IsNumberString() | ||
@Length(4, 4) | ||
year: string; | ||
|
||
@ApiProperty({ | ||
description: 'Month the company was founded or the individual joined', | ||
example: 'March', | ||
}) | ||
@IsString() | ||
@Length(1, 50) | ||
month: string; | ||
} |
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,11 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsPhoneNumber } from 'class-validator'; | ||
|
||
export class ContactInfoDTO { | ||
@ApiProperty({ | ||
description: 'Phone number of the individual customer', | ||
example: '+1-555-555-5555', | ||
}) | ||
@IsPhoneNumber(null) | ||
phone: string; | ||
} |
28 changes: 28 additions & 0 deletions
28
src/modules/individual-customer/dtos/education-data.dto.ts
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,28 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsString, Length, IsNumberString } from 'class-validator'; | ||
|
||
export class EducationDataDTO { | ||
@ApiProperty({ | ||
description: 'Level of education', | ||
example: 'Bachelor', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
level: string; | ||
|
||
@ApiProperty({ | ||
description: 'Area of specialization', | ||
example: 'Computer Science', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
area: string; | ||
|
||
@ApiProperty({ | ||
description: 'Year of graduation or last year attended', | ||
example: '2015', | ||
}) | ||
@IsNumberString() | ||
@Length(4, 4) | ||
year: string; | ||
} |
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,28 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsString, Length, IsNumberString } from 'class-validator'; | ||
|
||
export class HousingDataDTO { | ||
@ApiProperty({ | ||
description: 'Type of housing', | ||
example: 'Apartment', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
type: string; | ||
|
||
@ApiProperty({ | ||
description: 'Year of purchase or construction', | ||
example: '2010', | ||
}) | ||
@IsNumberString() | ||
@Length(4, 4) | ||
year: string; | ||
|
||
@ApiProperty({ | ||
description: 'Month of purchase or construction', | ||
example: 'June', | ||
}) | ||
@IsString() | ||
@Length(1, 50) | ||
month: string; | ||
} |
28 changes: 28 additions & 0 deletions
28
src/modules/individual-customer/dtos/identity-document.dto.ts
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,28 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsString, Length } from 'class-validator'; | ||
|
||
export class IdentityDocumentDTO { | ||
@ApiProperty({ | ||
description: 'Country of the identity document', | ||
example: 'USA', | ||
}) | ||
@IsString() | ||
@Length(2, 100) | ||
country: string; | ||
|
||
@ApiProperty({ | ||
description: 'Type of the identity document', | ||
example: 'Passport', | ||
}) | ||
@IsString() | ||
@Length(2, 100) | ||
typeDocument: string; | ||
|
||
@ApiProperty({ | ||
description: 'Document number (DNI)', | ||
example: '123456789', | ||
}) | ||
@IsString() | ||
@Length(1, 100) | ||
dni: string; | ||
} |
Oops, something went wrong.