law-common 10.22.1-beta.3 → 10.22.1-beta.5
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 +3 -3
- package/dist/src/api/index.js +4 -3
- package/dist/src/api/interface/country.entity.response.d.ts +4 -0
- package/dist/src/api/interface/designation.entity.response.d.ts +4 -0
- package/dist/src/api/interface/expense_type.entity.response.d.ts +3 -3
- package/dist/src/api/interface/industry.entity.response.d.ts +3 -0
- package/dist/src/api/interface/office.location.entity.response.d.ts +3 -3
- package/dist/src/api/interface/project.entity.response.d.ts +2 -3
- package/dist/src/entities/interface/country.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/designation.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/designation.entity.interface.js +1 -1
- package/dist/src/entities/interface/expense_type.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/industry.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/office.location.entity.d.ts +2 -2
- package/dist/src/entities/interface/rate.entity.interface.d.ts +3 -2
- package/dist/src/entities/model/designation.entity.model.d.ts +5 -5
- package/dist/src/entities/model/designation.entity.model.js +6 -6
- package/dist/src/utils/helper.fn.util.d.ts +1 -0
- package/dist/src/utils/helper.fn.util.js +6 -0
- package/package.json +1 -1
- package/dist/src/api/interface/expense_type.entity.api.d.ts +0 -3
- package/dist/src/api/interface/office.location.entity.api.d.ts +0 -3
- package/dist/src/api/interface/rate.entity.response.d.ts +0 -4
- /package/dist/src/api/interface/{expense_type.entity.api.js → country.entity.response.js} +0 -0
- /package/dist/src/api/interface/{office.location.entity.api.js → designation.entity.response.js} +0 -0
- /package/dist/src/api/interface/{rate.entity.response.js → industry.entity.response.js} +0 -0
package/dist/src/api/index.d.ts
CHANGED
|
@@ -7,9 +7,10 @@ export * from "./interface/user.create.dto.interace";
|
|
|
7
7
|
export * from "./interface/login.response.interface";
|
|
8
8
|
export * from "./interface/jwt.payload.interface";
|
|
9
9
|
export * from "./interface/user.update.dto.interface";
|
|
10
|
+
export * from "./interface/designation.entity.response";
|
|
10
11
|
export * from "./interface/login.dto.interface";
|
|
12
|
+
export * from "./interface/industry.entity.response";
|
|
11
13
|
export * from "./interface/configuration.entity.response";
|
|
12
|
-
export * from "./interface/rate.entity.response";
|
|
13
14
|
export * from "./interface/client.entity.response";
|
|
14
15
|
export * from "./interface/project.entity.response";
|
|
15
16
|
export * from "./interface/timesheet.entity.response.interface";
|
|
@@ -17,13 +18,11 @@ export * from "./interface/project.response.interface";
|
|
|
17
18
|
export * from "./interface/reimbursement.entity.response";
|
|
18
19
|
export * from "./interface/expense_type.create.dto.interface";
|
|
19
20
|
export * from "./interface/task.create.dto.interface";
|
|
20
|
-
export * from "./interface/expense_type.entity.api";
|
|
21
21
|
export * from "./interface/expense_type.update.dto";
|
|
22
22
|
export * from "./interface/expense_type.entity.response";
|
|
23
23
|
export * from "./interface/billing.create.dto.interface";
|
|
24
24
|
export * from "./interface/billing.entity.response";
|
|
25
25
|
export * from "./interface/office.location.create.dto.interface";
|
|
26
|
-
export * from "./interface/office.location.entity.api";
|
|
27
26
|
export * from "./interface/office.Location.update.dto.interface";
|
|
28
27
|
export * from "./interface/office.location.entity.response";
|
|
29
28
|
export * from "./interface/billing.timesheet.entity.api";
|
|
@@ -68,6 +67,7 @@ export * from "./interface/work.from.home.api";
|
|
|
68
67
|
export * from "./interface/work.from.home.create.dto.interface";
|
|
69
68
|
export * from "./interface/work.from.home.update.interface";
|
|
70
69
|
export * from "./interface/work_from_home_history.api";
|
|
70
|
+
export * from "./interface/country.entity.response";
|
|
71
71
|
export * from "./interface/organization.entity.api";
|
|
72
72
|
export * from "./interface/intermediary.bank.entity.response";
|
|
73
73
|
export * from "./interface/holiday.entity.response";
|
package/dist/src/api/index.js
CHANGED
|
@@ -17,15 +17,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./interface/base.response.interface"), exports);
|
|
18
18
|
__exportStar(require("./interface/task.create.dto.interface"), exports);
|
|
19
19
|
__exportStar(require("./interface/task.update.dto.interface"), exports);
|
|
20
|
+
// export * from "./interface/task.entity.api";
|
|
20
21
|
__exportStar(require("./interface/user.entity.api"), exports);
|
|
21
22
|
__exportStar(require("./interface/user.entity.response"), exports);
|
|
22
23
|
__exportStar(require("./interface/user.create.dto.interace"), exports);
|
|
23
24
|
__exportStar(require("./interface/login.response.interface"), exports);
|
|
24
25
|
__exportStar(require("./interface/jwt.payload.interface"), exports);
|
|
25
26
|
__exportStar(require("./interface/user.update.dto.interface"), exports);
|
|
27
|
+
__exportStar(require("./interface/designation.entity.response"), exports);
|
|
26
28
|
__exportStar(require("./interface/login.dto.interface"), exports);
|
|
29
|
+
__exportStar(require("./interface/industry.entity.response"), exports);
|
|
27
30
|
__exportStar(require("./interface/configuration.entity.response"), exports);
|
|
28
|
-
__exportStar(require("./interface/rate.entity.response"), exports);
|
|
29
31
|
__exportStar(require("./interface/client.entity.response"), exports);
|
|
30
32
|
__exportStar(require("./interface/project.entity.response"), exports);
|
|
31
33
|
__exportStar(require("./interface/timesheet.entity.response.interface"), exports);
|
|
@@ -33,13 +35,11 @@ __exportStar(require("./interface/project.response.interface"), exports);
|
|
|
33
35
|
__exportStar(require("./interface/reimbursement.entity.response"), exports);
|
|
34
36
|
__exportStar(require("./interface/expense_type.create.dto.interface"), exports);
|
|
35
37
|
__exportStar(require("./interface/task.create.dto.interface"), exports);
|
|
36
|
-
__exportStar(require("./interface/expense_type.entity.api"), exports);
|
|
37
38
|
__exportStar(require("./interface/expense_type.update.dto"), exports);
|
|
38
39
|
__exportStar(require("./interface/expense_type.entity.response"), exports);
|
|
39
40
|
__exportStar(require("./interface/billing.create.dto.interface"), exports);
|
|
40
41
|
__exportStar(require("./interface/billing.entity.response"), exports);
|
|
41
42
|
__exportStar(require("./interface/office.location.create.dto.interface"), exports);
|
|
42
|
-
__exportStar(require("./interface/office.location.entity.api"), exports);
|
|
43
43
|
__exportStar(require("./interface/office.Location.update.dto.interface"), exports);
|
|
44
44
|
__exportStar(require("./interface/office.location.entity.response"), exports);
|
|
45
45
|
__exportStar(require("./interface/billing.timesheet.entity.api"), exports);
|
|
@@ -84,6 +84,7 @@ __exportStar(require("./interface/work.from.home.api"), exports);
|
|
|
84
84
|
__exportStar(require("./interface/work.from.home.create.dto.interface"), exports);
|
|
85
85
|
__exportStar(require("./interface/work.from.home.update.interface"), exports);
|
|
86
86
|
__exportStar(require("./interface/work_from_home_history.api"), exports);
|
|
87
|
+
__exportStar(require("./interface/country.entity.response"), exports);
|
|
87
88
|
__exportStar(require("./interface/organization.entity.api"), exports);
|
|
88
89
|
__exportStar(require("./interface/intermediary.bank.entity.response"), exports);
|
|
89
90
|
__exportStar(require("./interface/holiday.entity.response"), exports);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IDesignationApiEntity } from "../../entities";
|
|
2
|
+
import { IBaseResponse } from "./base.response.interface";
|
|
3
|
+
export type IDesignationApiEntityResponse = IBaseResponse<IDesignationApiEntity>;
|
|
4
|
+
export type IDesignationApiEntityResponseArray = IBaseResponse<IDesignationApiEntity[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { IExpenseTypeEntity } from "../../entities";
|
|
1
2
|
import { IBaseResponse } from "./base.response.interface";
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type IExpenseTypeApiEntityResponseArray = IBaseResponse<IExpenseTypeApiEntity[]>;
|
|
3
|
+
export type IExpenseTypeApiEntityResponse = IBaseResponse<IExpenseTypeEntity>;
|
|
4
|
+
export type IExpenseTypeApiEntityResponseArray = IBaseResponse<IExpenseTypeEntity[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { IOfficeLocationEntity } from "../../entities";
|
|
1
2
|
import { IBaseResponse } from "./base.response.interface";
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type IOfficeLocationApiEntityResponseArray = IBaseResponse<IOfficeLocationApiEntity[]>;
|
|
3
|
+
export type IOfficeLocationApiEntityResponse = IBaseResponse<IOfficeLocationEntity>;
|
|
4
|
+
export type IOfficeLocationApiEntityResponseArray = IBaseResponse<IOfficeLocationEntity[]>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IApiEntity, IClientEntity, IDesignationApiEntity, IProjectCreateDtoExtra, IProjectEntity, IProjectUserDto } from "../../entities";
|
|
2
|
-
import { IRateApiEntity } from "./rate.entity.response";
|
|
1
|
+
import { IApiEntity, IClientEntity, IDesignationApiEntity, IProjectCreateDtoExtra, IProjectEntity, IProjectUserDto, IRateEntity } from "../../entities";
|
|
3
2
|
import { IUserApiEntity } from "./user.entity.api";
|
|
4
3
|
export type IProjectApiEntity = IApiEntity<IProjectEntity>;
|
|
5
4
|
export type IProjectApiEntityArray = IProjectApiEntity[];
|
|
@@ -22,6 +21,6 @@ export type IProjectEntityGet = {
|
|
|
22
21
|
[key: string]: IDesignationApiEntity;
|
|
23
22
|
};
|
|
24
23
|
rates?: {
|
|
25
|
-
[key: string]:
|
|
24
|
+
[key: string]: IRateEntity;
|
|
26
25
|
};
|
|
27
26
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
2
2
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
3
|
-
export interface ICountryEntity extends
|
|
3
|
+
export interface ICountryEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
2
2
|
import { IApiEntity, IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
3
|
-
export interface IDesignationEntity extends
|
|
3
|
+
export interface IDesignationEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
description?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExpenseTypeEnum } from "../enums/expense_type.entity.enum";
|
|
2
|
-
import {
|
|
2
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
3
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
4
|
-
export interface IExpenseTypeEntity extends
|
|
4
|
+
export interface IExpenseTypeEntity extends IEntityAuditColumn {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
description?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
2
2
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
3
|
-
export interface IIndustryEntity extends
|
|
3
|
+
export interface IIndustryEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
description?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
2
2
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
3
|
-
export interface IOfficeLocationEntity extends
|
|
3
|
+
export interface IOfficeLocationEntity extends IEntityAuditColumn {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
address: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CurrencyEnum, TimeUnitEnum } from "../../enums";
|
|
2
2
|
import { PartialBy } from "../../misc";
|
|
3
3
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
4
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
5
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
5
|
-
export interface IRateEntity extends
|
|
6
|
+
export interface IRateEntity extends IEntityAuditColumn {
|
|
6
7
|
id: number;
|
|
7
8
|
designation: string;
|
|
8
9
|
rate: number;
|
|
@@ -13,6 +14,6 @@ export interface IRateEntityCreateDto extends IEntityCreateDto<IRateEntity> {
|
|
|
13
14
|
}
|
|
14
15
|
export interface IRateEntityUpdateDto extends IEntityUpdateDto<IRateEntity> {
|
|
15
16
|
}
|
|
16
|
-
export interface IRateEntityUpdateByDesignationCurrencyDto extends PartialBy<Omit<IRateEntity,
|
|
17
|
+
export interface IRateEntityUpdateByDesignationCurrencyDto extends PartialBy<Omit<IRateEntity, "id" | keyof IAuditColumnEntity>, "unit"> {
|
|
17
18
|
}
|
|
18
19
|
export type IRateEntityFilterData = IEntityFilterData<IRateEntity>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDesignationApiEntity } from "../interface/designation.entity.interface";
|
|
2
2
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
3
3
|
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
-
export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.DESIGNATION> implements
|
|
4
|
+
export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.DESIGNATION> implements IDesignationApiEntity {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
createdBy: number;
|
|
9
|
-
createdOn:
|
|
9
|
+
createdOn: string;
|
|
10
10
|
updatedBy: number;
|
|
11
|
-
updatedOn:
|
|
12
|
-
static
|
|
11
|
+
updatedOn: string;
|
|
12
|
+
static fromApiEntity(apiEntity: IDesignationApiEntity): DesignationEntityModel;
|
|
13
13
|
getRelationConfigs(): any[];
|
|
14
14
|
}
|
|
@@ -9,9 +9,9 @@ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
9
9
|
this.id = 0;
|
|
10
10
|
this.name = "";
|
|
11
11
|
this.createdBy = 0;
|
|
12
|
-
this.createdOn =
|
|
12
|
+
this.createdOn = "";
|
|
13
13
|
this.updatedBy = 0;
|
|
14
|
-
this.updatedOn =
|
|
14
|
+
this.updatedOn = "";
|
|
15
15
|
}
|
|
16
16
|
// constructor(data: IDesignationApiEntity) {
|
|
17
17
|
// this.id = data.id;
|
|
@@ -22,10 +22,10 @@ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
22
22
|
// this.updatedBy = data.updatedBy;
|
|
23
23
|
// this.updatedOn = data.updatedOn;
|
|
24
24
|
// }
|
|
25
|
-
static
|
|
26
|
-
const
|
|
27
|
-
Object.assign(
|
|
28
|
-
return
|
|
25
|
+
static fromApiEntity(apiEntity) {
|
|
26
|
+
const entity = new DesignationEntityModel(entity_utils_interface_1.EntityEnum.DESIGNATION);
|
|
27
|
+
Object.assign(entity, apiEntity);
|
|
28
|
+
return entity;
|
|
29
29
|
}
|
|
30
30
|
getRelationConfigs() {
|
|
31
31
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
@@ -269,3 +269,4 @@ export declare function hasProperty<T extends object>(obj: T | null | undefined,
|
|
|
269
269
|
* convertToNumberType("abc"); // throws Error("Invalid number: abc")
|
|
270
270
|
*/
|
|
271
271
|
export declare function convertToNumberType<T extends string | number>(value: T): number;
|
|
272
|
+
export declare function epochToDateTime(epoch: number): string;
|
|
@@ -39,6 +39,8 @@ exports.findDuplicateIds = findDuplicateIds;
|
|
|
39
39
|
exports.getDecimalNumberFromString = getDecimalNumberFromString;
|
|
40
40
|
exports.hasProperty = hasProperty;
|
|
41
41
|
exports.convertToNumberType = convertToNumberType;
|
|
42
|
+
exports.epochToDateTime = epochToDateTime;
|
|
43
|
+
const date_fns_1 = require("date-fns");
|
|
42
44
|
const util_constants_1 = require("../constants/util.constants");
|
|
43
45
|
const error_key_enum_1 = require("../enums/error.key.enum");
|
|
44
46
|
const exceptions_1 = require("../exceptions");
|
|
@@ -564,3 +566,7 @@ function convertToNumberType(value) {
|
|
|
564
566
|
}
|
|
565
567
|
return num;
|
|
566
568
|
}
|
|
569
|
+
function epochToDateTime(epoch) {
|
|
570
|
+
const date = new Date(epoch * 1000); // JS Date expects milliseconds
|
|
571
|
+
return (0, date_fns_1.format)(date, "yyyy-MM-dd HH:mm:ss");
|
|
572
|
+
}
|
package/package.json
CHANGED
|
File without changes
|
/package/dist/src/api/interface/{office.location.entity.api.js → designation.entity.response.js}
RENAMED
|
File without changes
|
|
File without changes
|