law-common 8.3.0 → 8.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,8 +36,17 @@ export interface IClientUserMappingEntity extends IAuditColumnEntity {
36
36
  clientId: number;
37
37
  userId: number;
38
38
  }
39
+ export interface IClientUserMappingCreateDto extends IEntityCreateDto<IClientUserMappingEntity> {
40
+ }
39
41
  export interface IClientIntroducingMappingEntity extends IAuditColumnEntity {
40
42
  id: number;
41
43
  clientId: number;
42
44
  userId: number;
43
45
  }
46
+ export interface IClientIntroducingMappingCreateDto extends IEntityCreateDto<IClientIntroducingMappingEntity> {
47
+ }
48
+ export interface IClientEntityUpdateDtoValidationData {
49
+ clientEntity: IClientEntity;
50
+ clientUserMappingEntities: IClientUserMappingEntity[];
51
+ clientIntroducingMappingEntities: IClientIntroducingMappingEntity[];
52
+ }
@@ -3,7 +3,9 @@ import { ProjectBillingTypeEnum, ProjectStatusEnum } from "../enums/project.enti
3
3
  import { ProjectUserStatusEnum } from "../enums/project_user_status.enum";
4
4
  import { UserRoleEnum } from "../enums/user.entity.enum";
5
5
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
6
+ import { IClientEntity } from "./client.entity.interface";
6
7
  import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
8
+ import { IUserEntity } from "./user.entity.interface";
7
9
  export interface IProjectEntity extends IAuditColumnEntity {
8
10
  id: number;
9
11
  name: string;
@@ -64,3 +66,11 @@ export interface IProjectUserMappingUpdateDto extends IEntityUpdateDto<IProjectU
64
66
  }
65
67
  export interface IProjectUserEntityFilterDto extends IEntityFilterData<IProjectUserMappingEntity> {
66
68
  }
69
+ export interface IProjectEntityUpdateDtoValidationData extends IProjectEntityCreateDtoValidationData {
70
+ projectEntity: IProjectEntity;
71
+ projectUserMappingEntities: IProjectUserMappingEntity[];
72
+ }
73
+ export interface IProjectEntityCreateDtoValidationData {
74
+ clientEntity: IClientEntity;
75
+ userEntities: IUserEntity[];
76
+ }
@@ -19,7 +19,9 @@ export interface ITimesheetEntityCreateDto extends Omit<IEntityCreateDto<ITimesh
19
19
  status?: TimesheetStatusEnum;
20
20
  }
21
21
  export interface ITimesheetEntityCreateDtoValidationData {
22
- projectUserMappingEntities: IProjectUserMappingEntity[];
22
+ projectUserMappingEntities: IProjectUserMappingEntity;
23
+ }
24
+ export interface ITimesheetEntityUpdateDtoValidationData extends ITimesheetEntityCreateDtoValidationData {
23
25
  }
24
26
  export interface IActionDataDto {
25
27
  action: TimesheetActionEnum;
@@ -16,14 +16,14 @@ export interface IUserEntity extends IAuditColumnEntity {
16
16
  country?: string;
17
17
  designation: string;
18
18
  panNo?: string;
19
- panDocumentUrl?: string;
19
+ panDocumentUrl?: string | null;
20
20
  aadharNo?: string;
21
- aadharDocumentUrl?: string;
21
+ aadharDocumentUrl?: string | null;
22
22
  role: UserRoleEnum;
23
23
  status?: UserStatusEnum;
24
- organizationId?: number;
25
- passportDocumentUrl?: string;
26
- academicQualificationDocumentUrl?: string;
24
+ organizationId: number;
25
+ passportDocumentUrl?: string | null;
26
+ academicQualificationDocumentUrl?: string | null;
27
27
  officeAllocation: number;
28
28
  tempAddress?: string;
29
29
  tempZipCode?: number;
@@ -40,3 +40,6 @@ export interface IUserEntity extends IAuditColumnEntity {
40
40
  export type IUserEntityFilterData = IEntityFilterData<IUserEntity>;
41
41
  export declare const charForPassword = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
42
42
  export declare const passwordLength = 12;
43
+ export interface IUserEntityUpdateDtoValidationData {
44
+ userEntity: IUserEntity;
45
+ }
@@ -6,5 +6,6 @@ export declare class DateCodeModel {
6
6
  getDate(): Date;
7
7
  static getRange(startDate: DateCodeModel, endDate: DateCodeModel): DateCodeModel[];
8
8
  static fromDate(date: Date): string;
9
+ getFormattedDate(): string;
9
10
  isWithinOffset(offsetInDays: number): boolean;
10
11
  }
@@ -46,6 +46,9 @@ class DateCodeModel {
46
46
  static fromDate(date) {
47
47
  return (0, date_fns_1.format)(date, "yyyyMMdd");
48
48
  }
49
+ getFormattedDate() {
50
+ return (0, date_fns_1.format)(this.getDate(), "dd-MM-yyyy");
51
+ }
49
52
  isWithinOffset(offsetInDays) {
50
53
  const todaysDateModel = new DateCodeModel(DateCodeModel.fromDate(new Date()));
51
54
  const onTimeDateModel = todaysDateModel.getByOffset(offsetInDays);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "8.3.0",
3
+ "version": "8.5.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [