law-common 14.0.1-beta.9 → 14.0.2

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.
Files changed (52) hide show
  1. package/dist/src/api/interface/bank.create.dto.interface.d.ts +2 -2
  2. package/dist/src/api/interface/bank.update.dto.interface.d.ts +1 -1
  3. package/dist/src/api/interface/billing.create.dto.interface.d.ts +1 -1
  4. package/dist/src/api/interface/billing.update.dto.interface.d.ts +2 -2
  5. package/dist/src/api/interface/billing_particular_line_item.create.dto.interface.d.ts +2 -2
  6. package/dist/src/api/interface/billing_timesheet.create.dto.interface.d.ts +2 -2
  7. package/dist/src/api/interface/billing_transaction.create.dto.interface.d.ts +2 -2
  8. package/dist/src/api/interface/client.create.dto.interface.d.ts +2 -2
  9. package/dist/src/api/interface/client.update.dto.interface.d.ts +3 -3
  10. package/dist/src/api/interface/client_affiliate.create.dto.interface.d.ts +2 -2
  11. package/dist/src/api/interface/client_affiliate.update.dto.interface.d.ts +3 -3
  12. package/dist/src/api/interface/configuration.create.dto.interface.d.ts +1 -1
  13. package/dist/src/api/interface/configuration.update.dto.interface.d.ts +2 -2
  14. package/dist/src/api/interface/country.create.dto.interface.d.ts +2 -2
  15. package/dist/src/api/interface/country.update.dto.interface.d.ts +3 -3
  16. package/dist/src/api/interface/cron_jobs.create.dto.interface.d.ts +1 -1
  17. package/dist/src/api/interface/cron_jobs.update.dto.interface.d.ts +1 -1
  18. package/dist/src/api/interface/holiday.create.dto.interface.d.ts +2 -2
  19. package/dist/src/api/interface/holiday.update.dto.interface.d.ts +2 -2
  20. package/dist/src/api/interface/holiday_list.create.dto.interface.d.ts +2 -2
  21. package/dist/src/api/interface/holiday_list.update.dto.interface.d.ts +2 -2
  22. package/dist/src/api/interface/intermediary_bank.create.dto.interface.d.ts +2 -2
  23. package/dist/src/api/interface/leave.create.dto.interface.d.ts +3 -3
  24. package/dist/src/api/interface/leave.update.dto.interface.d.ts +2 -2
  25. package/dist/src/api/interface/moving_timesheet.create.dto.interface.d.ts +2 -2
  26. package/dist/src/api/interface/moving_timesheet.update.dto.interface.d.ts +2 -2
  27. package/dist/src/api/interface/office_location.create.dto.interface.d.ts +2 -2
  28. package/dist/src/api/interface/office_location.update.dto.interface.d.ts +2 -2
  29. package/dist/src/api/interface/project.create.dto.interface.d.ts +3 -5
  30. package/dist/src/api/interface/project.update.dto.interface.d.ts +3 -3
  31. package/dist/src/api/interface/project_revenue_split.create.dto.interface.d.ts +1 -1
  32. package/dist/src/api/interface/reimbursement.create.dto.interface.d.ts +3 -3
  33. package/dist/src/api/interface/reimbursement.update.dto.interface.d.ts +1 -1
  34. package/dist/src/api/interface/reimbursement_expense.create.dto.interface.d.ts +3 -3
  35. package/dist/src/api/interface/reimbursement_expense.update.dto.interface.d.ts +2 -2
  36. package/dist/src/api/interface/role_permission_mapping.create.dto.interface.d.ts +1 -1
  37. package/dist/src/api/interface/role_permission_mapping.delete.dto.interface.d.ts +2 -2
  38. package/dist/src/api/interface/timesheet.create.dto.interface.d.ts +3 -3
  39. package/dist/src/api/interface/timesheet.entity.response.interface.d.ts +2 -2
  40. package/dist/src/api/interface/timesheet.update.dto.interface.d.ts +5 -5
  41. package/dist/src/api/interface/to_do_list.create.dto.interface.d.ts +2 -2
  42. package/dist/src/api/interface/to_do_list.update.dto.interface.d.ts +3 -3
  43. package/dist/src/entities/model/billing.entity.model.d.ts +2 -0
  44. package/dist/src/entities/model/billing.entity.model.js +6 -0
  45. package/dist/src/entities/model/designation.entity.model.d.ts +3 -0
  46. package/dist/src/entities/model/designation.entity.model.js +18 -0
  47. package/dist/src/entities/model/timesheet.entity.model.d.ts +3 -2
  48. package/dist/src/entities/model/timesheet.entity.model.js +5 -0
  49. package/dist/src/enums/error.key.enum.d.ts +2 -1
  50. package/dist/src/enums/error.key.enum.js +1 -0
  51. package/dist/src/model/entities/interface/timesheet.model.interface.d.ts +1 -1
  52. package/package.json +3 -2
@@ -1,7 +1,7 @@
1
1
  import { BankStatusEnum, IBankEntity, IEntityCreateDto } from "../../entities";
2
2
  import { IIntermediaryBankCreateDto } from "./intermediary_bank.create.dto.interface";
3
- export interface IBankCreateDto extends Omit<IEntityCreateDto<IBankEntity>, IBankExclude> {
3
+ export interface IBankCreateDto extends Omit<IEntityCreateDto<IBankEntity>, IBankCreateExclude> {
4
4
  status?: BankStatusEnum;
5
5
  intermediaryBankDetails?: IIntermediaryBankCreateDto[];
6
6
  }
7
- export type IBankExclude = "status";
7
+ export type IBankCreateExclude = "status";
@@ -4,7 +4,7 @@ export interface IBankActionDataDto {
4
4
  action: BankActionEnum;
5
5
  remark?: string;
6
6
  }
7
- export interface IBankEntityUpdateDtoValidationData {
7
+ export interface IBankUpdateDtoValidationData {
8
8
  bankEntity: IBankEntity;
9
9
  }
10
10
  export interface IBankUpdateDto extends IEntityUpdateDto<IBankEntity> {
@@ -44,7 +44,7 @@ export interface IBillingTimesheetsDto {
44
44
  updateDetails: IBillingTimesheetUpdateDeleteDetailDto[];
45
45
  deleteDetails: IBillingTimesheetUpdateDeleteDetailDto[];
46
46
  }
47
- export interface IBillingEntityCreateDtoValidationData {
47
+ export interface IBillingCreateDtoValidationData {
48
48
  projectEntity: IProjectEntity;
49
49
  billingTimesheetEntities: IBillingTimesheetEntity[];
50
50
  timesheetEntities: ITimesheetEntity[];
@@ -1,5 +1,5 @@
1
1
  import { BillingActionsEnum, IBillingEntity, IBillingProfileEntity, IEntityUpdateDto } from "../../entities";
2
- import { IBillingEntityCreateDtoValidationData, IBillingParticulars } from "./billing.create.dto.interface";
2
+ import { IBillingCreateDtoValidationData, IBillingParticulars } from "./billing.create.dto.interface";
3
3
  import { IBillingParticularLineItemUpdateDto } from "./billing_particular_line_item.update.dto.interface";
4
4
  import { IBillingReimbursementExpenseUpdateDto } from "./billing_reimbursement_expense.update.dto.interface";
5
5
  import { IBillingTimesheetUpdateDto } from "./billing_timesheet.update.dto.interface";
@@ -13,7 +13,7 @@ export interface IUpdateBillingDto extends Omit<IBillingUpdateDto, "particulars"
13
13
  particulars?: IBillingParticulars;
14
14
  billingParticularLineItems?: IBillingParticularLineItemUpdateDto[];
15
15
  }
16
- export interface IBillingUpdateDtoValidationData extends IBillingEntityCreateDtoValidationData {
16
+ export interface IBillingUpdateDtoValidationData extends IBillingCreateDtoValidationData {
17
17
  billingEntity: IBillingEntity;
18
18
  billingProfileEntity: IBillingProfileEntity;
19
19
  }
@@ -1,4 +1,4 @@
1
1
  import { IBillingParticularLineItemEntity, IEntityCreateDto } from "../../entities";
2
- export type IBillingParticularsLineItemsExclude = "billingId";
3
- export interface IBillingParticularLineItemCreateDto extends Omit<IEntityCreateDto<IBillingParticularLineItemEntity>, IBillingParticularsLineItemsExclude> {
2
+ export type IBillingParticularLineItemCreateExclude = "billingId";
3
+ export interface IBillingParticularLineItemCreateDto extends Omit<IEntityCreateDto<IBillingParticularLineItemEntity>, IBillingParticularLineItemCreateExclude> {
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import { IBillingTimesheetEntity, IEntityCreateDto, ITimesheetEntity } from "../../entities";
2
- export interface IBillingTimesheetEntityCreateDto extends IEntityCreateDto<IBillingTimesheetEntity> {
2
+ export interface IBillingTimesheetCreateDto extends IEntityCreateDto<IBillingTimesheetEntity> {
3
3
  }
4
- export interface IBillingTimesheetEntityCreateDtoValidationResult {
4
+ export interface IBillingTimesheetCreateDtoValidationData {
5
5
  billingTimesheetEntities: IBillingTimesheetEntity[];
6
6
  timesheetEntities: ITimesheetEntity[];
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { BillingTransactionStatusEnum, IBillingEntity, IBillingTransactionEntity, IEntityCreateDto } from "../../entities";
2
- export type IBillingTransactionExclude = "status";
3
- export interface IBillingTransactionCreateDto extends Omit<IEntityCreateDto<IBillingTransactionEntity>, IBillingTransactionExclude> {
2
+ export type IBillingTransactionCreateExclude = "status";
3
+ export interface IBillingTransactionCreateDto extends Omit<IEntityCreateDto<IBillingTransactionEntity>, IBillingTransactionCreateExclude> {
4
4
  status?: BillingTransactionStatusEnum;
5
5
  }
6
6
  export interface IBillingTransactionCreateDtoValidationData {
@@ -1,6 +1,6 @@
1
1
  import { IClientEntity, IClientEntityDependent, IEntityCreateDto } from "../../entities";
2
2
  import { IAppFileConfig } from "../../misc";
3
- export type IClientExclude = "panDocument" | "gstDocument" | "tanDocument" | "organizationId" | "status";
4
- export interface IClientEntityCreateDto extends Omit<IEntityCreateDto<IClientEntity>, IClientExclude>, IClientEntityDependent {
3
+ export type IClientCreateExclude = "panDocument" | "gstDocument" | "tanDocument" | "organizationId" | "status";
4
+ export interface IClientCreateDto extends Omit<IEntityCreateDto<IClientEntity>, IClientCreateExclude>, IClientEntityDependent {
5
5
  }
6
6
  export declare const clientDocumentFileUploadConfig: IAppFileConfig[];
@@ -1,10 +1,10 @@
1
1
  import { EntityEnum, EnumEntityType, IClientEntity, IClientEntityDependent, IClientIntroducingMappingEntity, IClientUserMappingEntity, IEntityUpdateDto } from "../../entities";
2
2
  import { IDeleteDocumentDetails } from "../../misc";
3
- import { IClientExclude } from "./client.create.dto.interface";
4
- export interface IClientEntityUpdateDto extends Omit<IEntityUpdateDto<IClientEntity>, IClientExclude>, Partial<IClientEntityDependent> {
3
+ import { IClientCreateExclude } from "./client.create.dto.interface";
4
+ export interface IClientUpdateDto extends Omit<IEntityUpdateDto<IClientEntity>, IClientCreateExclude>, Partial<IClientEntityDependent> {
5
5
  deleteDocumentDetails?: IDeleteDocumentDetails<EnumEntityType<EntityEnum.CLIENT>>;
6
6
  }
7
- export interface IClientEntityUpdateDtoValidationData {
7
+ export interface IClientUpdateDtoValidationData {
8
8
  clientEntity: IClientEntity;
9
9
  clientUserMappingEntities: IClientUserMappingEntity[];
10
10
  clientIntroducingMappingEntities: IClientIntroducingMappingEntity[];
@@ -1,6 +1,6 @@
1
1
  import { IClientAffiliateEntity, IEntityCreateDto } from "../../entities";
2
2
  import { IAppFileConfig } from "../../misc";
3
- export type IClientAffiliateExclude = "panDocument" | "gstDocument" | "tanDocument" | "status";
4
- export interface IClientAffiliateCreateDto extends Omit<IEntityCreateDto<IClientAffiliateEntity>, IClientAffiliateExclude> {
3
+ export type IClientAffiliateCreateExclude = "panDocument" | "gstDocument" | "tanDocument" | "status";
4
+ export interface IClientAffiliateCreateDto extends Omit<IEntityCreateDto<IClientAffiliateEntity>, IClientAffiliateCreateExclude> {
5
5
  }
6
6
  export declare const clientAffiliateDocumentFileUploadConfig: IAppFileConfig[];
@@ -1,9 +1,9 @@
1
1
  import { EntityEnum, EnumEntityType, IClientAffiliateEntity, IEntityUpdateDto } from "../../entities";
2
2
  import { IDeleteDocumentDetails } from "../../misc";
3
- import { IClientAffiliateExclude } from "./client_affiliate.create.dto.interface";
4
- export interface IClientAffiliateUpdateDto extends Omit<IEntityUpdateDto<IClientAffiliateEntity>, IClientAffiliateExclude> {
3
+ import { IClientAffiliateCreateExclude } from "./client_affiliate.create.dto.interface";
4
+ export interface IClientAffiliateUpdateDto extends Omit<IEntityUpdateDto<IClientAffiliateEntity>, IClientAffiliateCreateExclude> {
5
5
  deleteDocumentDetails?: IDeleteDocumentDetails<EnumEntityType<EntityEnum.CLIENT_AFFILIATE>>;
6
6
  }
7
- export interface IClientAffiliateEntityUpdateDtoValidationData {
7
+ export interface IClientAffiliateUpdateDtoValidationData {
8
8
  clientAffiliateEntity: IClientAffiliateEntity;
9
9
  }
@@ -1,4 +1,4 @@
1
1
  import { IEntityCreateDto } from "../../entities";
2
2
  import { IConfigurationEntity, IConfigurationExclude } from "../../entities/interface/configuration.entity.interface";
3
- export interface IConfigurationEntityCreateDto extends Omit<IEntityCreateDto<IConfigurationEntity>, IConfigurationExclude> {
3
+ export interface IConfigurationCreateDto extends Omit<IEntityCreateDto<IConfigurationEntity>, IConfigurationExclude> {
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import { IEntityUpdateDto } from "../../entities";
2
2
  import { IConfigurationEntity } from "../../entities/interface/configuration.entity.interface";
3
- export interface IConfigurationEntityBulkUpdateDto extends IEntityUpdateDto<IConfigurationEntity> {
3
+ export interface IConfigurationUpdateDto extends IEntityUpdateDto<IConfigurationEntity> {
4
4
  }
5
- export interface IConfigurationEntityUpdateDtoValidationData {
5
+ export interface IConfigurationUpdateDtoValidationData {
6
6
  configurationEntity: IConfigurationEntity;
7
7
  }
@@ -1,4 +1,4 @@
1
1
  import { IEntityCreateDto, ICountryEntity } from "../../entities";
2
- export type ICountryCreateDtoExclude = "status";
3
- export interface ICountryCreateDto extends Omit<IEntityCreateDto<ICountryEntity>, ICountryCreateDtoExclude> {
2
+ export type ICountryCreateExclude = "status";
3
+ export interface ICountryCreateDto extends Omit<IEntityCreateDto<ICountryEntity>, ICountryCreateExclude> {
4
4
  }
@@ -1,9 +1,9 @@
1
1
  import { CountryActionEnum } from "../../entities";
2
2
  import { DeepPartialButRequired } from "./api.utils.interface";
3
- import { ICountryCreateDto, ICountryCreateDtoExclude } from "./country.create.dto.interface";
4
- export type ICountryEntityUpdateDto = Omit<DeepPartialButRequired<ICountryCreateDto, never> & {
3
+ import { ICountryCreateDto, ICountryCreateExclude } from "./country.create.dto.interface";
4
+ export type ICountryUpdateDto = Omit<DeepPartialButRequired<ICountryCreateDto, never> & {
5
5
  actionData: ICountryActionDataDto;
6
- }, ICountryCreateDtoExclude>;
6
+ }, ICountryCreateExclude>;
7
7
  export interface ICountryActionDataDto {
8
8
  action: CountryActionEnum;
9
9
  remark?: string;
@@ -1,4 +1,4 @@
1
1
  import { IEntityCreateDto } from "../../entities";
2
2
  import { ICronJobsEntity } from "../../entities/interface/cron_jobs.entity.interface";
3
- export interface ICronJobCreateDto extends IEntityCreateDto<ICronJobsEntity> {
3
+ export interface ICronJobsCreateDto extends IEntityCreateDto<ICronJobsEntity> {
4
4
  }
@@ -1,4 +1,4 @@
1
1
  import { IEntityUpdateDto } from "../../entities";
2
2
  import { ICronJobsEntity } from "../../entities/interface/cron_jobs.entity.interface";
3
- export interface ICronJobUpdateDto extends IEntityUpdateDto<ICronJobsEntity> {
3
+ export interface ICronJobsUpdateDto extends IEntityUpdateDto<ICronJobsEntity> {
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import { IEntityCreateDto } from "../../entities";
2
2
  import { IHolidayEntity } from "../../entities/interface/holiday.entity.interface";
3
3
  /** status is set by the entity flow, never by the client */
4
- export type IHolidayExclude = "status";
5
- export interface IHolidayCreateDto extends Omit<IEntityCreateDto<IHolidayEntity>, IHolidayExclude> {
4
+ export type IHolidayCreateExclude = "status";
5
+ export interface IHolidayCreateDto extends Omit<IEntityCreateDto<IHolidayEntity>, IHolidayCreateExclude> {
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { IEntityUpdateDto } from "../../entities";
2
2
  import { IHolidayEntity } from "../../entities/interface/holiday.entity.interface";
3
- import { IHolidayExclude } from "./holiday.create.dto.interface";
4
- export interface IHolidayUpdateDto extends Omit<IEntityUpdateDto<IHolidayEntity>, IHolidayExclude> {
3
+ import { IHolidayCreateExclude } from "./holiday.create.dto.interface";
4
+ export interface IHolidayUpdateDto extends Omit<IEntityUpdateDto<IHolidayEntity>, IHolidayCreateExclude> {
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { IEntityCreateDto } from "../../entities";
2
2
  import { IHolidayListEntity } from "../../entities/interface/holiday_list.entity.interface";
3
3
  /** status is set by the entity flow, never by the client */
4
- export type IHolidayListExclude = "status";
5
- export interface IHolidayListCreateDto extends Omit<IEntityCreateDto<IHolidayListEntity>, IHolidayListExclude> {
4
+ export type IHolidayListCreateExclude = "status";
5
+ export interface IHolidayListCreateDto extends Omit<IEntityCreateDto<IHolidayListEntity>, IHolidayListCreateExclude> {
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { IEntityUpdateDto } from "../../entities";
2
2
  import { IHolidayListEntity } from "../../entities/interface/holiday_list.entity.interface";
3
- import { IHolidayListExclude } from "./holiday_list.create.dto.interface";
4
- export interface IHolidayListUpdateDto extends Omit<IEntityUpdateDto<IHolidayListEntity>, IHolidayListExclude> {
3
+ import { IHolidayListCreateExclude } from "./holiday_list.create.dto.interface";
4
+ export interface IHolidayListUpdateDto extends Omit<IEntityUpdateDto<IHolidayListEntity>, IHolidayListCreateExclude> {
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { IEntityCreateDto, IIntermediaryBankEntity } from "../../entities";
2
2
  /** status is set by the entity flow, never by the client */
3
- export type IIntermediaryBankCreateDtoExclude = "bankId" | "status";
4
- export interface IIntermediaryBankCreateDto extends Omit<IEntityCreateDto<IIntermediaryBankEntity>, IIntermediaryBankCreateDtoExclude> {
3
+ export type IIntermediaryBankCreateExclude = "bankId" | "status";
4
+ export interface IIntermediaryBankCreateDto extends Omit<IEntityCreateDto<IIntermediaryBankEntity>, IIntermediaryBankCreateExclude> {
5
5
  bankId?: number;
6
6
  }
@@ -3,10 +3,10 @@ export interface ILeaveDtoInclude {
3
3
  fromType: DurationTypeEnum;
4
4
  toType?: DurationTypeEnum;
5
5
  }
6
- export type ILeaveExclude = "status";
7
- export interface ILeaveCreateDto extends Omit<IEntityCreateDto<ILeaveEntity>, ILeaveExclude>, ILeaveDtoInclude {
6
+ export type ILeaveCreateExclude = "status";
7
+ export interface ILeaveCreateDto extends Omit<IEntityCreateDto<ILeaveEntity>, ILeaveCreateExclude>, ILeaveDtoInclude {
8
8
  status?: LeaveStatusEnum;
9
9
  }
10
- export interface ILeaveEntityCreateDtoValidationData {
10
+ export interface ILeaveCreateDtoValidationData {
11
11
  userEntity: IUserEntity;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import { IEntityUpdateDto, ILeaveEntity, LeaveActionEnum } from "../../entities";
2
- import { ILeaveDtoInclude, ILeaveEntityCreateDtoValidationData } from "./leave.create.dto.interface";
2
+ import { ILeaveDtoInclude, ILeaveCreateDtoValidationData } from "./leave.create.dto.interface";
3
3
  export interface ILeaveActionDataDto {
4
4
  action: LeaveActionEnum;
5
5
  remark?: string;
@@ -7,6 +7,6 @@ export interface ILeaveActionDataDto {
7
7
  export interface ILeaveUpdateDto extends IEntityUpdateDto<ILeaveEntity>, Partial<ILeaveDtoInclude> {
8
8
  actionData?: ILeaveActionDataDto;
9
9
  }
10
- export interface ILeaveEntityUpdateDtoValidationData extends ILeaveEntityCreateDtoValidationData {
10
+ export interface ILeaveUpdateDtoValidationData extends ILeaveCreateDtoValidationData {
11
11
  leaveEntity: ILeaveEntity;
12
12
  }
@@ -1,6 +1,6 @@
1
1
  import { IEntityCreateDto, IMovingTimesheetEntity } from "../../entities";
2
2
  import { MovingTimesheetStatusEnum } from "../../entities/enums/moving_timesheet_status_enum";
3
- export type IMovingTimesheetDtoExclude = "status" | "sourceProjectId";
4
- export interface IMovingTimesheetCreateDto extends Omit<IEntityCreateDto<IMovingTimesheetEntity>, IMovingTimesheetDtoExclude> {
3
+ export type IMovingTimesheetCreateExclude = "status" | "sourceProjectId";
4
+ export interface IMovingTimesheetCreateDto extends Omit<IEntityCreateDto<IMovingTimesheetEntity>, IMovingTimesheetCreateExclude> {
5
5
  status?: MovingTimesheetStatusEnum;
6
6
  }
@@ -1,8 +1,8 @@
1
1
  import { IEntityUpdateDto, IMovingTimesheetEntity, MovingTimesheetActionEnum } from "../../entities";
2
- import { IMovingTimesheetDtoExclude } from "./moving_timesheet.create.dto.interface";
2
+ import { IMovingTimesheetCreateExclude } from "./moving_timesheet.create.dto.interface";
3
3
  export interface IMovingTimesheetActionDataDto {
4
4
  action: MovingTimesheetActionEnum;
5
5
  }
6
- export interface IMovingTimesheetUpdateDto extends Omit<IEntityUpdateDto<IMovingTimesheetEntity>, IMovingTimesheetDtoExclude> {
6
+ export interface IMovingTimesheetUpdateDto extends Omit<IEntityUpdateDto<IMovingTimesheetEntity>, IMovingTimesheetCreateExclude> {
7
7
  actionData?: IMovingTimesheetActionDataDto;
8
8
  }
@@ -1,5 +1,5 @@
1
1
  import { IEntityCreateDto, IOfficeLocationEntity } from "../../entities";
2
2
  /** status is set by the entity flow, never by the client */
3
- export type IOfficeLocationExclude = "status";
4
- export interface IOfficeLocationCreateDto extends Omit<IEntityCreateDto<IOfficeLocationEntity>, IOfficeLocationExclude> {
3
+ export type IOfficeLocationCreateExclude = "status";
4
+ export interface IOfficeLocationCreateDto extends Omit<IEntityCreateDto<IOfficeLocationEntity>, IOfficeLocationCreateExclude> {
5
5
  }
@@ -1,4 +1,4 @@
1
1
  import { IEntityUpdateDto, IOfficeLocationEntity } from "../../entities";
2
- import { IOfficeLocationExclude } from "./office_location.create.dto.interface";
3
- export interface IOfficeLocationUpdateDto extends Omit<IEntityUpdateDto<IOfficeLocationEntity>, IOfficeLocationExclude> {
2
+ import { IOfficeLocationCreateExclude } from "./office_location.create.dto.interface";
3
+ export interface IOfficeLocationUpdateDto extends Omit<IEntityUpdateDto<IOfficeLocationEntity>, IOfficeLocationCreateExclude> {
4
4
  }
@@ -10,9 +10,7 @@ export interface IProjectEntityDependent {
10
10
  users: IProjectUserDto[];
11
11
  revenueSplitData: IProjectRevenueSplitData[];
12
12
  }
13
- export type IProjectExclude = "organizationId" | "billingRate" | "usageNotificationSentPercentage";
14
- export interface IProjectExcludeT extends Pick<IProjectEntity, IProjectExclude> {
15
- }
13
+ export type IProjectCreateExclude = "organizationId" | "billingRate" | "usageNotificationSentPercentage";
16
14
  export interface IProjectHourlyRate {
17
15
  id: number;
18
16
  rate: number;
@@ -32,9 +30,9 @@ export interface IProjectAdhocRate {
32
30
  export interface IProjectCreateDtoExtra {
33
31
  projectBillingRate: IProjectHourlyRate[] | IProjectFixedTypeRate | IProjectAdhocRate;
34
32
  }
35
- export interface IProjectEntityCreateDto extends Omit<IEntityCreateDto<IProjectEntity>, IProjectExclude>, IProjectEntityDependent, IProjectCreateDtoExtra {
33
+ export interface IProjectCreateDto extends Omit<IEntityCreateDto<IProjectEntity>, IProjectCreateExclude>, IProjectEntityDependent, IProjectCreateDtoExtra {
36
34
  }
37
- export interface IProjectEntityCreateDtoValidationData {
35
+ export interface IProjectCreateDtoValidationData {
38
36
  clientEntity: IClientEntity;
39
37
  userEntities: IUserEntity[];
40
38
  }
@@ -1,8 +1,8 @@
1
1
  import { IEntityUpdateDto, IProjectEntity, IProjectRevenueSplitMappingEntity, IProjectUserMappingEntity } from "../../entities";
2
- import { IProjectCreateDtoExtra, IProjectEntityCreateDtoValidationData, IProjectEntityDependent, IProjectExclude } from "./project.create.dto.interface";
3
- export interface IProjectEntityUpdateDto extends Omit<IEntityUpdateDto<IProjectEntity>, IProjectExclude>, Partial<IProjectEntityDependent>, Partial<IProjectCreateDtoExtra> {
2
+ import { IProjectCreateDtoExtra, IProjectCreateDtoValidationData, IProjectEntityDependent, IProjectCreateExclude } from "./project.create.dto.interface";
3
+ export interface IProjectUpdateDto extends Omit<IEntityUpdateDto<IProjectEntity>, IProjectCreateExclude>, Partial<IProjectEntityDependent>, Partial<IProjectCreateDtoExtra> {
4
4
  }
5
- export interface IProjectEntityUpdateDtoValidationData extends IProjectEntityCreateDtoValidationData {
5
+ export interface IProjectUpdateDtoValidationData extends IProjectCreateDtoValidationData {
6
6
  projectEntity: IProjectEntity;
7
7
  projectUserMappingEntities: IProjectUserMappingEntity[];
8
8
  projectRevenueSplitMappingEntities: IProjectRevenueSplitMappingEntity[];
@@ -1,5 +1,5 @@
1
1
  import { EntityEnum, EnumEntityType, IEntityCreateDto } from "../../entities";
2
- export interface IProjectRevenueSplitMappingCreateDto extends IEntityCreateDto<EnumEntityType<EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING>> {
2
+ export interface IProjectRevenueSplitCreateDto extends IEntityCreateDto<EnumEntityType<EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING>> {
3
3
  }
4
4
  export interface IProjectRevenueSplitData {
5
5
  userId: number;
@@ -1,12 +1,12 @@
1
1
  import { IEntityCreateDto, IProjectUserMappingEntity, IReimbursementEntity, IReimbursementExpenseAllocation, IUserEntity } from "../../entities";
2
- export type IReimbursementExclude = "billingType" | "attachmentUrlsCsv" | "amountReimbursed" | "processedBy" | "processedDate";
2
+ export type IReimbursementCreateExclude = "billingType" | "attachmentUrlsCsv" | "amountReimbursed" | "processedBy" | "processedDate";
3
3
  export interface IReimbursementCreateDtoExtra {
4
4
  expenseDetails: IReimbursementExpenseAllocation[];
5
5
  attachmentDocumentUrls?: string[];
6
6
  }
7
- export interface IReimbursementEntityCreateDto extends Omit<IEntityCreateDto<IReimbursementEntity>, IReimbursementExclude>, IReimbursementCreateDtoExtra {
7
+ export interface IReimbursementCreateDto extends Omit<IEntityCreateDto<IReimbursementEntity>, IReimbursementCreateExclude>, IReimbursementCreateDtoExtra {
8
8
  }
9
- export interface IReimbursementEntityCreateDtoValidationData {
9
+ export interface IReimbursementCreateDtoValidationData {
10
10
  incurredByUser: IUserEntity;
11
11
  projectUserMappingEntities: IProjectUserMappingEntity[];
12
12
  }
@@ -7,6 +7,6 @@ export interface IReimbursementUpdateDto extends IEntityUpdateDto<IReimbursement
7
7
  expenseDetails?: IReimbursementExpenseAllocation[];
8
8
  actionData?: IReimbursementActionDataDto;
9
9
  }
10
- export interface IReimbursementEntityUpdateDtoValidationData {
10
+ export interface IReimbursementUpdateDtoValidationData {
11
11
  projectUserMappingEntities: IProjectUserMappingEntity[];
12
12
  }
@@ -1,10 +1,10 @@
1
1
  import { IEntityCreateDto, IProjectUserMappingEntity, IReimbursementExpenseEntity, ReimbursementExpenseState } from "../../entities";
2
- export type IReimbursementExpenseExclude = "state";
3
- export interface IReimbursementExpenseEntityCreateDto extends Omit<IEntityCreateDto<IReimbursementExpenseEntity>, IReimbursementExpenseExclude> {
2
+ export type IReimbursementExpenseCreateExclude = "state";
3
+ export interface IReimbursementExpenseCreateDto extends Omit<IEntityCreateDto<IReimbursementExpenseEntity>, IReimbursementExpenseCreateExclude> {
4
4
  id?: number;
5
5
  state?: ReimbursementExpenseState;
6
6
  billingId?: number;
7
7
  }
8
- export interface IReimbursementExpenseEntityCreateDtoValidationData {
8
+ export interface IReimbursementExpenseCreateDtoValidationData {
9
9
  projectUserMappingEntities: IProjectUserMappingEntity[];
10
10
  }
@@ -1,9 +1,9 @@
1
1
  import { IEntityUpdateDto, IProjectUserMappingEntity, IReimbursementExpenseEntity, ReimbursementExpenseActionEnum } from "../../entities";
2
- export interface IReimbursementExpenseEntityUpdateDto extends IEntityUpdateDto<IReimbursementExpenseEntity> {
2
+ export interface IReimbursementExpenseUpdateDto extends IEntityUpdateDto<IReimbursementExpenseEntity> {
3
3
  id?: number;
4
4
  action?: ReimbursementExpenseActionEnum;
5
5
  billingId?: number;
6
6
  }
7
- export interface IReimbursementExpenseEntityUpdateDtoValidationData {
7
+ export interface IReimbursementExpenseUpdateDtoValidationData {
8
8
  projectUserMappingEntities: IProjectUserMappingEntity[];
9
9
  }
@@ -1,4 +1,4 @@
1
- export interface IRolePermissionsMappingCreateDto {
1
+ export interface IRolePermissionMappingCreateDto {
2
2
  permissions: {
3
3
  [permissionName: string]: string[];
4
4
  };
@@ -1,3 +1,3 @@
1
- import { IRolePermissionsMappingCreateDto } from "./role_permission_mapping.create.dto.interface";
2
- export interface IRolePermissionMappingDeleteDto extends IRolePermissionsMappingCreateDto {
1
+ import { IRolePermissionMappingCreateDto } from "./role_permission_mapping.create.dto.interface";
2
+ export interface IRolePermissionMappingDeleteDto extends IRolePermissionMappingCreateDto {
3
3
  }
@@ -1,10 +1,10 @@
1
1
  import { IEntityCreateDto, ITimesheetEntity, IUserEntity, ProjectUserMappingEntityModel, TimesheetClassificationStatusEnum, TimesheetEntityModel, TimesheetStatusEnum } from "../../entities";
2
- export type ITimesheetEntityExclude = "status" | "billedDuration" | "notBilledDuration" | "classificationStatus" | "classifiedBy";
3
- export interface ITimesheetEntityCreateDto extends Omit<IEntityCreateDto<ITimesheetEntity>, ITimesheetEntityExclude> {
2
+ export type ITimesheetCreateExclude = "status" | "billedDuration" | "notBilledDuration" | "classificationStatus" | "classifiedBy";
3
+ export interface ITimesheetCreateDto extends Omit<IEntityCreateDto<ITimesheetEntity>, ITimesheetCreateExclude> {
4
4
  status?: TimesheetStatusEnum;
5
5
  classificationStatus?: TimesheetClassificationStatusEnum;
6
6
  }
7
- export interface ITimesheetEntityCreateDtoValidationData {
7
+ export interface ITimesheetCreateDtoValidationData {
8
8
  projectUserMappingEntities: ProjectUserMappingEntityModel[];
9
9
  userEntity: IUserEntity;
10
10
  existingTimesheet: TimesheetEntityModel;
@@ -1,7 +1,7 @@
1
1
  import { FlowConfig, IProjectUserMappingEntity, ITimesheetEntity, IUserEntity, TimesheetActionEnum, TimesheetEntityModel, TimesheetStatusEnum } from "../../entities";
2
2
  import { IClientApiEntityDependent } from "./client.entity.response";
3
3
  import { IProjectApiEntityDependent } from "./project.entity.response";
4
- import { ITimesheetEntityUpdateDto } from "./timesheet.update.dto.interface";
4
+ import { ITimesheetUpdateDto } from "./timesheet.update.dto.interface";
5
5
  export type ITimesheetEntityGet = {
6
6
  timesheets: ITimesheetEntity[];
7
7
  clients: {
@@ -24,6 +24,6 @@ export type ITimesheetFlowContextData = {
24
24
  currentTimesheet?: TimesheetEntityModel;
25
25
  projectUserMapping?: IProjectUserMappingEntity;
26
26
  buffer?: number;
27
- dto?: ITimesheetEntityUpdateDto;
27
+ dto?: ITimesheetUpdateDto;
28
28
  timesheetEnterThresholdValue?: number;
29
29
  };
@@ -1,11 +1,11 @@
1
1
  import { IEntityUpdateDto, ITimesheetEntity, TimesheetActionEnum } from "../../entities";
2
- import { ITimesheetEntityCreateDtoValidationData } from "./timesheet.create.dto.interface";
3
- export interface IActionDataDto {
2
+ import { ITimesheetCreateDtoValidationData } from "./timesheet.create.dto.interface";
3
+ export interface ITimesheetActionDataDto {
4
4
  action: TimesheetActionEnum;
5
5
  remark?: string;
6
6
  }
7
- export interface ITimesheetEntityUpdateDto extends IEntityUpdateDto<ITimesheetEntity> {
8
- actionData?: IActionDataDto;
7
+ export interface ITimesheetUpdateDto extends IEntityUpdateDto<ITimesheetEntity> {
8
+ actionData?: ITimesheetActionDataDto;
9
9
  }
10
- export interface ITimesheetEntityUpdateDtoValidationData extends ITimesheetEntityCreateDtoValidationData {
10
+ export interface ITimesheetUpdateDtoValidationData extends ITimesheetCreateDtoValidationData {
11
11
  }
@@ -1,5 +1,5 @@
1
1
  import { IEntityCreateDto, IToDoListEntity } from "../../entities";
2
2
  /** status is set by the entity flow, never by the client */
3
- export type IToDoListExclude = "status";
4
- export interface IToDoListCreateDto extends Omit<IEntityCreateDto<IToDoListEntity>, IToDoListExclude> {
3
+ export type IToDoListCreateExclude = "status";
4
+ export interface IToDoListCreateDto extends Omit<IEntityCreateDto<IToDoListEntity>, IToDoListCreateExclude> {
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import { IEntityUpdateDto, IToDoListEntity } from "../../entities";
2
- import { IToDoListExclude } from "./to_do_list.create.dto.interface";
3
- export interface IToDoListUpdateDto extends Omit<IEntityUpdateDto<IToDoListEntity>, IToDoListExclude> {
2
+ import { IToDoListCreateExclude } from "./to_do_list.create.dto.interface";
3
+ export interface IToDoListUpdateDto extends Omit<IEntityUpdateDto<IToDoListEntity>, IToDoListCreateExclude> {
4
4
  }
5
- export interface IToDoListEntityUpdateDtoValidationData {
5
+ export interface IToDoListUpdateDtoValidationData {
6
6
  toDoListEntity: IToDoListEntity;
7
7
  }
@@ -23,6 +23,7 @@ import { BillingReimbursementExpenseEntityModel } from "./billing_reimbursement_
23
23
  import { BillingTimesheetEntityModel } from "./billing_timesheet.entity.model";
24
24
  import { BillingTransactionEntityModel } from "./billing_transaction.entity.model";
25
25
  import { ClientEntityModel } from "./client.entity.model";
26
+ import { DesignationEntityModel } from "./designation.entity.model";
26
27
  import { IAdvanceBillingTransactionsSummary } from "./interface/billing.model.interface";
27
28
  import { ProjectEntityModel } from "./project.entity.model";
28
29
  import { ReimbursementEntityModel } from "./reimbursement.entity.model";
@@ -151,6 +152,7 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
151
152
  static getBillingWithHighestInvoiceSequence(billings: IBillingEntity[]): IBillingEntity | undefined;
152
153
  static getInvoiceSequence(invoiceNumber: Nullable<string>): number;
153
154
  getBillingTimesheetUserIds(): number[];
155
+ getUserIdsSortedByDesignationOrder(resourceEntities: UserEntityModel[], designationEntities?: DesignationEntityModel[]): number[];
154
156
  getTimestamp(): string;
155
157
  summarryFolderName(timestamp: string): string;
156
158
  invoiceFileName(timestamp: string): string;
@@ -23,6 +23,7 @@ const payment_status_enum_1 = require("../enums/payment_status_enum");
23
23
  const relation_type_enum_1 = require("../enums/relation_type_enum");
24
24
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
25
25
  const base_entity_model_1 = require("./base.entity.model");
26
+ const designation_entity_model_1 = require("./designation.entity.model");
26
27
  class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
27
28
  constructor() {
28
29
  super(...arguments);
@@ -455,6 +456,11 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
455
456
  var _a, _b;
456
457
  return (_b = (_a = this.billingTimesheets) === null || _a === void 0 ? void 0 : _a.map((timesheet) => timesheet.userId)) !== null && _b !== void 0 ? _b : [];
457
458
  }
459
+ getUserIdsSortedByDesignationOrder(resourceEntities, designationEntities) {
460
+ const orderedResources = [...resourceEntities];
461
+ designation_entity_model_1.DesignationEntityModel.sortByDesignationPriority(orderedResources, designationEntities);
462
+ return orderedResources.map((resource) => resource.id);
463
+ }
458
464
  getTimestamp() {
459
465
  const now = new Date();
460
466
  const ist = new Date(now.getTime() + 5.5 * 60 * 60 * 1000);
@@ -41,5 +41,8 @@ export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.D
41
41
  };
42
42
  isUserAssignedToDesignation(): boolean;
43
43
  static getByUserAssignedToDesignation(designationEntityModels: DesignationEntityModel[]): DesignationEntityModel[];
44
+ static sortByDesignationPriority<T extends {
45
+ designation: string;
46
+ }>(data: T[], designationEntities?: DesignationEntityModel[]): T[];
44
47
  getNameOfUsersAssignedToCurrentDesignation(): string[];
45
48
  }
@@ -107,6 +107,24 @@ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
107
107
  static getByUserAssignedToDesignation(designationEntityModels) {
108
108
  return designationEntityModels.filter((designation) => designation.isUserAssignedToDesignation());
109
109
  }
110
+ static sortByDesignationPriority(data, designationEntities) {
111
+ if (designationEntities && designationEntities.length > 0) {
112
+ const designationPriorityMap = new Map();
113
+ designationEntities.forEach((designation) => {
114
+ designationPriorityMap.set(designation.name, designation.order || undefined);
115
+ });
116
+ return data.sort((a, b) => {
117
+ var _a, _b;
118
+ const priorityA = (_a = designationPriorityMap.get(a.designation)) !== null && _a !== void 0 ? _a : Number.MAX_SAFE_INTEGER;
119
+ const priorityB = (_b = designationPriorityMap.get(b.designation)) !== null && _b !== void 0 ? _b : Number.MAX_SAFE_INTEGER;
120
+ return priorityA - priorityB;
121
+ });
122
+ }
123
+ throw new exceptions_1.AppBadRequestException({
124
+ key: error_key_enum_1.ErrorKeyEnum.DESIGNATION_ENTITIES,
125
+ message: ["Designation entities are required for sorting by designation."],
126
+ });
127
+ }
110
128
  getNameOfUsersAssignedToCurrentDesignation() {
111
129
  var _a;
112
130
  return ((_a = this.users) !== null && _a !== void 0 ? _a : []).map((user) => user.name);
@@ -1,4 +1,4 @@
1
- import { ITimesheetEntityUpdateDto, ITimesheetFlowContextData } from "../../api";
1
+ import { ITimesheetUpdateDto, ITimesheetFlowContextData } from "../../api";
2
2
  import { CurrencyEnum } from "../../enums";
3
3
  import { IClassificationWindowConfig, ITimesheetActionItem, SortableTimesheet } from "../../model/entities/interface/timesheet.model.interface";
4
4
  import { TimesheetClassificationStatusEnum } from "../enums/timesheet_classification_status_enum";
@@ -37,6 +37,7 @@ export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIM
37
37
  getRelationConfigs(): any[];
38
38
  static relationConfigs: RelationConfigs<[EntityEnum.USER, EntityEnum.ENTITY_HISTORY, EntityEnum.PROJECT], EntityEnum.TIMESHEET>;
39
39
  getTimesheetAmount(projectCurrency: CurrencyEnum): number;
40
+ isFullyNotBilled(): boolean;
40
41
  get formattedDate(): string;
41
42
  get userName(): string | undefined;
42
43
  getUpdateActionVisibility(currentUser: UserEntityModel, currentUserProjectIds?: number[]): {
@@ -45,7 +46,7 @@ export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIM
45
46
  getAvailableActions(currentUser: UserEntityModel, contextData?: ITimesheetFlowContextData, currentUserProjectIds?: number[], options?: {
46
47
  mergeApproveReject?: boolean;
47
48
  }): ITimesheetActionItem[];
48
- getNextStatus(currentUser: UserEntityModel, dto: ITimesheetEntityUpdateDto, contextData?: ITimesheetFlowContextData): TimesheetStatusEnum;
49
+ getNextStatus(currentUser: UserEntityModel, dto: ITimesheetUpdateDto, contextData?: ITimesheetFlowContextData): TimesheetStatusEnum;
49
50
  get approvers(): UserEntityModel[];
50
51
  get latestStatusFromHistory(): TimesheetStatusEnum | undefined;
51
52
  getDateCodeDay(): number;
@@ -42,6 +42,11 @@ class TimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
42
42
  const rate = (_e = (_d = (_c = (_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.designationModel) === null || _b === void 0 ? void 0 : _b.rates) === null || _c === void 0 ? void 0 : _c.find((rate) => rate.currency === projectCurrency)) === null || _d === void 0 ? void 0 : _d.rate) !== null && _e !== void 0 ? _e : 0;
43
43
  return rate * this.totalDuration;
44
44
  }
45
+ isFullyNotBilled() {
46
+ var _a;
47
+ // A non-pending timesheet with zero billed minutes is by definition not billable.
48
+ return this.classificationStatus !== timesheet_classification_status_enum_1.TimesheetClassificationStatusEnum.PENDING && ((_a = this.billedDuration) !== null && _a !== void 0 ? _a : 0) === 0;
49
+ }
45
50
  get formattedDate() {
46
51
  return new utils_1.DateCodeModel(this.dateCode).getFormattedDate();
47
52
  }
@@ -36,5 +36,6 @@ export declare enum ErrorKeyEnum {
36
36
  PROJECT_USER_MAPPING = "PROJECT_USER_MAPPING",
37
37
  CONFIGURATION_KEY = "CONFIGURATION_KEY",
38
38
  VENDOR_INVOICE_FLOW_CONTEXT_DATA = "VENDOR_INVOICE_FLOW_CONTEXT_DATA",
39
- VENDOR_TDS_LIABILITY_FLOW_CONTEXT_DATA = "VENDOR_TDS_LIABILITY_FLOW_CONTEXT_DATA"
39
+ VENDOR_TDS_LIABILITY_FLOW_CONTEXT_DATA = "VENDOR_TDS_LIABILITY_FLOW_CONTEXT_DATA",
40
+ DESIGNATION_ENTITIES = "DESIGNATION_ENTITIES"
40
41
  }
@@ -41,4 +41,5 @@ var ErrorKeyEnum;
41
41
  ErrorKeyEnum["CONFIGURATION_KEY"] = "CONFIGURATION_KEY";
42
42
  ErrorKeyEnum["VENDOR_INVOICE_FLOW_CONTEXT_DATA"] = "VENDOR_INVOICE_FLOW_CONTEXT_DATA";
43
43
  ErrorKeyEnum["VENDOR_TDS_LIABILITY_FLOW_CONTEXT_DATA"] = "VENDOR_TDS_LIABILITY_FLOW_CONTEXT_DATA";
44
+ ErrorKeyEnum["DESIGNATION_ENTITIES"] = "DESIGNATION_ENTITIES";
44
45
  })(ErrorKeyEnum || (exports.ErrorKeyEnum = ErrorKeyEnum = {}));
@@ -17,6 +17,6 @@ export interface SortableTimesheet {
17
17
  }
18
18
  export interface ITimesheetActionItem {
19
19
  label: string;
20
- value: TimesheetActionEnum | "APPROVE_REJECT";
20
+ value: TimesheetActionEnum | "APPROVE_REJECT" | "CLASSIFY_TO_BILL" | "CLASSIFY_TO_NOT_BILL";
21
21
  disabled?: boolean;
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "14.0.1-beta.9",
3
+ "version": "14.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -35,7 +35,8 @@
35
35
  "script:publish:install:patch": "node scripts/publish-and-install.js patch",
36
36
  "script:publish:install:minor": "node scripts/publish-and-install.js minor",
37
37
  "script:publish:install:major": "node scripts/publish-and-install.js major",
38
- "build:link": "bash scripts/build-link.sh"
38
+ "build:link": "bash scripts/build-link.sh",
39
+ "script:deploy:prod": "bash scripts/deploy-prod.sh"
39
40
  },
40
41
  "keywords": [],
41
42
  "author": "",