refactor(employee): switched phone_number type from number to string
This commit is contained in:
parent
72f6cc8a9e
commit
7b86b8c662
|
|
@ -19,7 +19,7 @@ model Users {
|
|||
first_name String
|
||||
last_name String
|
||||
email String @unique
|
||||
phone_number Int @unique
|
||||
phone_number String @unique
|
||||
residence String?
|
||||
role Roles @default(GUEST)
|
||||
|
||||
|
|
|
|||
|
|
@ -62,10 +62,9 @@ export class CreateEmployeeDto {
|
|||
example: '82538437464',
|
||||
description: 'Employee`s phone number',
|
||||
})
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@IsString()
|
||||
@IsPositive()
|
||||
phone_number: number;
|
||||
phone_number: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: '1 Bagshot Row, Hobbiton, The Shire, Middle-earth',
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export class EmployeeProfileItemDto {
|
|||
company_name: number | null;
|
||||
job_title: string | null;
|
||||
email: string | null;
|
||||
phone_number: number;
|
||||
phone_number: string;
|
||||
first_work_day: string;
|
||||
last_work_day?: string | null;
|
||||
residence: string | null;
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ export class UpdateEmployeeDto extends PartialType(CreateEmployeeDto) {
|
|||
supervisor_id?: number;
|
||||
|
||||
@Max(2147483647)
|
||||
phone_number: number;
|
||||
phone_number: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,12 +113,13 @@ export class PayPeriodsQueryService {
|
|||
payday : period.payday,
|
||||
pay_year : period.pay_year,
|
||||
label : period.label,
|
||||
//add is_approved
|
||||
}, { filtered_employee_ids: crew_ids, seed_names });
|
||||
}
|
||||
|
||||
private async buildOverview(
|
||||
period: { period_start: string | Date; period_end: string | Date; payday: string | Date;
|
||||
period_no: number; pay_year: number; label: string; },
|
||||
period_no: number; pay_year: number; label: string; }, //add is_approved
|
||||
options?: { filtered_employee_ids?: number[]; seed_names?: Map<number, {name: string, email: string}>}
|
||||
): Promise<PayPeriodOverviewDto> {
|
||||
const toDateString = (d: Date) => d.toISOString().slice(0, 10);
|
||||
|
|
@ -287,6 +288,7 @@ export class PayPeriodsQueryService {
|
|||
period_start: period.period_start,
|
||||
period_end: period.period_end,
|
||||
label: period.label,
|
||||
//add is_approved
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export class UserDto {
|
|||
example: 5141234567,
|
||||
description: 'Unique phone number',
|
||||
})
|
||||
phone_number: number;
|
||||
phone_number: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: 'Minas Tirith, Gondor',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user