law-common 10.26.1-beta.6 → 10.26.1-beta.7

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.
@@ -72,7 +72,4 @@ __exportStar(require("./interface/work.from.home.update.interface"), exports);
72
72
  __exportStar(require("./interface/work_from_home_history.api"), exports);
73
73
  __exportStar(require("./interface/cron-job-manual-trigger.dto.interface"), exports);
74
74
  __exportStar(require("./interface/cron-job.entity.response"), exports);
75
- // export * from "./interface/to-do.entity.api";
76
- // export * from "./interface/billing-reimbursement-expense.api";
77
75
  __exportStar(require("./interface/billing-reimbursement-expense-history.api"), exports);
78
- // export * from "./interface/project-user-mapping.entity.api";
@@ -1,7 +1,5 @@
1
- import { IApiEntity, ILeaveEntity, LeaveActionEnum, LeaveStatusEnum } from "../../entities";
1
+ import { ILeaveEntity, LeaveActionEnum, LeaveStatusEnum } from "../../entities";
2
2
  import { ILeaveUpdateDto } from "./leave.update.dto.interface";
3
- export type ILeaveApiEntity = IApiEntity<ILeaveEntity>;
4
- export type ILeaveApiEntityArray = ILeaveApiEntity[];
5
3
  export type ILeaveFlowContextData = {
6
4
  currentTimesheet?: ILeaveEntity;
7
5
  dto?: ILeaveUpdateDto;
@@ -36,7 +36,7 @@ import { IHolidayListEntity } from "./holiday-list.entity.interface";
36
36
  import { IHolidayEntity } from "./holiday.entity.interface";
37
37
  import { IIndustryEntity } from "./industry.entity.interface";
38
38
  import { IIntermediaryBankEntity } from "./intermediary_bank.entity.interface";
39
- import { ILeaveCountVirtualEntity, ILeaveEntity, IUserLeaveVirtualEntity } from "./leave.entity.interface";
39
+ import { ILeaveCountVirtualEntity, ILeaveEntity } from "./leave.entity.interface";
40
40
  import { ILeaveHistoryEntity } from "./leave_history.entity.interface";
41
41
  import { IOfficeLocationEntity } from "./office.location.entity";
42
42
  import { IOrganizationEntity } from "./organization.entity.interface";
@@ -152,7 +152,7 @@ export type IBaseEntityApiResponse<T> = {
152
152
  [K in EntityEnum | VirtualEntityEnum]?: IBaseEntityApiResponse<EnumEntityType<K>>;
153
153
  };
154
154
  };
155
- export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_PAYMENT ? IBillingPaymentEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends VirtualEntityEnum.USER_LEAVE ? IUserLeaveVirtualEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : never) & {
155
+ export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_PAYMENT ? IBillingPaymentEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : never) & {
156
156
  id: number;
157
157
  };
158
158
  export type EntityRelationConfig<T extends EntityEnum | VirtualEntityEnum> = {
@@ -1,10 +1,10 @@
1
1
  import { DurationTypeEnum } from "../enums/duration-type.enum";
2
2
  import { LeaveTypeEnum } from "../enums/leave-type.enum";
3
3
  import { LeaveStatusEnum } from "../enums/leave.status.enum";
4
- import { IAuditColumnEntity } from "./audit-column.entity.interface";
4
+ import { IEntityAuditColumn } from "./entity-audit-columns.interface";
5
5
  import { EnumEntityType, IEntityFilterData, VirtualEntityEnum } from "./entity.utils.interface";
6
6
  import { IUserEntity } from "./user.entity.interface";
7
- export interface ILeaveEntity extends IAuditColumnEntity {
7
+ export interface ILeaveEntity extends IEntityAuditColumn {
8
8
  id: number;
9
9
  employeeId: number;
10
10
  fromDate: string;
@@ -30,15 +30,7 @@ export interface ILeaveVirtualEntityColumnKeys {
30
30
  totalLeavesTaken: number;
31
31
  totalLeavesPending: number;
32
32
  }
33
- export interface IUserLeaveVirtualEntity extends IAuditColumnEntity {
34
- userId: number;
35
- leavesTaken: number;
36
- leavesPending: number;
37
- period: string;
38
- type: LeaveTypeEnum;
39
- id: number;
40
- }
41
- export interface ILeaveCountVirtualEntity extends IAuditColumnEntity {
33
+ export interface ILeaveCountVirtualEntity extends IEntityAuditColumn {
42
34
  id: number;
43
35
  period: string;
44
36
  leaveId?: number;
@@ -11,7 +11,7 @@ exports.virtualEntityToKeysMap = {
11
11
  "updatedBy",
12
12
  "updatedOn",
13
13
  "count",
14
- "id"
14
+ "id",
15
15
  ],
16
16
  [entity_utils_interface_1.VirtualEntityEnum.USER_LEAVE]: [
17
17
  "createdBy",
@@ -1,9 +1,9 @@
1
- import { ILeaveApiEntity } from "../../api";
2
1
  import { DateCodeModel, Weekday } from "../../utils";
3
2
  import { DurationTypeEnum } from "../enums/duration-type.enum";
4
3
  import { LeaveTypeEnum } from "../enums/leave-type.enum";
5
4
  import { LeaveStatusEnum } from "../enums/leave.status.enum";
6
- export declare class LeaveEntityModel implements ILeaveApiEntity {
5
+ import { ILeaveEntity } from "../interface/leave.entity.interface";
6
+ export declare class LeaveEntityModel implements ILeaveEntity {
7
7
  id: number;
8
8
  employeeId: number;
9
9
  fromDate: string;
@@ -13,12 +13,12 @@ export declare class LeaveEntityModel implements ILeaveApiEntity {
13
13
  status: LeaveStatusEnum;
14
14
  remark?: string;
15
15
  type: LeaveTypeEnum;
16
- createdOn: string;
17
- updatedOn: string;
16
+ createdOn: number;
17
+ updatedOn: number;
18
18
  createdBy: number;
19
19
  updatedBy: number;
20
20
  private constructor();
21
- static fromEntity(data: ILeaveApiEntity): LeaveEntityModel;
21
+ static fromEntity(data: ILeaveEntity): LeaveEntityModel;
22
22
  isMoreThanOneDayLeave(): boolean;
23
23
  getLeaveDuration(excludeWeekdays?: Weekday[], excludeDates?: DateCodeModel[]): number;
24
24
  static getLeaveDuration(leaves: LeaveEntityModel[], excludeWeekdays?: Weekday[], excludeDates?: DateCodeModel[], leaveStatusEnum?: LeaveStatusEnum[]): number;
@@ -6,8 +6,8 @@ const duration_type_enum_1 = require("../enums/duration-type.enum");
6
6
  const leave_status_enum_1 = require("../enums/leave.status.enum");
7
7
  class LeaveEntityModel {
8
8
  constructor(data) {
9
- this.createdOn = "";
10
- this.updatedOn = "";
9
+ this.createdOn = 0;
10
+ this.updatedOn = 0;
11
11
  this.id = data.id;
12
12
  this.employeeId = data.employeeId;
13
13
  this.fromDate = data.fromDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "10.26.1-beta.6",
3
+ "version": "10.26.1-beta.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [