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.
- package/dist/src/api/index.js +0 -3
- package/dist/src/api/interface/leave.api.d.ts +1 -3
- package/dist/src/entities/interface/entity.utils.interface.d.ts +2 -2
- package/dist/src/entities/interface/leave.entity.interface.d.ts +3 -11
- package/dist/src/entities/interface/leave.entity.interface.js +1 -1
- package/dist/src/entities/model/leave.entity.model.d.ts +5 -5
- package/dist/src/entities/model/leave.entity.model.js +2 -2
- package/package.json +1 -1
package/dist/src/api/index.js
CHANGED
|
@@ -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 {
|
|
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
|
|
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.
|
|
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 {
|
|
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
|
|
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
|
|
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;
|
|
@@ -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
|
-
|
|
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:
|
|
17
|
-
updatedOn:
|
|
16
|
+
createdOn: number;
|
|
17
|
+
updatedOn: number;
|
|
18
18
|
createdBy: number;
|
|
19
19
|
updatedBy: number;
|
|
20
20
|
private constructor();
|
|
21
|
-
static fromEntity(data:
|
|
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;
|