law-common 10.18.2-beta.6 → 10.19.1-beta.1
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/billing-transaction-history.api.d.ts +3 -0
- package/dist/src/api/interface/billing-transaction-history.api.js +2 -0
- package/dist/src/api/interface/billing.create.dto.interface.d.ts +2 -2
- package/dist/src/api/interface/billing.transaction.create.dto.interface.d.ts +4 -2
- package/dist/src/api/interface/billing.transaction.entity.response.d.ts +11 -1
- package/dist/src/api/interface/billing.transaction.update.dto.interface.d.ts +5 -1
- package/dist/src/api/interface/billing.update.dto.interface.d.ts +5 -3
- package/dist/src/constants/entity_constants.d.ts +1 -0
- package/dist/src/constants/entity_constants.js +5 -1
- package/dist/src/entities/enums/billing-transaction-action.enum.d.ts +11 -0
- package/dist/src/entities/enums/billing-transaction-action.enum.js +15 -0
- package/dist/src/entities/enums/billing-transaction-status.enum.d.ts +6 -0
- package/dist/src/entities/enums/billing-transaction-status.enum.js +10 -0
- package/dist/src/entities/index.d.ts +5 -1
- package/dist/src/entities/index.js +5 -1
- package/dist/src/entities/interface/billing-transaction-history.entity.d.ts +7 -0
- package/dist/src/entities/interface/billing-transaction-history.entity.js +2 -0
- package/dist/src/entities/interface/billing.entity.interface.d.ts +1 -0
- package/dist/src/entities/interface/billing_timesheet.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/billing_transaction.entity.interface.d.ts +7 -0
- package/dist/src/entities/interface/entity.utils.interface.d.ts +12 -7
- package/dist/src/entities/interface/entity.utils.interface.js +1 -0
- package/dist/src/entities/model/bank.entity.model.d.ts +4 -1
- package/dist/src/entities/model/bank.entity.model.js +8 -2
- package/dist/src/entities/model/base.entity.model.d.ts +2 -8
- package/dist/src/entities/model/base.entity.model.js +35 -43
- package/dist/src/entities/model/billing-timesheet.entity.model.d.ts +26 -0
- package/dist/src/entities/model/billing-timesheet.entity.model.js +36 -0
- package/dist/src/entities/model/billing.entity.model.d.ts +7 -1
- package/dist/src/entities/model/billing.entity.model.js +18 -0
- package/dist/src/entities/model/client-affiliate.entity.model.d.ts +19 -0
- package/dist/src/entities/model/client-affiliate.entity.model.js +30 -0
- package/dist/src/entities/model/designation.entity.model.d.ts +4 -1
- package/dist/src/entities/model/designation.entity.model.js +8 -2
- package/dist/src/entities/model/entity.model.interface.d.ts +2 -2
- package/dist/src/entities/model/entity.model.interface.js +12 -7
- package/dist/src/entities/model/holiday.entity.model.d.ts +1 -14
- package/dist/src/entities/model/holiday.entity.model.js +42 -25
- package/dist/src/entities/model/leave.entity.model.d.ts +3 -50
- package/dist/src/entities/model/leave.entity.model.js +21 -154
- package/dist/src/entities/model/task.entity.model.d.ts +4 -1
- package/dist/src/entities/model/task.entity.model.js +8 -2
- package/dist/src/entities/model/timesheet.entity.model.d.ts +4 -1
- package/dist/src/entities/model/timesheet.entity.model.js +8 -2
- package/dist/src/entities/model/user.entity.model.d.ts +4 -1
- package/dist/src/entities/model/user.entity.model.js +8 -2
- package/dist/src/utils/helper.fn.util.d.ts +28 -0
- package/dist/src/utils/helper.fn.util.js +47 -2
- package/dist/src/utils/index.d.ts +0 -2
- package/dist/src/utils/index.js +0 -2
- package/dist/src/utils/string.util.d.ts +0 -1
- package/dist/src/utils/string.util.js +0 -14
- package/package.json +33 -33
- package/dist/src/entities/model/leave_count.entity.model.d.ts +0 -19
- package/dist/src/entities/model/leave_count.entity.model.js +0 -60
- package/dist/src/utils/entity.flow.util.d.ts +0 -30
- package/dist/src/utils/entity.flow.util.js +0 -54
package/dist/src/api/index.d.ts
CHANGED
|
@@ -83,3 +83,4 @@ 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
85
|
export * from "./interface/project-user-mapping.entity.api";
|
|
86
|
+
export * from "./interface/billing-transaction-history.api";
|
package/dist/src/api/index.js
CHANGED
|
@@ -99,3 +99,4 @@ __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
101
|
__exportStar(require("./interface/project-user-mapping.entity.api"), exports);
|
|
102
|
+
__exportStar(require("./interface/billing-transaction-history.api"), exports);
|
|
@@ -16,7 +16,7 @@ export interface IBillingCreateDtoExtra {
|
|
|
16
16
|
}
|
|
17
17
|
export interface IBillingTimesheetUnchangedDto {
|
|
18
18
|
id: number;
|
|
19
|
-
amount
|
|
19
|
+
amount?: number;
|
|
20
20
|
}
|
|
21
21
|
export interface IBillingTimesheetUpdateDeleteDetailDto {
|
|
22
22
|
id: number;
|
|
@@ -24,7 +24,7 @@ export interface IBillingTimesheetUpdateDeleteDetailDto {
|
|
|
24
24
|
description: string;
|
|
25
25
|
date: string;
|
|
26
26
|
duration: number;
|
|
27
|
-
amount
|
|
27
|
+
amount?: number;
|
|
28
28
|
impact: BillingImpactEnum;
|
|
29
29
|
amendmentPurpose: string;
|
|
30
30
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { IBillingTransactionEntity, IEntityCreateDto } from "../../entities";
|
|
2
|
-
export
|
|
1
|
+
import { BillingTransactionStatusEnum, IBillingTransactionEntity, IEntityCreateDto } from "../../entities";
|
|
2
|
+
export type IBillingTransactionExclude = "status";
|
|
3
|
+
export interface IBillingTransactionCreateDto extends Omit<IEntityCreateDto<IBillingTransactionEntity>, IBillingTransactionExclude> {
|
|
4
|
+
status?: BillingTransactionStatusEnum;
|
|
3
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiEntity, IBillingTransactionEntity } from "../../entities";
|
|
1
|
+
import { BillingTransactionActionEnum, BillingTransactionStatusEnum, IApiEntity, IBillingTransactionEntity } from "../../entities";
|
|
2
2
|
import { IBillingApiEntity } from "./billing.entity.api";
|
|
3
3
|
export type IBillingTransactionApiEntity = IApiEntity<IBillingTransactionEntity>;
|
|
4
4
|
export type IBillingTransactionApiEntityArray = IBillingTransactionApiEntity[];
|
|
@@ -6,3 +6,13 @@ export type IBillingTransactionEntityGet = {
|
|
|
6
6
|
billingTransaction: IBillingTransactionApiEntity;
|
|
7
7
|
billing: IBillingApiEntity;
|
|
8
8
|
};
|
|
9
|
+
export type IBillingTransactionFlowConfig = {
|
|
10
|
+
[key in BillingTransactionStatusEnum]?: {
|
|
11
|
+
actions: {
|
|
12
|
+
[key in BillingTransactionActionEnum]?: {
|
|
13
|
+
permissions: string[];
|
|
14
|
+
next: () => BillingTransactionStatusEnum;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { IBillingTransactionEntity, IEntityUpdateDto } from "../../entities";
|
|
1
|
+
import { BillingTransactionActionEnum, IBillingTransactionEntity, IEntityUpdateDto } from "../../entities";
|
|
2
|
+
export interface IBillingTransactionActionDataDto {
|
|
3
|
+
action: BillingTransactionActionEnum;
|
|
4
|
+
}
|
|
2
5
|
export interface IBillingTransactionUpdateDto extends IEntityUpdateDto<IBillingTransactionEntity> {
|
|
6
|
+
actionData?: IBillingTransactionActionDataDto;
|
|
3
7
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { BillingActionsEnum, IBillingEntity, IBillingTimesheetUpdateDto, IEntityUpdateDto } from "../../entities";
|
|
2
|
-
import { IBillingEntityCreateDtoValidationData } from "./billing.create.dto.interface";
|
|
1
|
+
import { BillingActionsEnum, IBillingEntity, IBillingReimbursementExpenseUpdateDto, IBillingTimesheetUpdateDto, IEntityUpdateDto } from "../../entities";
|
|
2
|
+
import { IBillingEntityCreateDtoValidationData, IBillingParticulars } from "./billing.create.dto.interface";
|
|
3
3
|
export interface IBillingUpdateDto extends IEntityUpdateDto<IBillingEntity> {
|
|
4
4
|
}
|
|
5
|
-
export interface IUpdateBillingDto extends IBillingUpdateDto {
|
|
5
|
+
export interface IUpdateBillingDto extends Omit<IBillingUpdateDto, "particulars"> {
|
|
6
6
|
action?: BillingActionsEnum;
|
|
7
7
|
timesheets?: IBillingTimesheetUpdateDto[];
|
|
8
|
+
reimbursementExpenses?: IBillingReimbursementExpenseUpdateDto[];
|
|
9
|
+
particulars?: IBillingParticulars;
|
|
8
10
|
}
|
|
9
11
|
export interface IBillingUpdateDtoValidationData extends IBillingEntityCreateDtoValidationData {
|
|
10
12
|
billingEntity: IBillingEntity;
|
|
@@ -12,3 +12,4 @@ export declare const systemUsers: string[];
|
|
|
12
12
|
export declare const reimbursementExpenseProjectUserInactiveBuffer: number;
|
|
13
13
|
export declare const annualPaidLeaves = 24;
|
|
14
14
|
export declare const designationPriorityOrder: Record<string, number>;
|
|
15
|
+
export declare const allowedProjectUpdateBillingStatuses: BillingStatusEnum[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.designationPriorityOrder = exports.annualPaidLeaves = exports.reimbursementExpenseProjectUserInactiveBuffer = exports.systemUsers = exports.usersToExcludeFromSearchResponse = exports.freezeTimesheetAfterBillingStatus = exports.leaveImplicitDays = exports.reimbursementPaymentProcessorPermissionName = exports.toDoListMinimumEstimatedDuration = exports.timesheetMinimumTotalDuration = exports.timesheetEnterThreshold = exports.timesheetThreshold = exports.timesheetViewThreshold = void 0;
|
|
3
|
+
exports.allowedProjectUpdateBillingStatuses = exports.designationPriorityOrder = exports.annualPaidLeaves = exports.reimbursementExpenseProjectUserInactiveBuffer = exports.systemUsers = exports.usersToExcludeFromSearchResponse = exports.freezeTimesheetAfterBillingStatus = exports.leaveImplicitDays = exports.reimbursementPaymentProcessorPermissionName = exports.toDoListMinimumEstimatedDuration = exports.timesheetMinimumTotalDuration = exports.timesheetEnterThreshold = exports.timesheetThreshold = exports.timesheetViewThreshold = void 0;
|
|
4
4
|
const entities_1 = require("../entities");
|
|
5
5
|
exports.timesheetViewThreshold = "timesheetViewThreshold";
|
|
6
6
|
exports.timesheetThreshold = "timesheetThreshold";
|
|
@@ -20,3 +20,7 @@ exports.designationPriorityOrder = {
|
|
|
20
20
|
seniorAssociate: 3,
|
|
21
21
|
associate: 4,
|
|
22
22
|
};
|
|
23
|
+
exports.allowedProjectUpdateBillingStatuses = [
|
|
24
|
+
entities_1.BillingStatusEnum.SETTLED,
|
|
25
|
+
entities_1.BillingStatusEnum.CANCELLED,
|
|
26
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum BillingTransactionActionEnum {
|
|
2
|
+
UPDATE_PAYMENT = "updatePayment",
|
|
3
|
+
WRITE_OFF = "writeOff",
|
|
4
|
+
CREDIT_NOTE = "creditNote",
|
|
5
|
+
TDS = "tds",
|
|
6
|
+
WRITE_OFF_APPROVAL = "writeOffApproval",
|
|
7
|
+
CREDIT_NOTE_APPROVAL = "creditNoteApproval",
|
|
8
|
+
APPROVE = "approve",
|
|
9
|
+
REJECT = "reject",
|
|
10
|
+
EDIT = "edit"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingTransactionActionEnum = void 0;
|
|
4
|
+
var BillingTransactionActionEnum;
|
|
5
|
+
(function (BillingTransactionActionEnum) {
|
|
6
|
+
BillingTransactionActionEnum["UPDATE_PAYMENT"] = "updatePayment";
|
|
7
|
+
BillingTransactionActionEnum["WRITE_OFF"] = "writeOff";
|
|
8
|
+
BillingTransactionActionEnum["CREDIT_NOTE"] = "creditNote";
|
|
9
|
+
BillingTransactionActionEnum["TDS"] = "tds";
|
|
10
|
+
BillingTransactionActionEnum["WRITE_OFF_APPROVAL"] = "writeOffApproval";
|
|
11
|
+
BillingTransactionActionEnum["CREDIT_NOTE_APPROVAL"] = "creditNoteApproval";
|
|
12
|
+
BillingTransactionActionEnum["APPROVE"] = "approve";
|
|
13
|
+
BillingTransactionActionEnum["REJECT"] = "reject";
|
|
14
|
+
BillingTransactionActionEnum["EDIT"] = "edit";
|
|
15
|
+
})(BillingTransactionActionEnum || (exports.BillingTransactionActionEnum = BillingTransactionActionEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingTransactionStatusEnum = void 0;
|
|
4
|
+
var BillingTransactionStatusEnum;
|
|
5
|
+
(function (BillingTransactionStatusEnum) {
|
|
6
|
+
BillingTransactionStatusEnum["APPROVED"] = "approved";
|
|
7
|
+
BillingTransactionStatusEnum["REJECTED"] = "rejected";
|
|
8
|
+
BillingTransactionStatusEnum["WRITEOFF_APPROVAL_PENDING"] = "writeoff_approval_pending";
|
|
9
|
+
BillingTransactionStatusEnum["CREDITNOTE_APPROVAL_PENDING"] = "creditnote_approval_pending";
|
|
10
|
+
})(BillingTransactionStatusEnum || (exports.BillingTransactionStatusEnum = BillingTransactionStatusEnum = {}));
|
|
@@ -66,7 +66,6 @@ export * from "./interface/intermediary_bank.entity.interface";
|
|
|
66
66
|
export * from "./interface/holiday-list.entity.interface";
|
|
67
67
|
export * from "./interface/holiday.entity.interface";
|
|
68
68
|
export * from "./model/leave.entity.model";
|
|
69
|
-
export * from "./model/leave_count.entity.model";
|
|
70
69
|
export * from "./model/holiday.entity.model";
|
|
71
70
|
export * from "./enums/cron-jobs-name.enum";
|
|
72
71
|
export * from "./enums/cron-jobs-status.enum";
|
|
@@ -96,3 +95,8 @@ export * from "./model/configuration.model";
|
|
|
96
95
|
export * from "./model/designation.entity.model";
|
|
97
96
|
export * from "./model/timesheet.entity.model";
|
|
98
97
|
export * from "./model/user.entity.model";
|
|
98
|
+
export * from "./model/client-affiliate.entity.model";
|
|
99
|
+
export * from "./model/billing-timesheet.entity.model";
|
|
100
|
+
export * from "./enums/billing-transaction-action.enum";
|
|
101
|
+
export * from "./enums/billing-transaction-status.enum";
|
|
102
|
+
export * from "./interface/billing-transaction-history.entity";
|
|
@@ -83,7 +83,6 @@ __exportStar(require("./interface/intermediary_bank.entity.interface"), exports)
|
|
|
83
83
|
__exportStar(require("./interface/holiday-list.entity.interface"), exports);
|
|
84
84
|
__exportStar(require("./interface/holiday.entity.interface"), exports);
|
|
85
85
|
__exportStar(require("./model/leave.entity.model"), exports);
|
|
86
|
-
__exportStar(require("./model/leave_count.entity.model"), exports);
|
|
87
86
|
__exportStar(require("./model/holiday.entity.model"), exports);
|
|
88
87
|
__exportStar(require("./enums/cron-jobs-name.enum"), exports);
|
|
89
88
|
__exportStar(require("./enums/cron-jobs-status.enum"), exports);
|
|
@@ -113,3 +112,8 @@ __exportStar(require("./model/configuration.model"), exports);
|
|
|
113
112
|
__exportStar(require("./model/designation.entity.model"), exports);
|
|
114
113
|
__exportStar(require("./model/timesheet.entity.model"), exports);
|
|
115
114
|
__exportStar(require("./model/user.entity.model"), exports);
|
|
115
|
+
__exportStar(require("./model/client-affiliate.entity.model"), exports);
|
|
116
|
+
__exportStar(require("./model/billing-timesheet.entity.model"), exports);
|
|
117
|
+
__exportStar(require("./enums/billing-transaction-action.enum"), exports);
|
|
118
|
+
__exportStar(require("./enums/billing-transaction-status.enum"), exports);
|
|
119
|
+
__exportStar(require("./interface/billing-transaction-history.entity"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IBaseHistoryEntity, IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
|
|
2
|
+
export interface IBillingTransactionHistoryEntity extends IBaseHistoryEntity {
|
|
3
|
+
}
|
|
4
|
+
export interface IBillingTransactionHistoryCreateDto extends IEntityCreateDto<IBillingTransactionHistoryEntity> {
|
|
5
|
+
}
|
|
6
|
+
export interface IBillingTransactionHistorySearchDto extends IEntityFilterData<IBillingTransactionHistoryEntity> {
|
|
7
|
+
}
|
|
@@ -13,7 +13,7 @@ export interface IBillingTimesheetEntity extends IAuditColumnEntity {
|
|
|
13
13
|
task: string;
|
|
14
14
|
description?: string;
|
|
15
15
|
totalDuration: number;
|
|
16
|
-
totalAmount
|
|
16
|
+
totalAmount?: number;
|
|
17
17
|
impact: BillingImpactEnum;
|
|
18
18
|
amendmentPurpose?: string;
|
|
19
19
|
changedStatus: BillingTimesheetStatusEnum;
|
|
@@ -23,7 +23,7 @@ export interface IBillingTimesheetEntityCreateDto extends IEntityCreateDto<IBill
|
|
|
23
23
|
export interface IBillingTimesheetDetail extends IAuditColumnEntity {
|
|
24
24
|
timesheetId: number;
|
|
25
25
|
billingId: number;
|
|
26
|
-
totalAmount
|
|
26
|
+
totalAmount?: number;
|
|
27
27
|
changedStatus: BillingTimesheetStatusEnum;
|
|
28
28
|
impact: BillingImpactEnum;
|
|
29
29
|
amendmentPurpose?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BillingTransactionStatusEnum } from "../enums/billing-transaction-status.enum";
|
|
1
2
|
import { BillingTransactionType } from "../enums/billing.transaction.enum";
|
|
2
3
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
3
4
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
@@ -7,5 +8,11 @@ export interface IBillingTransactionEntity extends IAuditColumnEntity {
|
|
|
7
8
|
type: BillingTransactionType;
|
|
8
9
|
amount: number;
|
|
9
10
|
details: string;
|
|
11
|
+
bankCharges?: number;
|
|
12
|
+
bankId?: number;
|
|
13
|
+
paymentDate?: number;
|
|
14
|
+
referenceNo?: string;
|
|
15
|
+
supportingDocs?: number;
|
|
16
|
+
status: BillingTransactionStatusEnum;
|
|
10
17
|
}
|
|
11
18
|
export type IBillingTransactionEntityFilterData = IEntityFilterData<IBillingTransactionEntity>;
|
|
@@ -3,21 +3,25 @@ import { ConvertToArray } from "../../misc";
|
|
|
3
3
|
import { Modify } from "../../misc/interface/modify.interface";
|
|
4
4
|
import { EntitySearchConstraintTypeEnum } from "../enums/entity_search_constraint_type.enum";
|
|
5
5
|
import { HistoryOperationEnum } from "../enums/history_operation.enum";
|
|
6
|
+
import { BankEntityModel } from "../model/bank.entity.model";
|
|
6
7
|
import { BillingReimbursementExpneseEntityModel } from "../model/billing-reimbursement-expense.entity.model";
|
|
8
|
+
import { BillingTimesheetEntityModel } from "../model/billing-timesheet.entity.model";
|
|
7
9
|
import { BillingEntityModel } from "../model/billing.entity.model";
|
|
10
|
+
import { ClientAffiliateEntityModel } from "../model/client-affiliate.entity.model";
|
|
8
11
|
import { ClientEntityModel } from "../model/client.entity.model";
|
|
9
|
-
import {
|
|
10
|
-
import { LeaveEntityModel } from "../model/leave.entity.model";
|
|
11
|
-
import { LeaveCountVirtualEntityModel } from "../model/leave_count.entity.model";
|
|
12
|
+
import { ConfigurationEntityModel } from "../model/configuration.model";
|
|
12
13
|
import { ProjectUserMappingEntityModel } from "../model/project-user-mapping.entity.model";
|
|
13
14
|
import { ProjectEntityModel } from "../model/project.entity.model";
|
|
14
15
|
import { ReimbursementExpenseEntityModel } from "../model/reimbursement-expense.entity.model";
|
|
15
16
|
import { ReimbursementEntityModel } from "../model/reimbursement.entity.model";
|
|
17
|
+
import { TaskEntityModel } from "../model/task.entity.model";
|
|
18
|
+
import { TimesheetEntityModel } from "../model/timesheet.entity.model";
|
|
16
19
|
import { UserEntityModel } from "../model/user.entity.model";
|
|
17
20
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
18
21
|
import { IBankEntity } from "./bank.entity.interface";
|
|
19
22
|
import { IBankHistoryEntity } from "./bank_history.entity.interface";
|
|
20
23
|
import { IBillingReimbursementExpenseEntity } from "./billing-reimbursement-expense.entity.interface";
|
|
24
|
+
import { IBillingTransactionHistoryEntity } from "./billing-transaction-history.entity";
|
|
21
25
|
import { IBillingEntity } from "./billing.entity.interface";
|
|
22
26
|
import { IBillingPaymentEntity } from "./billing_payment.entity.interface";
|
|
23
27
|
import { IBillingTimesheetEntity } from "./billing_timesheet.entity.interface";
|
|
@@ -118,6 +122,7 @@ export declare enum EntityEnum {
|
|
|
118
122
|
BANK_HISTORY = "bank_history",
|
|
119
123
|
BILLING_PAYMENT = "billing_payment",
|
|
120
124
|
BILLING_TRANSACTION = "billing_transaction",
|
|
125
|
+
BILLING_TRANSACTION_HISTORY = "billing_transaction_history",
|
|
121
126
|
CONFIGURATION = "configuration",
|
|
122
127
|
COUNTRY = "country",
|
|
123
128
|
EXPENSE_TYPE = "expense_type",
|
|
@@ -155,7 +160,7 @@ export type IBaseEntityApiResponse<T extends {
|
|
|
155
160
|
[K in EntityEnum | VirtualEntityEnum]?: IBaseEntityApiResponse<EnumEntityType<K>>;
|
|
156
161
|
};
|
|
157
162
|
};
|
|
158
|
-
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) & {
|
|
163
|
+
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.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : 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) & {
|
|
159
164
|
id: number;
|
|
160
165
|
};
|
|
161
166
|
export type EntityRelationConfig<T extends EntityEnum | VirtualEntityEnum> = {
|
|
@@ -278,12 +283,12 @@ export declare enum VirtualEntityEnum {
|
|
|
278
283
|
}
|
|
279
284
|
export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
|
|
280
285
|
export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
|
|
281
|
-
export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.
|
|
286
|
+
export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : UserEntityModel;
|
|
282
287
|
export type EntityMap = {
|
|
283
|
-
[key in EntityEnum
|
|
288
|
+
[key in EntityEnum]: EnumToModel<key>[];
|
|
284
289
|
};
|
|
285
290
|
export type EntityIndexMap = {
|
|
286
|
-
[key in EntityEnum
|
|
291
|
+
[key in EntityEnum]: {
|
|
287
292
|
[id: number]: EnumToModel<key>;
|
|
288
293
|
};
|
|
289
294
|
};
|
|
@@ -60,6 +60,7 @@ var EntityEnum;
|
|
|
60
60
|
EntityEnum["BANK_HISTORY"] = "bank_history";
|
|
61
61
|
EntityEnum["BILLING_PAYMENT"] = "billing_payment";
|
|
62
62
|
EntityEnum["BILLING_TRANSACTION"] = "billing_transaction";
|
|
63
|
+
EntityEnum["BILLING_TRANSACTION_HISTORY"] = "billing_transaction_history";
|
|
63
64
|
EntityEnum["CONFIGURATION"] = "configuration";
|
|
64
65
|
EntityEnum["COUNTRY"] = "country";
|
|
65
66
|
EntityEnum["EXPENSE_TYPE"] = "expense_type";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IBankApiEntity } from "../../api";
|
|
2
2
|
import { BankStatusEnum } from "../enums/bank_status.enum";
|
|
3
|
-
|
|
3
|
+
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
4
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
5
|
+
export declare class BankEntityModel extends BaseEntityModel<EntityEnum.BANK> implements IBankApiEntity {
|
|
4
6
|
id: number;
|
|
5
7
|
accountName: string;
|
|
6
8
|
organizationId: number;
|
|
@@ -17,4 +19,5 @@ export declare class BankEntityModel implements IBankApiEntity {
|
|
|
17
19
|
createdOn: string;
|
|
18
20
|
updatedOn: string;
|
|
19
21
|
static fromApiEntity(apiEntity: IBankApiEntity): BankEntityModel;
|
|
22
|
+
getRelationConfigs(): any[];
|
|
20
23
|
}
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BankEntityModel = void 0;
|
|
4
4
|
const bank_status_enum_1 = require("../enums/bank_status.enum");
|
|
5
|
-
|
|
5
|
+
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
6
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
7
|
+
class BankEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
6
8
|
constructor() {
|
|
9
|
+
super(...arguments);
|
|
7
10
|
this.id = 0;
|
|
8
11
|
this.accountName = "";
|
|
9
12
|
this.organizationId = 0;
|
|
@@ -19,9 +22,12 @@ class BankEntityModel {
|
|
|
19
22
|
this.updatedOn = "";
|
|
20
23
|
}
|
|
21
24
|
static fromApiEntity(apiEntity) {
|
|
22
|
-
const entity = new BankEntityModel();
|
|
25
|
+
const entity = new BankEntityModel(entity_utils_interface_1.EntityEnum.BANK);
|
|
23
26
|
Object.assign(entity, apiEntity);
|
|
24
27
|
return entity;
|
|
25
28
|
}
|
|
29
|
+
getRelationConfigs() {
|
|
30
|
+
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
31
|
+
}
|
|
26
32
|
}
|
|
27
33
|
exports.BankEntityModel = BankEntityModel;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { EntityEnum, EntityIndexMap
|
|
2
|
-
export declare
|
|
3
|
-
ONE = "one",
|
|
4
|
-
MANY = "many"
|
|
5
|
-
}
|
|
6
|
-
export declare abstract class BaseEntityModel<T extends EntityEnum | VirtualEntityEnum> {
|
|
1
|
+
import { EntityEnum, EntityIndexMap } from "../interface/entity.utils.interface";
|
|
2
|
+
export declare abstract class BaseEntityModel<T extends EntityEnum> {
|
|
7
3
|
protected entityName: T;
|
|
8
4
|
constructor(entityName: T);
|
|
9
5
|
abstract getRelationConfigs(): any[];
|
|
10
6
|
populateRelationsByIndex(entityIndexMap: EntityIndexMap): void;
|
|
11
7
|
static populateRelationsForEntities(entityIndexMap: EntityIndexMap, entityType: EntityEnum): void;
|
|
12
|
-
populateRelations(entityIndexMap: EntityIndexMap): void;
|
|
13
|
-
overwrite(entityIndexMap: EntityIndexMap, indexKey?: string): this;
|
|
14
8
|
}
|
|
@@ -1,56 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseEntityModel =
|
|
4
|
-
|
|
5
|
-
(function (RelationType) {
|
|
6
|
-
RelationType["ONE"] = "one";
|
|
7
|
-
RelationType["MANY"] = "many";
|
|
8
|
-
})(RelationType || (exports.RelationType = RelationType = {}));
|
|
3
|
+
exports.BaseEntityModel = void 0;
|
|
4
|
+
const relation_type_enum_1 = require("../enums/relation-type.enum");
|
|
9
5
|
class BaseEntityModel {
|
|
10
6
|
constructor(entityName) {
|
|
11
7
|
this.entityName = entityName;
|
|
12
8
|
}
|
|
13
9
|
populateRelationsByIndex(entityIndexMap) {
|
|
14
10
|
for (const relationConfig of this.getRelationConfigs() || []) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const thisKey = relationConfig.key;
|
|
18
|
-
// console.log('Populating relation for', relationConfig.name, 'on', this.entityName, relationConfig);
|
|
19
|
-
// debugger;
|
|
20
|
-
if (relationConfig.relation === RelationType.ONE) {
|
|
11
|
+
if (relationConfig.relation === relation_type_enum_1.RelationType.ONE) {
|
|
12
|
+
// @ts-ignore
|
|
21
13
|
const relatedEntities = entityIndexMap[relationConfig.name] || {};
|
|
14
|
+
// @ts-ignore
|
|
22
15
|
let foundRelatedEntities = [];
|
|
23
|
-
if (
|
|
24
|
-
const [parentKey, childKey] =
|
|
25
|
-
|
|
16
|
+
if (relationConfig.mapKeyConfig.key.includes(".")) {
|
|
17
|
+
const [parentKey, childKey] = relationConfig.mapKeyConfig.key.split(".");
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
if (this[parentKey] && this[parentKey][childKey]) {
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
foundRelatedEntities = [relatedEntities[this[parentKey][childKey]]];
|
|
22
|
+
}
|
|
26
23
|
}
|
|
27
24
|
else {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
foundRelatedEntities = Object.values(relatedEntities).filter((entity) => entity[relatedMappingKey] === this[thisMappingKey]);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
foundRelatedEntities = [];
|
|
38
|
-
}
|
|
25
|
+
foundRelatedEntities = relatedEntities[
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
this[relationConfig.mapKeyConfig.key]]
|
|
28
|
+
? // @ts-ignore
|
|
29
|
+
[relatedEntities[this[relationConfig.mapKeyConfig.key]]]
|
|
30
|
+
: [];
|
|
39
31
|
}
|
|
40
32
|
if (foundRelatedEntities.length > 1) {
|
|
41
33
|
throw new Error(`Expected one related entity for ${relationConfig.name} but found ${foundRelatedEntities.length}`);
|
|
42
34
|
}
|
|
43
35
|
if (foundRelatedEntities.length === 0) {
|
|
44
|
-
console.warn(`No related entity found for ${relationConfig.name} with ${
|
|
36
|
+
console.warn(`No related entity found for ${relationConfig.name} with ${relationConfig.mapKeyConfig.key
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
}=${this[relationConfig.mapKeyConfig.foreignKey]}`);
|
|
45
39
|
}
|
|
46
|
-
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
this[relationConfig.key] = foundRelatedEntities[0];
|
|
47
42
|
}
|
|
48
|
-
else if (relationConfig.relation === RelationType.MANY) {
|
|
49
|
-
|
|
43
|
+
else if (relationConfig.relation === relation_type_enum_1.RelationType.MANY) {
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
this[relationConfig.key] = [];
|
|
46
|
+
// @ts-ignore
|
|
50
47
|
const relatedEntities = entityIndexMap[relationConfig.name] || {};
|
|
51
48
|
for (const relatedEntity of Object.values(relatedEntities)) {
|
|
52
|
-
if (
|
|
53
|
-
|
|
49
|
+
if (
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
relatedEntity[relationConfig.mapKeyConfig.relationKey] ===
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
this[relationConfig.mapKeyConfig.key]) {
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
this[relationConfig.key].push(relatedEntity);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
@@ -58,20 +60,10 @@ class BaseEntityModel {
|
|
|
58
60
|
}
|
|
59
61
|
static populateRelationsForEntities(entityIndexMap, entityType) {
|
|
60
62
|
for (const key of Object.keys(entityIndexMap[entityType] || {})) {
|
|
63
|
+
// @ts-ignore
|
|
61
64
|
const entity = entityIndexMap[entityType][key];
|
|
62
65
|
entity.populateRelationsByIndex(entityIndexMap);
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
|
-
populateRelations(entityIndexMap) {
|
|
66
|
-
this.populateRelationsByIndex(entityIndexMap);
|
|
67
|
-
}
|
|
68
|
-
overwrite(entityIndexMap, indexKey = "id") {
|
|
69
|
-
if (this[indexKey] === undefined) {
|
|
70
|
-
console.warn(`Entity of type ${this.entityName} does not have ${indexKey}, cannot merge`);
|
|
71
|
-
return this;
|
|
72
|
-
}
|
|
73
|
-
entityIndexMap[this.entityName][this[indexKey]] = this;
|
|
74
|
-
return this;
|
|
75
|
-
}
|
|
76
68
|
}
|
|
77
69
|
exports.BaseEntityModel = BaseEntityModel;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IBillingTimesheetApiEntity } from "../../api";
|
|
2
|
+
import { BillingImpactEnum } from "../enums/billing.impact.enum";
|
|
3
|
+
import { BillingTimesheetStatusEnum } from "../enums/billing.timesheet.change.status.enum";
|
|
4
|
+
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
5
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
6
|
+
export declare class BillingTimesheetEntityModel extends BaseEntityModel<EntityEnum.BILLING_TIMESHEET> implements IBillingTimesheetApiEntity {
|
|
7
|
+
id: number;
|
|
8
|
+
billingId: number;
|
|
9
|
+
dateCode: string;
|
|
10
|
+
timesheetId: number;
|
|
11
|
+
userId: number;
|
|
12
|
+
projectId: number;
|
|
13
|
+
task: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
totalDuration: number;
|
|
16
|
+
totalAmount: number;
|
|
17
|
+
impact: BillingImpactEnum;
|
|
18
|
+
amendmentPurpose?: string;
|
|
19
|
+
changedStatus: BillingTimesheetStatusEnum;
|
|
20
|
+
createdOn: string;
|
|
21
|
+
updatedOn: string;
|
|
22
|
+
createdBy: number;
|
|
23
|
+
updatedBy: number;
|
|
24
|
+
getRelationConfigs(): any;
|
|
25
|
+
static fromApiEntity(apiEntity: IBillingTimesheetApiEntity): BillingTimesheetEntityModel;
|
|
26
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingTimesheetEntityModel = void 0;
|
|
4
|
+
const billing_impact_enum_1 = require("../enums/billing.impact.enum");
|
|
5
|
+
const billing_timesheet_change_status_enum_1 = require("../enums/billing.timesheet.change.status.enum");
|
|
6
|
+
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
7
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
8
|
+
class BillingTimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.id = 0;
|
|
12
|
+
this.billingId = 0;
|
|
13
|
+
this.dateCode = "";
|
|
14
|
+
this.timesheetId = 0;
|
|
15
|
+
this.userId = 0;
|
|
16
|
+
this.projectId = 0;
|
|
17
|
+
this.task = "";
|
|
18
|
+
this.totalDuration = 0;
|
|
19
|
+
this.totalAmount = 0;
|
|
20
|
+
this.impact = billing_impact_enum_1.BillingImpactEnum.NEUTRAL; // adjust default if needed
|
|
21
|
+
this.changedStatus = billing_timesheet_change_status_enum_1.BillingTimesheetStatusEnum.UNCHANGED;
|
|
22
|
+
this.createdOn = "";
|
|
23
|
+
this.updatedOn = "";
|
|
24
|
+
this.createdBy = 0;
|
|
25
|
+
this.updatedBy = 0;
|
|
26
|
+
}
|
|
27
|
+
getRelationConfigs() {
|
|
28
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
29
|
+
}
|
|
30
|
+
static fromApiEntity(apiEntity) {
|
|
31
|
+
const entity = new BillingTimesheetEntityModel(entity_utils_interface_1.EntityEnum.BILLING_TIMESHEET);
|
|
32
|
+
Object.assign(entity, apiEntity);
|
|
33
|
+
return entity;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.BillingTimesheetEntityModel = BillingTimesheetEntityModel;
|
|
@@ -7,8 +7,10 @@ import { BillingInvoiceTypeEnum } from "../enums/billing_invoice_type.enum";
|
|
|
7
7
|
import { PaymentStatusEnum } from "../enums/payment_status.enum";
|
|
8
8
|
import { EntityEnum, EnumEntityType } from "../interface/entity.utils.interface";
|
|
9
9
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
10
|
+
import { BankEntityModel } from "./bank.entity.model";
|
|
10
11
|
import { BaseEntityModel } from "./base.entity.model";
|
|
11
12
|
import { BillingReimbursementExpneseEntityModel } from "./billing-reimbursement-expense.entity.model";
|
|
13
|
+
import { BillingTimesheetEntityModel } from "./billing-timesheet.entity.model";
|
|
12
14
|
import { ClientEntityModel } from "./client.entity.model";
|
|
13
15
|
import { ProjectEntityModel } from "./project.entity.model";
|
|
14
16
|
import { ReimbursementExpenseEntityModel } from "./reimbursement-expense.entity.model";
|
|
@@ -55,12 +57,16 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
|
|
|
55
57
|
billOverdue?: boolean;
|
|
56
58
|
billingIdReimbursementExpense?: BillingReimbursementExpneseEntityModel[];
|
|
57
59
|
reimbursementExpense?: ReimbursementExpenseEntityModel[];
|
|
60
|
+
bank?: BankEntityModel[];
|
|
61
|
+
billingTimesheets?: BillingTimesheetEntityModel[];
|
|
58
62
|
static relationConfigs: RelationConfigs<[
|
|
59
63
|
EntityEnum.PROJECT,
|
|
60
64
|
EntityEnum.CLIENT,
|
|
61
65
|
EntityEnum.USER,
|
|
62
66
|
EntityEnum.REIMBURSEMENT_EXPENSE,
|
|
63
|
-
EntityEnum.BILLING_REIMBURSEMENT_EXPENSE
|
|
67
|
+
EntityEnum.BILLING_REIMBURSEMENT_EXPENSE,
|
|
68
|
+
EntityEnum.BILLING_TIMESHEET,
|
|
69
|
+
EntityEnum.BANK
|
|
64
70
|
], EnumEntityType<EntityEnum.BILLING>>;
|
|
65
71
|
static fromApiEntity(apiEntity: IBillingApiEntity): BillingEntityModel;
|
|
66
72
|
getStatusCategory(): BillingStatusCategoryEnumForUI;
|