law-common 10.26.1-beta.5 → 10.26.1-beta.6
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 +8 -3
- package/dist/src/api/index.js +11 -3
- package/dist/src/api/interface/bank_history.api.d.ts +3 -0
- package/dist/src/api/interface/billing-reimbursement-expense-history.api.d.ts +4 -0
- package/dist/src/api/interface/billing.entity.response.d.ts +3 -5
- package/dist/src/api/interface/billing.history.api.d.ts +3 -0
- package/dist/src/api/interface/billing.transaction.entity.response.d.ts +3 -6
- package/dist/src/api/interface/billing_timesheet_history.api.d.ts +3 -0
- package/dist/src/api/interface/billing_timesheet_history.api.js +2 -0
- package/dist/src/api/interface/leave_history.api.d.ts +3 -0
- package/dist/src/api/interface/leave_history.api.js +2 -0
- package/dist/src/api/interface/reimbursement.entity.response.d.ts +2 -4
- package/dist/src/api/interface/reimbursement_history.api.d.ts +3 -0
- package/dist/src/api/interface/reimbursement_history.api.js +2 -0
- package/dist/src/api/interface/timesheet.history.api.d.ts +3 -0
- package/dist/src/api/interface/timesheet.history.api.js +2 -0
- package/dist/src/api/interface/work_from_home_history.api.d.ts +4 -0
- package/dist/src/api/interface/work_from_home_history.api.js +2 -0
- package/dist/src/entities/interface/billing-reimbursement-expense.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/billing.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/billing_payment.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/billing_transaction.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/entity.utils.interface.d.ts +1 -2
- package/dist/src/entities/interface/reimbursement.entity.interface.d.ts +2 -2
- package/dist/src/entities/model/billing-reimbursement-expense.entity.model.d.ts +5 -5
- package/dist/src/entities/model/billing-reimbursement-expense.entity.model.js +6 -6
- package/dist/src/entities/model/billing.entity.model.d.ts +6 -5
- package/dist/src/entities/model/billing.entity.model.js +8 -7
- package/dist/src/entities/model/entity.model.interface.js +2 -2
- package/dist/src/entities/model/reimbursement.entity.model.d.ts +5 -5
- package/dist/src/entities/model/reimbursement.entity.model.js +6 -6
- package/dist/src/utils/helper.fn.util.d.ts +31 -0
- package/dist/src/utils/helper.fn.util.js +34 -0
- package/package.json +1 -1
- package/dist/src/api/interface/billing-reimbursement-expense.api.d.ts +0 -3
- package/dist/src/api/interface/billing.entity.api.d.ts +0 -3
- package/dist/src/api/interface/billing.payment.entity.api.d.ts +0 -3
- /package/dist/src/api/interface/{billing-reimbursement-expense.api.js → bank_history.api.js} +0 -0
- /package/dist/src/api/interface/{billing.entity.api.js → billing-reimbursement-expense-history.api.js} +0 -0
- /package/dist/src/api/interface/{billing.payment.entity.api.js → billing.history.api.js} +0 -0
package/dist/src/api/index.d.ts
CHANGED
|
@@ -20,13 +20,11 @@ export * from "./interface/billing.entity.response";
|
|
|
20
20
|
export * from "./interface/office.location.create.dto.interface";
|
|
21
21
|
export * from "./interface/office.Location.update.dto.interface";
|
|
22
22
|
export * from "./interface/office.location.entity.response";
|
|
23
|
-
export * from "./interface/billing.entity.api";
|
|
24
23
|
export * from "./interface/billing.update.dto.interface";
|
|
25
24
|
export * from "./interface/bank.create.dto.interface";
|
|
26
25
|
export * from "./interface/bank.update.dto.interface";
|
|
27
26
|
export * from "./interface/bank.entity.response";
|
|
28
27
|
export * from "./interface/billing.payment.create.dto.interface";
|
|
29
|
-
export * from "./interface/billing.payment.entity.api";
|
|
30
28
|
export * from "./interface/billing.payment.update.dto.interface";
|
|
31
29
|
export * from "./interface/client.affiliate.create.dto.interface";
|
|
32
30
|
export * from "./interface/client.affiliate.update.dto.interface";
|
|
@@ -42,13 +40,20 @@ export * from "./interface/billing.transaction.create.dto.interface";
|
|
|
42
40
|
export * from "./interface/billing.transaction.update.dto.interface";
|
|
43
41
|
export * from "./interface/billing.transaction.entity.response";
|
|
44
42
|
export * from "./interface/billing.flow.update.dto";
|
|
43
|
+
export * from "./interface/timesheet.history.api";
|
|
44
|
+
export * from "./interface/billing.history.api";
|
|
45
|
+
export * from "./interface/billing_timesheet_history.api";
|
|
46
|
+
export * from "./interface/reimbursement_history.api";
|
|
45
47
|
export * from "./interface/reimbursement_expense.api";
|
|
48
|
+
export * from "./interface/bank_history.api";
|
|
46
49
|
export * from "./interface/leave.create.dto.interface";
|
|
47
50
|
export * from "./interface/leave.update.dto.interface";
|
|
48
51
|
export * from "./interface/leave.api";
|
|
52
|
+
export * from "./interface/leave_history.api";
|
|
49
53
|
export * from "./interface/work.from.home.api";
|
|
50
54
|
export * from "./interface/work.from.home.create.dto.interface";
|
|
51
55
|
export * from "./interface/work.from.home.update.interface";
|
|
56
|
+
export * from "./interface/work_from_home_history.api";
|
|
52
57
|
export * from "./interface/cron-job-manual-trigger.dto.interface";
|
|
53
58
|
export * from "./interface/cron-job.entity.response";
|
|
54
|
-
export * from "./interface/billing-reimbursement-expense.api";
|
|
59
|
+
export * from "./interface/billing-reimbursement-expense-history.api";
|
package/dist/src/api/index.js
CHANGED
|
@@ -36,13 +36,11 @@ __exportStar(require("./interface/billing.entity.response"), exports);
|
|
|
36
36
|
__exportStar(require("./interface/office.location.create.dto.interface"), exports);
|
|
37
37
|
__exportStar(require("./interface/office.Location.update.dto.interface"), exports);
|
|
38
38
|
__exportStar(require("./interface/office.location.entity.response"), exports);
|
|
39
|
-
__exportStar(require("./interface/billing.entity.api"), exports);
|
|
40
39
|
__exportStar(require("./interface/billing.update.dto.interface"), exports);
|
|
41
40
|
__exportStar(require("./interface/bank.create.dto.interface"), exports);
|
|
42
41
|
__exportStar(require("./interface/bank.update.dto.interface"), exports);
|
|
43
42
|
__exportStar(require("./interface/bank.entity.response"), exports);
|
|
44
43
|
__exportStar(require("./interface/billing.payment.create.dto.interface"), exports);
|
|
45
|
-
__exportStar(require("./interface/billing.payment.entity.api"), exports);
|
|
46
44
|
__exportStar(require("./interface/billing.payment.update.dto.interface"), exports);
|
|
47
45
|
__exportStar(require("./interface/client.affiliate.create.dto.interface"), exports);
|
|
48
46
|
__exportStar(require("./interface/client.affiliate.update.dto.interface"), exports);
|
|
@@ -58,13 +56,23 @@ __exportStar(require("./interface/billing.transaction.create.dto.interface"), ex
|
|
|
58
56
|
__exportStar(require("./interface/billing.transaction.update.dto.interface"), exports);
|
|
59
57
|
__exportStar(require("./interface/billing.transaction.entity.response"), exports);
|
|
60
58
|
__exportStar(require("./interface/billing.flow.update.dto"), exports);
|
|
59
|
+
__exportStar(require("./interface/timesheet.history.api"), exports);
|
|
60
|
+
__exportStar(require("./interface/billing.history.api"), exports);
|
|
61
|
+
__exportStar(require("./interface/billing_timesheet_history.api"), exports);
|
|
62
|
+
__exportStar(require("./interface/reimbursement_history.api"), exports);
|
|
61
63
|
__exportStar(require("./interface/reimbursement_expense.api"), exports);
|
|
64
|
+
__exportStar(require("./interface/bank_history.api"), exports);
|
|
62
65
|
__exportStar(require("./interface/leave.create.dto.interface"), exports);
|
|
63
66
|
__exportStar(require("./interface/leave.update.dto.interface"), exports);
|
|
64
67
|
__exportStar(require("./interface/leave.api"), exports);
|
|
68
|
+
__exportStar(require("./interface/leave_history.api"), exports);
|
|
65
69
|
__exportStar(require("./interface/work.from.home.api"), exports);
|
|
66
70
|
__exportStar(require("./interface/work.from.home.create.dto.interface"), exports);
|
|
67
71
|
__exportStar(require("./interface/work.from.home.update.interface"), exports);
|
|
72
|
+
__exportStar(require("./interface/work_from_home_history.api"), exports);
|
|
68
73
|
__exportStar(require("./interface/cron-job-manual-trigger.dto.interface"), exports);
|
|
69
74
|
__exportStar(require("./interface/cron-job.entity.response"), exports);
|
|
70
|
-
|
|
75
|
+
// export * from "./interface/to-do.entity.api";
|
|
76
|
+
// export * from "./interface/billing-reimbursement-expense.api";
|
|
77
|
+
__exportStar(require("./interface/billing-reimbursement-expense-history.api"), exports);
|
|
78
|
+
// export * from "./interface/project-user-mapping.entity.api";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IApiEntity } from "../../entities";
|
|
2
|
+
import { IBillingReimbursementExpenseHistoryEntity } from "../../entities/interface/billing-reimbursement-expense-history.entity.interface";
|
|
3
|
+
export type IBillingReimbursementExpenseHistoryApiEntity = IApiEntity<IBillingReimbursementExpenseHistoryEntity>;
|
|
4
|
+
export type IBillingReimbursementExpenseHistoryApiEntityArray = IBillingReimbursementExpenseHistoryApiEntity[];
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { BillingActionsEnum, BillingStatusEnum, IBillingEntity, IBillingTimesheetEntity, IProjectEntity, IUserEntity } from "../../entities";
|
|
2
|
-
import { IBillingReimbursementExpenseApiEntity } from "./billing-reimbursement-expense.api";
|
|
3
|
-
import { IBillingApiEntity } from "./billing.entity.api";
|
|
1
|
+
import { BillingActionsEnum, BillingStatusEnum, IBillingEntity, IBillingReimbursementExpenseEntity, IBillingTimesheetEntity, IProjectEntity, IUserEntity } from "../../entities";
|
|
4
2
|
import { IUpdateBillingDto } from "./billing.update.dto.interface";
|
|
5
3
|
export type IBillingEntityResponse = {
|
|
6
|
-
billing:
|
|
4
|
+
billing: IBillingEntity;
|
|
5
|
+
billingReimbursementExpenses?: IBillingReimbursementExpenseEntity[];
|
|
7
6
|
billingTimesheets?: IBillingTimesheetEntity[];
|
|
8
|
-
billingReimbursementExpenses?: IBillingReimbursementExpenseApiEntity[];
|
|
9
7
|
};
|
|
10
8
|
export interface IUserEntityRelation {
|
|
11
9
|
users?: IUserEntity[];
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IBillingApiEntity } from "./billing.entity.api";
|
|
3
|
-
export type IBillingTransactionApiEntity = IApiEntity<IBillingTransactionEntity>;
|
|
4
|
-
export type IBillingTransactionApiEntityArray = IBillingTransactionApiEntity[];
|
|
1
|
+
import { IBillingEntity, IBillingTransactionEntity } from "../../entities";
|
|
5
2
|
export type IBillingTransactionEntityGet = {
|
|
6
|
-
billingTransaction:
|
|
7
|
-
billing:
|
|
3
|
+
billingTransaction: IBillingTransactionEntity;
|
|
4
|
+
billing: IBillingEntity;
|
|
8
5
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IReimbursementEntity, IReimbursementExpenseEntity, IUserEntity, ReimbursementActionEnum, ReimbursementExpenseActionEnum, ReimbursementExpenseState, ReimbursementStatusEnum } from "../../entities";
|
|
2
2
|
import { IProjectEntityGet } from "./project.entity.response";
|
|
3
3
|
import { IReimbursementExpenseApiEntityArray } from "./reimbursement_expense.api";
|
|
4
|
-
export type IReimbursementApiEntity = IApiEntity<IReimbursementEntity>;
|
|
5
|
-
export type IReimbursementApiEntityArray = IReimbursementApiEntity[];
|
|
6
4
|
export type IReimbursementEntityGet = {
|
|
7
5
|
reimbursements: IReimbursementResponse[];
|
|
8
6
|
users: {
|
|
@@ -35,6 +33,6 @@ export type IReimbursementFlowConfig = {
|
|
|
35
33
|
export type IReimbursementFlowContextData = {
|
|
36
34
|
expenseDetails: IReimbursementExpenseEntity[];
|
|
37
35
|
};
|
|
38
|
-
export type IReimbursementResponse =
|
|
36
|
+
export type IReimbursementResponse = IReimbursementEntity & {
|
|
39
37
|
expenseDetails: IReimbursementExpenseApiEntityArray;
|
|
40
38
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IApiEntity } from "../../entities";
|
|
2
|
+
import { IWorkFromHomeHistoryEntity } from "../../entities/interface/work_from_home_history.entity.interface";
|
|
3
|
+
export type IWorkFromHomeHistoryApiEntity = IApiEntity<IWorkFromHomeHistoryEntity>;
|
|
4
|
+
export type IWorkFromHomeHistoryApiEntityArray = IWorkFromHomeHistoryApiEntity[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BillingReimbursementExpenseImpactEnum } from "../enums/billing-reimburement-expense-impact.enum";
|
|
2
2
|
import { BillingReimbursementExpenseChangedStatusEnum } from "../enums/billing-reimbursement-expense-change-status.enum";
|
|
3
|
-
import {
|
|
3
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
4
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
5
|
-
export interface IBillingReimbursementExpenseEntity extends
|
|
5
|
+
export interface IBillingReimbursementExpenseEntity extends IEntityAuditColumn {
|
|
6
6
|
id: number;
|
|
7
7
|
billingId: number;
|
|
8
8
|
userId: number;
|
|
@@ -3,9 +3,9 @@ import { BillingTypeEnum } from "../enums/billing-type.enum";
|
|
|
3
3
|
import { BillingStatusEnum } from "../enums/billing.status.enum";
|
|
4
4
|
import { BillingInvoiceTypeEnum } from "../enums/billing_invoice_type.enum";
|
|
5
5
|
import { PaymentStatusEnum } from "../enums/payment_status.enum";
|
|
6
|
-
import {
|
|
6
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
7
7
|
import { EntityEnum, IEntityFilterData } from "./entity.utils.interface";
|
|
8
|
-
export interface IBillingEntity extends
|
|
8
|
+
export interface IBillingEntity extends IEntityAuditColumn {
|
|
9
9
|
id: number;
|
|
10
10
|
startDate: string;
|
|
11
11
|
endDate: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BillingPaymentType } from "../enums/billing.payment.type.enum";
|
|
2
|
-
import {
|
|
2
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
3
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
4
|
-
export interface IBillingPaymentEntity extends
|
|
4
|
+
export interface IBillingPaymentEntity extends IEntityAuditColumn {
|
|
5
5
|
id: number;
|
|
6
6
|
billingId: number;
|
|
7
7
|
bankId: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BillingTransactionType } from "../enums/billing.transaction.enum";
|
|
2
|
-
import {
|
|
2
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
3
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
4
|
-
export interface IBillingTransactionEntity extends
|
|
4
|
+
export interface IBillingTransactionEntity extends IEntityAuditColumn {
|
|
5
5
|
id: number;
|
|
6
6
|
billingId: number;
|
|
7
7
|
type: BillingTransactionType;
|
|
@@ -31,7 +31,6 @@ import { IConfigurationEntity } from "./configuration.entity.interface";
|
|
|
31
31
|
import { ICountryEntity } from "./country.entity.interface";
|
|
32
32
|
import { ICronJobsEntity } from "./cron-job.entity.interface";
|
|
33
33
|
import { IDesignationEntity } from "./designation.entity.interface";
|
|
34
|
-
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
35
34
|
import { IExpenseTypeEntity } from "./expense_type.entity.interface";
|
|
36
35
|
import { IHolidayListEntity } from "./holiday-list.entity.interface";
|
|
37
36
|
import { IHolidayEntity } from "./holiday.entity.interface";
|
|
@@ -252,7 +251,7 @@ export type IEntitySearchSinceConstraint = {
|
|
|
252
251
|
columnKey: string;
|
|
253
252
|
value: number;
|
|
254
253
|
};
|
|
255
|
-
export interface IBaseHistoryEntity extends
|
|
254
|
+
export interface IBaseHistoryEntity extends IAuditColumnEntity {
|
|
256
255
|
id: number;
|
|
257
256
|
entityId: number;
|
|
258
257
|
operation: HistoryOperationEnum;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReimbursementActionEnum, ReimbursementBillingPresentEnum, ReimbursementBillingTypeEnum, ReimbursementExpenseActionEnum, ReimbursementExpenseState, ReimbursementIncurredByEnum, ReimbursementPaymentStatusEnum, ReimbursementStatusEnum } from "../enums/reimbursement.entity.enum";
|
|
2
|
-
import {
|
|
2
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
3
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
4
4
|
import { IProjectUserMappingEntity } from "./project.entity.interface";
|
|
5
|
-
export interface IReimbursementEntity extends
|
|
5
|
+
export interface IReimbursementEntity extends IEntityAuditColumn {
|
|
6
6
|
id: number;
|
|
7
7
|
billingType: ReimbursementBillingTypeEnum;
|
|
8
8
|
billDate: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IBillingReimbursementExpenseApiEntity } from "../../api";
|
|
2
1
|
import { BillingReimbursementExpenseImpactEnum } from "../enums/billing-reimburement-expense-impact.enum";
|
|
3
2
|
import { BillingReimbursementExpenseChangedStatusEnum } from "../enums/billing-reimbursement-expense-change-status.enum";
|
|
3
|
+
import { IBillingReimbursementExpenseEntity } from "../interface/billing-reimbursement-expense.entity.interface";
|
|
4
4
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
5
5
|
import { BaseEntityModel } from "./base.entity.model";
|
|
6
|
-
export declare class BillingReimbursementExpneseEntityModel extends BaseEntityModel<EntityEnum.BILLING_REIMBURSEMENT_EXPENSE> implements
|
|
6
|
+
export declare class BillingReimbursementExpneseEntityModel extends BaseEntityModel<EntityEnum.BILLING_REIMBURSEMENT_EXPENSE> implements IBillingReimbursementExpenseEntity {
|
|
7
7
|
id: number;
|
|
8
8
|
billingId: number;
|
|
9
9
|
userId: number;
|
|
@@ -17,9 +17,9 @@ export declare class BillingReimbursementExpneseEntityModel extends BaseEntityMo
|
|
|
17
17
|
impact?: BillingReimbursementExpenseImpactEnum;
|
|
18
18
|
updatedBy: number;
|
|
19
19
|
createdBy: number;
|
|
20
|
-
createdOn:
|
|
21
|
-
updatedOn:
|
|
20
|
+
createdOn: number;
|
|
21
|
+
updatedOn: number;
|
|
22
22
|
static relationConfigs: never[];
|
|
23
23
|
getRelationConfigs(): any[];
|
|
24
|
-
static fromApiEntity(
|
|
24
|
+
static fromApiEntity(entity: IBillingReimbursementExpenseEntity): BillingReimbursementExpneseEntityModel;
|
|
25
25
|
}
|
|
@@ -19,16 +19,16 @@ 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 = 0;
|
|
23
|
+
this.updatedOn = 0;
|
|
24
24
|
}
|
|
25
25
|
getRelationConfigs() {
|
|
26
26
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
27
27
|
}
|
|
28
|
-
static fromApiEntity(
|
|
29
|
-
const
|
|
30
|
-
Object.assign(
|
|
31
|
-
return
|
|
28
|
+
static fromApiEntity(entity) {
|
|
29
|
+
const result = new BillingReimbursementExpneseEntityModel(entity_utils_interface_1.EntityEnum.BILLING_REIMBURSEMENT_EXPENSE);
|
|
30
|
+
Object.assign(result, entity);
|
|
31
|
+
return result;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
exports.BillingReimbursementExpneseEntityModel = BillingReimbursementExpneseEntityModel;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IBillingFlowConfig } from "../../api";
|
|
2
2
|
import { CurrencyEnum } from "../../enums";
|
|
3
3
|
import { BillingTypeEnum } from "../enums/billing-type.enum";
|
|
4
4
|
import { BillingActionsEnum } from "../enums/billing.action.enum";
|
|
5
5
|
import { BillingStatusEnum } from "../enums/billing.status.enum";
|
|
6
6
|
import { BillingInvoiceTypeEnum } from "../enums/billing_invoice_type.enum";
|
|
7
7
|
import { PaymentStatusEnum } from "../enums/payment_status.enum";
|
|
8
|
+
import { IBillingEntity } from "../interface/billing.entity.interface";
|
|
8
9
|
import { EntityEnum, EnumEntityType } from "../interface/entity.utils.interface";
|
|
9
10
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
10
11
|
import { BankEntityModel } from "./bank.entity.model";
|
|
@@ -24,7 +25,7 @@ export declare enum BillingStatusCategoryEnumForUI {
|
|
|
24
25
|
CLIENT_REVIEW_STATUS = "CLIENT_REVIEW_STATUS",
|
|
25
26
|
PAYMENT_STATUS = "PAYMENT_STATUS"
|
|
26
27
|
}
|
|
27
|
-
export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLING> implements
|
|
28
|
+
export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLING> implements IBillingEntity {
|
|
28
29
|
id: number;
|
|
29
30
|
startDate: string;
|
|
30
31
|
endDate: string;
|
|
@@ -48,8 +49,8 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
|
|
|
48
49
|
currency: CurrencyEnum;
|
|
49
50
|
createdBy: number;
|
|
50
51
|
updatedBy: number;
|
|
51
|
-
createdOn:
|
|
52
|
-
updatedOn:
|
|
52
|
+
createdOn: number;
|
|
53
|
+
updatedOn: number;
|
|
53
54
|
type: BillingTypeEnum;
|
|
54
55
|
project?: ProjectEntityModel;
|
|
55
56
|
client?: ClientEntityModel;
|
|
@@ -68,7 +69,7 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
|
|
|
68
69
|
EntityEnum.BILLING_TIMESHEET,
|
|
69
70
|
EntityEnum.BANK
|
|
70
71
|
], EnumEntityType<EntityEnum.BILLING>>;
|
|
71
|
-
static
|
|
72
|
+
static fromEntity(entity: IBillingEntity): BillingEntityModel;
|
|
72
73
|
getStatusCategory(): BillingStatusCategoryEnumForUI;
|
|
73
74
|
getStatusLabel(): string;
|
|
74
75
|
getTotalAmountInINR(): number;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BillingEntityModel = exports.BillingStatusCategoryEnumForUI = void 0;
|
|
4
4
|
const enums_1 = require("../../enums");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
5
6
|
const billing_type_enum_1 = require("../enums/billing-type.enum");
|
|
6
7
|
const billing_status_enum_1 = require("../enums/billing.status.enum");
|
|
7
8
|
const billing_invoice_type_enum_1 = require("../enums/billing_invoice_type.enum");
|
|
@@ -39,14 +40,14 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
39
40
|
this.currency = enums_1.CurrencyEnum.INR;
|
|
40
41
|
this.createdBy = 0;
|
|
41
42
|
this.updatedBy = 0;
|
|
42
|
-
this.createdOn =
|
|
43
|
-
this.updatedOn =
|
|
43
|
+
this.createdOn = 0;
|
|
44
|
+
this.updatedOn = 0;
|
|
44
45
|
this.type = billing_type_enum_1.BillingTypeEnum.INVOICE;
|
|
45
46
|
}
|
|
46
|
-
static
|
|
47
|
-
const
|
|
48
|
-
Object.assign(
|
|
49
|
-
return
|
|
47
|
+
static fromEntity(entity) {
|
|
48
|
+
const result = new BillingEntityModel(entity_utils_interface_1.EntityEnum.BILLING);
|
|
49
|
+
Object.assign(result, entity);
|
|
50
|
+
return result;
|
|
50
51
|
}
|
|
51
52
|
getStatusCategory() {
|
|
52
53
|
return this.mapStatusCategory(this.status);
|
|
@@ -63,7 +64,7 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
63
64
|
return `${this.formatDate(this.startDate)} - ${this.formatDate(this.endDate, true)}`;
|
|
64
65
|
}
|
|
65
66
|
getBillDate() {
|
|
66
|
-
return new Date(this.createdOn);
|
|
67
|
+
return new Date((0, utils_1.epochToDateTime)(this.createdOn));
|
|
67
68
|
}
|
|
68
69
|
mapOverdue(configValue) {
|
|
69
70
|
var _a, _b, _c, _d;
|
|
@@ -52,10 +52,10 @@ function parseEntities(json, baseEntity, entityMap) {
|
|
|
52
52
|
const entityFromJsonMappings = {
|
|
53
53
|
[entity_utils_interface_1.EntityEnum.PROJECT]: project_entity_model_1.ProjectEntityModel.fromEntity,
|
|
54
54
|
[entity_utils_interface_1.EntityEnum.CLIENT]: client_entity_model_1.ClientEntityModel.fromEntity,
|
|
55
|
-
[entity_utils_interface_1.EntityEnum.BILLING]: billing_entity_model_1.BillingEntityModel.
|
|
55
|
+
[entity_utils_interface_1.EntityEnum.BILLING]: billing_entity_model_1.BillingEntityModel.fromEntity,
|
|
56
56
|
[entity_utils_interface_1.EntityEnum.USER]: user_entity_model_1.UserEntityModel.fromEntity,
|
|
57
57
|
[entity_utils_interface_1.EntityEnum.PROJECT_USER_MAPPING]: project_user_mapping_entity_model_1.ProjectUserMappingEntityModel.fromEntity,
|
|
58
|
-
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT]: reimbursement_entity_model_1.ReimbursementEntityModel.
|
|
58
|
+
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT]: reimbursement_entity_model_1.ReimbursementEntityModel.fromEntity,
|
|
59
59
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT_EXPENSE]: reimbursement_expense_entity_model_1.ReimbursementExpenseEntityModel.fromApiEntity,
|
|
60
60
|
[entity_utils_interface_1.EntityEnum.BILLING_REIMBURSEMENT_EXPENSE]: billing_reimbursement_expense_entity_model_1.BillingReimbursementExpneseEntityModel.fromApiEntity,
|
|
61
61
|
[entity_utils_interface_1.EntityEnum.CLIENT_AFFILIATE]: client_affiliate_entity_model_1.ClientAffiliateEntityModel.fromEntity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IReimbursementApiEntity } from "../../api";
|
|
2
1
|
import { ReimbursementBillingPresentEnum, ReimbursementBillingTypeEnum, ReimbursementIncurredByEnum, ReimbursementPaymentStatusEnum, ReimbursementStatusEnum } from "../enums/reimbursement.entity.enum";
|
|
3
2
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
3
|
+
import { IReimbursementEntity } from "../interface/reimbursement.entity.interface";
|
|
4
4
|
import { BaseEntityModel } from "./base.entity.model";
|
|
5
|
-
export declare class ReimbursementEntityModel extends BaseEntityModel<EntityEnum.REIMBURSEMENT> implements
|
|
5
|
+
export declare class ReimbursementEntityModel extends BaseEntityModel<EntityEnum.REIMBURSEMENT> implements IReimbursementEntity {
|
|
6
6
|
id: number;
|
|
7
7
|
billingType: ReimbursementBillingTypeEnum;
|
|
8
8
|
billDate: string;
|
|
@@ -24,9 +24,9 @@ export declare class ReimbursementEntityModel extends BaseEntityModel<EntityEnum
|
|
|
24
24
|
bankId?: number;
|
|
25
25
|
createdBy: number;
|
|
26
26
|
updatedBy: number;
|
|
27
|
-
createdOn:
|
|
28
|
-
updatedOn:
|
|
27
|
+
createdOn: number;
|
|
28
|
+
updatedOn: number;
|
|
29
29
|
static relationConfigs: never[];
|
|
30
30
|
getRelationConfigs(): any[];
|
|
31
|
-
static
|
|
31
|
+
static fromEntity(entity: IReimbursementEntity): ReimbursementEntityModel;
|
|
32
32
|
}
|
|
@@ -18,16 +18,16 @@ class ReimbursementEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
18
18
|
this.paymentStatus = reimbursement_entity_enum_1.ReimbursementPaymentStatusEnum.UNPAID;
|
|
19
19
|
this.createdBy = 0;
|
|
20
20
|
this.updatedBy = 0;
|
|
21
|
-
this.createdOn =
|
|
22
|
-
this.updatedOn =
|
|
21
|
+
this.createdOn = 0;
|
|
22
|
+
this.updatedOn = 0;
|
|
23
23
|
}
|
|
24
24
|
getRelationConfigs() {
|
|
25
25
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
26
26
|
}
|
|
27
|
-
static
|
|
28
|
-
const
|
|
29
|
-
Object.assign(
|
|
30
|
-
return
|
|
27
|
+
static fromEntity(entity) {
|
|
28
|
+
const result = new ReimbursementEntityModel(entity_utils_interface_1.EntityEnum.REIMBURSEMENT);
|
|
29
|
+
Object.assign(result, entity);
|
|
30
|
+
return result;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.ReimbursementEntityModel = ReimbursementEntityModel;
|
|
@@ -269,5 +269,36 @@ 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
|
+
/**
|
|
273
|
+
* Converts an epoch timestamp (in seconds) into a formatted date-time string.
|
|
274
|
+
*
|
|
275
|
+
* @param {number} epoch - The epoch timestamp in seconds (number of seconds since 1970-01-01 00:00:00 UTC).
|
|
276
|
+
*
|
|
277
|
+
* @returns {string} The formatted date-time string in "yyyy-MM-dd HH:mm:ss" format.
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* epochToDateTime(1759211965);
|
|
281
|
+
* // Returns: "2025-09-30 11:19:25"
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* epochToDateTime(0);
|
|
285
|
+
* // Returns: "1970-01-01 05:30:00" // if your system timezone is IST (UTC+5:30)
|
|
286
|
+
*/
|
|
272
287
|
export declare function epochToDateTime(epoch: number): string;
|
|
288
|
+
/**
|
|
289
|
+
* Converts a JavaScript Date object into epoch seconds (UNIX timestamp).
|
|
290
|
+
*
|
|
291
|
+
* @param {Date} date - A JavaScript Date instance.
|
|
292
|
+
*
|
|
293
|
+
* @returns {number} The corresponding epoch time in seconds (number of seconds since 1970-01-01 00:00:00 UTC).
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* toEpochSeconds(new Date("2025-09-30 11:19:25"));
|
|
297
|
+
* // Returns: 1759211965
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* toEpochSeconds(new Date());
|
|
301
|
+
* // Returns: current epoch time in seconds
|
|
302
|
+
*/
|
|
303
|
+
export declare function toEpochSeconds(date: Date): number;
|
|
273
304
|
export declare function dateTimeToEpoch(dateInput: string | Date): number;
|
|
@@ -40,6 +40,7 @@ exports.getDecimalNumberFromString = getDecimalNumberFromString;
|
|
|
40
40
|
exports.hasProperty = hasProperty;
|
|
41
41
|
exports.convertToNumberType = convertToNumberType;
|
|
42
42
|
exports.epochToDateTime = epochToDateTime;
|
|
43
|
+
exports.toEpochSeconds = toEpochSeconds;
|
|
43
44
|
exports.dateTimeToEpoch = dateTimeToEpoch;
|
|
44
45
|
const date_fns_1 = require("date-fns");
|
|
45
46
|
const util_constants_1 = require("../constants/util.constants");
|
|
@@ -567,10 +568,43 @@ function convertToNumberType(value) {
|
|
|
567
568
|
}
|
|
568
569
|
return num;
|
|
569
570
|
}
|
|
571
|
+
/**
|
|
572
|
+
* Converts an epoch timestamp (in seconds) into a formatted date-time string.
|
|
573
|
+
*
|
|
574
|
+
* @param {number} epoch - The epoch timestamp in seconds (number of seconds since 1970-01-01 00:00:00 UTC).
|
|
575
|
+
*
|
|
576
|
+
* @returns {string} The formatted date-time string in "yyyy-MM-dd HH:mm:ss" format.
|
|
577
|
+
*
|
|
578
|
+
* @example
|
|
579
|
+
* epochToDateTime(1759211965);
|
|
580
|
+
* // Returns: "2025-09-30 11:19:25"
|
|
581
|
+
*
|
|
582
|
+
* @example
|
|
583
|
+
* epochToDateTime(0);
|
|
584
|
+
* // Returns: "1970-01-01 05:30:00" // if your system timezone is IST (UTC+5:30)
|
|
585
|
+
*/
|
|
570
586
|
function epochToDateTime(epoch) {
|
|
571
587
|
const date = new Date(epoch * 1000); // JS Date expects milliseconds
|
|
572
588
|
return (0, date_fns_1.format)(date, "yyyy-MM-dd HH:mm:ss");
|
|
573
589
|
}
|
|
590
|
+
/**
|
|
591
|
+
* Converts a JavaScript Date object into epoch seconds (UNIX timestamp).
|
|
592
|
+
*
|
|
593
|
+
* @param {Date} date - A JavaScript Date instance.
|
|
594
|
+
*
|
|
595
|
+
* @returns {number} The corresponding epoch time in seconds (number of seconds since 1970-01-01 00:00:00 UTC).
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* toEpochSeconds(new Date("2025-09-30 11:19:25"));
|
|
599
|
+
* // Returns: 1759211965
|
|
600
|
+
*
|
|
601
|
+
* @example
|
|
602
|
+
* toEpochSeconds(new Date());
|
|
603
|
+
* // Returns: current epoch time in seconds
|
|
604
|
+
*/
|
|
605
|
+
function toEpochSeconds(date) {
|
|
606
|
+
return Math.floor(date.getTime() / 1000);
|
|
607
|
+
}
|
|
574
608
|
function dateTimeToEpoch(dateInput) {
|
|
575
609
|
const date = typeof dateInput === "string" ? new Date(dateInput) : dateInput;
|
|
576
610
|
return Math.floor(date.getTime() / 1000);
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IApiEntity, IBillingReimbursementExpenseEntity } from "../../entities";
|
|
2
|
-
export type IBillingReimbursementExpenseApiEntity = IApiEntity<IBillingReimbursementExpenseEntity>;
|
|
3
|
-
export type IBillingReimbursementExpenseApiEntityArray = IBillingReimbursementExpenseApiEntity[];
|
/package/dist/src/api/interface/{billing-reimbursement-expense.api.js → bank_history.api.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|