law-common 10.18.1-beta.7 → 10.18.1-beta.9
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.d.ts +1 -0
- package/dist/src/api/index.js +1 -0
- package/dist/src/api/interface/project-user-mapping.entity.api.d.ts +3 -0
- package/dist/src/api/interface/project-user-mapping.entity.api.js +2 -0
- package/dist/src/entities/interface/relation-config.interface.d.ts +4 -4
- package/dist/src/entities/model/bank.entity.model.js +2 -2
- package/dist/src/entities/model/billing-reimbursement-expense.entity.model.js +2 -2
- package/dist/src/entities/model/client.entity.model.js +2 -2
- package/dist/src/entities/model/designation.entity.model.d.ts +5 -5
- package/dist/src/entities/model/designation.entity.model.js +21 -8
- package/dist/src/entities/model/leave.entity.model.d.ts +5 -5
- package/dist/src/entities/model/leave.entity.model.js +4 -1
- package/dist/src/entities/model/project-user-mapping.entity.model.d.ts +2 -1
- package/package.json +1 -1
package/dist/src/api/index.d.ts
CHANGED
|
@@ -82,3 +82,4 @@ export * from "./interface/cron-job.entity.response";
|
|
|
82
82
|
export * from "./interface/to-do.entity.api";
|
|
83
83
|
export * from "./interface/billing-reimbursement-expense.api";
|
|
84
84
|
export * from "./interface/billing-reimbursement-expense-history.api";
|
|
85
|
+
export * from "./interface/project-user-mapping.entity.api";
|
package/dist/src/api/index.js
CHANGED
|
@@ -98,3 +98,4 @@ __exportStar(require("./interface/cron-job.entity.response"), exports);
|
|
|
98
98
|
__exportStar(require("./interface/to-do.entity.api"), exports);
|
|
99
99
|
__exportStar(require("./interface/billing-reimbursement-expense.api"), exports);
|
|
100
100
|
__exportStar(require("./interface/billing-reimbursement-expense-history.api"), exports);
|
|
101
|
+
__exportStar(require("./interface/project-user-mapping.entity.api"), exports);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RelationType } from "../enums/relation-type.enum";
|
|
2
2
|
import { EntityEnum, EnumEntityType, VirtualEntityEnum } from "./entity.utils.interface";
|
|
3
|
-
type SourcePath<
|
|
4
|
-
export type IRelationConfig<
|
|
5
|
-
name:
|
|
3
|
+
type SourcePath<T> = (keyof T & string) | `${string}.${string}`;
|
|
4
|
+
export type IRelationConfig<T extends EntityEnum | VirtualEntityEnum, K extends EnumEntityType<EntityEnum | VirtualEntityEnum>> = {
|
|
5
|
+
name: T;
|
|
6
6
|
relation: RelationType;
|
|
7
7
|
key: string;
|
|
8
8
|
mapKeyConfig: {
|
|
9
|
-
relationKey: SourcePath<EnumEntityType<
|
|
9
|
+
relationKey: SourcePath<EnumEntityType<T>>;
|
|
10
10
|
key: keyof K;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
@@ -15,8 +15,8 @@ class BankEntityModel {
|
|
|
15
15
|
this.status = bank_status_enum_1.BankStatusEnum.CREATE_APPROVAL;
|
|
16
16
|
this.createdBy = 0;
|
|
17
17
|
this.updatedBy = 0;
|
|
18
|
-
this.createdOn =
|
|
19
|
-
this.updatedOn =
|
|
18
|
+
this.createdOn = "";
|
|
19
|
+
this.updatedOn = "";
|
|
20
20
|
}
|
|
21
21
|
static fromApiEntity(apiEntity) {
|
|
22
22
|
const entity = new BankEntityModel();
|
|
@@ -19,8 +19,8 @@ class BillingReimbursementExpneseEntityModel extends base_entity_model_1.BaseEnt
|
|
|
19
19
|
this.amendmentPurpose = "";
|
|
20
20
|
this.updatedBy = 0;
|
|
21
21
|
this.createdBy = 0;
|
|
22
|
-
this.createdOn =
|
|
23
|
-
this.updatedOn =
|
|
22
|
+
this.createdOn = "";
|
|
23
|
+
this.updatedOn = "";
|
|
24
24
|
}
|
|
25
25
|
getRelationConfigs() {
|
|
26
26
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
@@ -7,8 +7,8 @@ const base_entity_model_1 = require("./base.entity.model");
|
|
|
7
7
|
class ClientEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
|
-
this.createdOn =
|
|
11
|
-
this.updatedOn =
|
|
10
|
+
this.createdOn = "";
|
|
11
|
+
this.updatedOn = "";
|
|
12
12
|
this.id = 0;
|
|
13
13
|
this.name = "";
|
|
14
14
|
this.primaryContactName = "";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DesignationEntityModel implements
|
|
1
|
+
import { IDesignationApiEntity } from "../interface/designation.entity.interface";
|
|
2
|
+
export declare class DesignationEntityModel implements IDesignationApiEntity {
|
|
3
3
|
id: number;
|
|
4
4
|
name: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
createdBy: number;
|
|
7
|
-
createdOn:
|
|
7
|
+
createdOn: string;
|
|
8
8
|
updatedBy: number;
|
|
9
|
-
updatedOn:
|
|
10
|
-
|
|
9
|
+
updatedOn: string;
|
|
10
|
+
static fromApiEntity(apiEntity: IDesignationApiEntity): DesignationEntityModel;
|
|
11
11
|
}
|
|
@@ -2,14 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DesignationEntityModel = void 0;
|
|
4
4
|
class DesignationEntityModel {
|
|
5
|
-
constructor(
|
|
6
|
-
this.id =
|
|
7
|
-
this.name =
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
|
|
5
|
+
constructor() {
|
|
6
|
+
this.id = 0;
|
|
7
|
+
this.name = "";
|
|
8
|
+
this.createdBy = 0;
|
|
9
|
+
this.createdOn = "";
|
|
10
|
+
this.updatedBy = 0;
|
|
11
|
+
this.updatedOn = "";
|
|
12
|
+
}
|
|
13
|
+
// constructor(data: IDesignationApiEntity) {
|
|
14
|
+
// this.id = data.id;
|
|
15
|
+
// this.name = data.name;
|
|
16
|
+
// this.description = data.description;
|
|
17
|
+
// this.createdBy = data.createdBy;
|
|
18
|
+
// this.createdOn = data.createdOn;
|
|
19
|
+
// this.updatedBy = data.updatedBy;
|
|
20
|
+
// this.updatedOn = data.updatedOn;
|
|
21
|
+
// }
|
|
22
|
+
static fromApiEntity(apiEntity) {
|
|
23
|
+
const entity = new DesignationEntityModel();
|
|
24
|
+
Object.assign(entity, apiEntity);
|
|
25
|
+
return entity;
|
|
13
26
|
}
|
|
14
27
|
}
|
|
15
28
|
exports.DesignationEntityModel = DesignationEntityModel;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ILeaveApiEntity } from "../../api";
|
|
1
2
|
import { DateCodeModel, Weekday } from "../../utils";
|
|
2
3
|
import { DurationTypeEnum } from "../enums/duration-type.enum";
|
|
3
4
|
import { LeaveTypeEnum } from "../enums/leave-type.enum";
|
|
4
5
|
import { LeaveStatusEnum } from "../enums/leave.status.enum";
|
|
5
|
-
|
|
6
|
-
export declare class LeaveEntityModel implements ILeaveEntity {
|
|
6
|
+
export declare class LeaveEntityModel implements ILeaveApiEntity {
|
|
7
7
|
id: number;
|
|
8
8
|
employeeId: number;
|
|
9
9
|
fromDate: string;
|
|
@@ -13,12 +13,12 @@ export declare class LeaveEntityModel implements ILeaveEntity {
|
|
|
13
13
|
status: LeaveStatusEnum;
|
|
14
14
|
remark?: string;
|
|
15
15
|
type: LeaveTypeEnum;
|
|
16
|
-
createdOn:
|
|
17
|
-
updatedOn:
|
|
16
|
+
createdOn: string;
|
|
17
|
+
updatedOn: string;
|
|
18
18
|
createdBy: number;
|
|
19
19
|
updatedBy: number;
|
|
20
20
|
private constructor();
|
|
21
|
-
static fromEntity(data:
|
|
21
|
+
static fromEntity(data: ILeaveApiEntity): 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,6 +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
11
|
this.id = data.id;
|
|
10
12
|
this.employeeId = data.employeeId;
|
|
11
13
|
this.fromDate = data.fromDate;
|
|
@@ -41,7 +43,8 @@ class LeaveEntityModel {
|
|
|
41
43
|
if (this.durationType === duration_type_enum_1.DurationTypeEnum.SECOND_FIRST) {
|
|
42
44
|
return count - 1;
|
|
43
45
|
}
|
|
44
|
-
if (this.durationType === duration_type_enum_1.DurationTypeEnum.FULL_FIRST ||
|
|
46
|
+
if (this.durationType === duration_type_enum_1.DurationTypeEnum.FULL_FIRST ||
|
|
47
|
+
this.durationType === duration_type_enum_1.DurationTypeEnum.SECOND_FULL) {
|
|
45
48
|
return count - 0.5;
|
|
46
49
|
}
|
|
47
50
|
return count;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IProjectUserMappingApiEntity } from "../../api";
|
|
1
2
|
import { ProjectUserStatusEnum } from "../enums/project_user_status.enum";
|
|
2
3
|
import { EntityEnum, EnumEntityType, IEntityApiResponse } from "../interface/entity.utils.interface";
|
|
3
4
|
import { IProjectUserMappingEntity } from "../interface/project.entity.interface";
|
|
@@ -5,7 +6,7 @@ import { RelationConfigs } from "../interface/relation-config.interface";
|
|
|
5
6
|
import { BaseEntityModel } from "./base.entity.model";
|
|
6
7
|
import { ProjectEntityModel } from "./project.entity.model";
|
|
7
8
|
import { UserEntityModel } from "./user.entity.model";
|
|
8
|
-
export declare class ProjectUserMappingEntityModel extends BaseEntityModel<EntityEnum.PROJECT_USER_MAPPING> implements
|
|
9
|
+
export declare class ProjectUserMappingEntityModel extends BaseEntityModel<EntityEnum.PROJECT_USER_MAPPING> implements IProjectUserMappingApiEntity {
|
|
9
10
|
id: number;
|
|
10
11
|
projectId: number;
|
|
11
12
|
userId: number;
|