law-common 10.18.1-beta.14 → 10.18.1-beta.16
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/entities/index.d.ts +2 -0
- package/dist/src/entities/index.js +2 -0
- package/dist/src/entities/interface/entity.utils.interface.d.ts +4 -1
- 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/entity.model.interface.js +8 -0
- package/package.json +1 -1
|
@@ -95,3 +95,5 @@ export * from "./model/configuration.model";
|
|
|
95
95
|
export * from "./model/designation.entity.model";
|
|
96
96
|
export * from "./model/timesheet.entity.model";
|
|
97
97
|
export * from "./model/user.entity.model";
|
|
98
|
+
export * from "./model/client-affiliate.entity.model";
|
|
99
|
+
export * from "./model/billing-timesheet.entity.model";
|
|
@@ -112,3 +112,5 @@ __exportStar(require("./model/configuration.model"), exports);
|
|
|
112
112
|
__exportStar(require("./model/designation.entity.model"), exports);
|
|
113
113
|
__exportStar(require("./model/timesheet.entity.model"), exports);
|
|
114
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);
|
|
@@ -5,13 +5,16 @@ import { EntitySearchConstraintTypeEnum } from "../enums/entity_search_constrain
|
|
|
5
5
|
import { HistoryOperationEnum } from "../enums/history_operation.enum";
|
|
6
6
|
import { BankEntityModel } from "../model/bank.entity.model";
|
|
7
7
|
import { BillingReimbursementExpneseEntityModel } from "../model/billing-reimbursement-expense.entity.model";
|
|
8
|
+
import { BillingTimesheetEntityModel } from "../model/billing-timesheet.entity.model";
|
|
8
9
|
import { BillingEntityModel } from "../model/billing.entity.model";
|
|
9
10
|
import { ClientAffiliateEntityModel } from "../model/client-affiliate.entity.model";
|
|
10
11
|
import { ClientEntityModel } from "../model/client.entity.model";
|
|
12
|
+
import { ConfigurationEntityModel } from "../model/configuration.model";
|
|
11
13
|
import { ProjectUserMappingEntityModel } from "../model/project-user-mapping.entity.model";
|
|
12
14
|
import { ProjectEntityModel } from "../model/project.entity.model";
|
|
13
15
|
import { ReimbursementExpenseEntityModel } from "../model/reimbursement-expense.entity.model";
|
|
14
16
|
import { ReimbursementEntityModel } from "../model/reimbursement.entity.model";
|
|
17
|
+
import { TaskEntityModel } from "../model/task.entity.model";
|
|
15
18
|
import { UserEntityModel } from "../model/user.entity.model";
|
|
16
19
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
17
20
|
import { IBankEntity } from "./bank.entity.interface";
|
|
@@ -277,7 +280,7 @@ export declare enum VirtualEntityEnum {
|
|
|
277
280
|
}
|
|
278
281
|
export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
|
|
279
282
|
export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
|
|
280
|
-
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 : UserEntityModel;
|
|
283
|
+
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 : UserEntityModel;
|
|
281
284
|
export type EntityMap = {
|
|
282
285
|
[key in EntityEnum]: EnumToModel<key>[];
|
|
283
286
|
};
|
|
@@ -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;
|
|
@@ -5,15 +5,19 @@ exports.getEntityIndexMap = getEntityIndexMap;
|
|
|
5
5
|
exports.populateRelationsFor = populateRelationsFor;
|
|
6
6
|
exports.parseEntities = parseEntities;
|
|
7
7
|
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
8
|
+
const bank_entity_model_1 = require("./bank.entity.model");
|
|
8
9
|
const base_entity_model_1 = require("./base.entity.model");
|
|
9
10
|
const billing_reimbursement_expense_entity_model_1 = require("./billing-reimbursement-expense.entity.model");
|
|
11
|
+
const billing_timesheet_entity_model_1 = require("./billing-timesheet.entity.model");
|
|
10
12
|
const billing_entity_model_1 = require("./billing.entity.model");
|
|
11
13
|
const client_affiliate_entity_model_1 = require("./client-affiliate.entity.model");
|
|
12
14
|
const client_entity_model_1 = require("./client.entity.model");
|
|
15
|
+
const configuration_model_1 = require("./configuration.model");
|
|
13
16
|
const project_user_mapping_entity_model_1 = require("./project-user-mapping.entity.model");
|
|
14
17
|
const project_entity_model_1 = require("./project.entity.model");
|
|
15
18
|
const reimbursement_expense_entity_model_1 = require("./reimbursement-expense.entity.model");
|
|
16
19
|
const reimbursement_entity_model_1 = require("./reimbursement.entity.model");
|
|
20
|
+
const task_entity_model_1 = require("./task.entity.model");
|
|
17
21
|
const user_entity_model_1 = require("./user.entity.model");
|
|
18
22
|
function mapToIndex(entityMap) {
|
|
19
23
|
return Object.keys(entityMap).reduce((acc, key) => {
|
|
@@ -54,6 +58,10 @@ function parseEntities(json, baseEntity, entityMap) {
|
|
|
54
58
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT_EXPENSE]: reimbursement_expense_entity_model_1.ReimbursementExpenseEntityModel.fromApiEntity,
|
|
55
59
|
[entity_utils_interface_1.EntityEnum.BILLING_REIMBURSEMENT_EXPENSE]: billing_reimbursement_expense_entity_model_1.BillingReimbursementExpneseEntityModel.fromApiEntity,
|
|
56
60
|
[entity_utils_interface_1.EntityEnum.CLIENT_AFFILIATE]: client_affiliate_entity_model_1.ClientAffiliateEntityModel.fromApiEntity,
|
|
61
|
+
[entity_utils_interface_1.EntityEnum.BANK]: bank_entity_model_1.BankEntityModel.fromApiEntity,
|
|
62
|
+
[entity_utils_interface_1.EntityEnum.CONFIGURATION]: configuration_model_1.ConfigurationEntityModel.fromApiEntity,
|
|
63
|
+
[entity_utils_interface_1.EntityEnum.TASK]: task_entity_model_1.TaskEntityModel.fromApiEntity,
|
|
64
|
+
[entity_utils_interface_1.EntityEnum.BILLING_TIMESHEET]: billing_timesheet_entity_model_1.BillingTimesheetEntityModel.fromApiEntity,
|
|
57
65
|
};
|
|
58
66
|
if (!(baseEntity in entityFromJsonMappings)) {
|
|
59
67
|
throw new Error(`Unknown entity: ${baseEntity}`);
|