law-common 10.74.0 → 10.74.1-beta.4
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 -0
- package/dist/src/api/index.js +3 -0
- package/dist/src/api/interface/moving_timesheet.create.dto.interface.d.ts +6 -0
- package/dist/src/api/interface/moving_timesheet.create.dto.interface.js +2 -0
- package/dist/src/api/interface/moving_timesheet.filter.dto.interface.d.ts +3 -0
- package/dist/src/api/interface/moving_timesheet.filter.dto.interface.js +2 -0
- package/dist/src/api/interface/moving_timesheet.update.dto.interface.d.ts +5 -0
- package/dist/src/api/interface/moving_timesheet.update.dto.interface.js +2 -0
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/index.js +1 -0
- package/dist/src/constants/timesheet.constants.d.ts +5 -0
- package/dist/src/constants/timesheet.constants.js +7 -0
- package/dist/src/entities/enums/configuration-key.enum.d.ts +10 -2
- package/dist/src/entities/enums/configuration-key.enum.js +37 -0
- package/dist/src/entities/enums/cron-jobs-name.enum.d.ts +2 -1
- package/dist/src/entities/enums/cron-jobs-name.enum.js +1 -0
- package/dist/src/entities/enums/moving_timesheet_action_enum.d.ts +4 -0
- package/dist/src/entities/enums/moving_timesheet_action_enum.js +8 -0
- package/dist/src/entities/enums/moving_timesheet_status_enum.d.ts +5 -0
- package/dist/src/entities/enums/moving_timesheet_status_enum.js +9 -0
- package/dist/src/entities/enums/timesheet.action.enum.d.ts +2 -1
- package/dist/src/entities/enums/timesheet.action.enum.js +2 -0
- package/dist/src/entities/enums/timesheet.status.enum.d.ts +2 -1
- package/dist/src/entities/enums/timesheet.status.enum.js +1 -0
- package/dist/src/entities/index.d.ts +6 -2
- package/dist/src/entities/index.js +6 -2
- package/dist/src/entities/interface/configuration.entity.interface.d.ts +2 -1
- package/dist/src/entities/interface/entity.utils.interface.d.ts +5 -2
- package/dist/src/entities/interface/entity.utils.interface.js +1 -0
- package/dist/src/entities/interface/moving_timesheet.entity.interface.d.ts +14 -0
- package/dist/src/entities/interface/moving_timesheet.entity.interface.js +2 -0
- package/dist/src/entities/interface/timesheet.entity.interface.d.ts +3 -2
- package/dist/src/entities/model/designation.entity.model.d.ts +4 -0
- package/dist/src/entities/model/designation.entity.model.js +13 -0
- package/dist/src/entities/model/entity.model.interface.js +2 -0
- package/dist/src/entities/model/moving-timesheet.entity.model.d.ts +23 -0
- package/dist/src/entities/model/moving-timesheet.entity.model.js +49 -0
- package/dist/src/entities/model/project.entity.model.d.ts +2 -0
- package/dist/src/entities/model/project.entity.model.js +6 -0
- package/dist/src/entities/model/timesheet.entity.model.d.ts +6 -0
- package/dist/src/entities/model/timesheet.entity.model.js +17 -0
- package/dist/src/entities/model/user.entity.model.d.ts +3 -1
- package/dist/src/entities/model/user.entity.model.js +9 -0
- package/dist/src/enums/error.key.enum.d.ts +3 -1
- package/dist/src/enums/error.key.enum.js +2 -0
- package/dist/src/utils/models/date-code.model.util.d.ts +4 -0
- package/dist/src/utils/models/date-code.model.util.js +13 -0
- package/package.json +1 -1
package/dist/src/api/index.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ export * from "./interface/office.location.create.dto.interface";
|
|
|
21
21
|
export * from "./interface/office.location.entity.response";
|
|
22
22
|
export * from "./interface/office.Location.update.dto.interface";
|
|
23
23
|
export * from "./interface/billing.update.dto.interface";
|
|
24
|
+
export * from "./interface/moving_timesheet.create.dto.interface";
|
|
25
|
+
export * from "./interface/moving_timesheet.filter.dto.interface";
|
|
26
|
+
export * from "./interface/moving_timesheet.update.dto.interface";
|
|
24
27
|
export * from "./interface/bank.create.dto.interface";
|
|
25
28
|
export * from "./interface/bank.entity.response";
|
|
26
29
|
export * from "./interface/bank.update.dto.interface";
|
package/dist/src/api/index.js
CHANGED
|
@@ -37,6 +37,9 @@ __exportStar(require("./interface/office.location.create.dto.interface"), export
|
|
|
37
37
|
__exportStar(require("./interface/office.location.entity.response"), exports);
|
|
38
38
|
__exportStar(require("./interface/office.Location.update.dto.interface"), exports);
|
|
39
39
|
__exportStar(require("./interface/billing.update.dto.interface"), exports);
|
|
40
|
+
__exportStar(require("./interface/moving_timesheet.create.dto.interface"), exports);
|
|
41
|
+
__exportStar(require("./interface/moving_timesheet.filter.dto.interface"), exports);
|
|
42
|
+
__exportStar(require("./interface/moving_timesheet.update.dto.interface"), exports);
|
|
40
43
|
__exportStar(require("./interface/bank.create.dto.interface"), exports);
|
|
41
44
|
__exportStar(require("./interface/bank.entity.response"), exports);
|
|
42
45
|
__exportStar(require("./interface/bank.update.dto.interface"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IEntityCreateDto, IMovingTimesheetEntity } from "../../entities";
|
|
2
|
+
import { MovingTimesheetStatusEnum } from "../../entities/enums/moving_timesheet_status_enum";
|
|
3
|
+
export type IMovingTimesheetDtoExclude = "status";
|
|
4
|
+
export interface IMovingTimesheetCreateDto extends Omit<IEntityCreateDto<IMovingTimesheetEntity>, IMovingTimesheetDtoExclude> {
|
|
5
|
+
status?: MovingTimesheetStatusEnum;
|
|
6
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IEntityUpdateDto, IMovingTimesheetActionDataDto, IMovingTimesheetEntity } from "../../entities";
|
|
2
|
+
import { IMovingTimesheetDtoExclude } from "./moving_timesheet.create.dto.interface";
|
|
3
|
+
export interface IMovingTimesheetUpdateDto extends Omit<IEntityUpdateDto<IMovingTimesheetEntity>, IMovingTimesheetDtoExclude> {
|
|
4
|
+
actionData?: IMovingTimesheetActionDataDto;
|
|
5
|
+
}
|
|
@@ -19,3 +19,4 @@ __exportStar(require("./constants"), exports);
|
|
|
19
19
|
__exportStar(require("./entity_constants"), exports);
|
|
20
20
|
__exportStar(require("./util.constants"), exports);
|
|
21
21
|
__exportStar(require("./website_lead.constants"), exports);
|
|
22
|
+
__exportStar(require("./timesheet.constants"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ITimesheetEntity } from "../entities";
|
|
2
|
+
export declare const MENTION_START_DELIMITER = "__mention";
|
|
3
|
+
export declare const MENTION_END_DELIMITER = "mentionend__";
|
|
4
|
+
export declare const timesheetDescriptionLength = 1024;
|
|
5
|
+
export declare const validatorNorms: (keyof ITimesheetEntity)[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validatorNorms = exports.timesheetDescriptionLength = exports.MENTION_END_DELIMITER = exports.MENTION_START_DELIMITER = void 0;
|
|
4
|
+
exports.MENTION_START_DELIMITER = "__mention";
|
|
5
|
+
exports.MENTION_END_DELIMITER = "mentionend__";
|
|
6
|
+
exports.timesheetDescriptionLength = 1024;
|
|
7
|
+
exports.validatorNorms = ["dateCode"];
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { CronJobNames } from "./cron-jobs-name.enum";
|
|
2
2
|
export declare enum ConfigurationKeyEnum {
|
|
3
|
-
PENDING_APPROVAL_TIMESHEET_REMINDER = "pendingApprovalTimesheetReminder"
|
|
3
|
+
PENDING_APPROVAL_TIMESHEET_REMINDER = "pendingApprovalTimesheetReminder",
|
|
4
|
+
TIMESHEET_VIEW_RANGE = "timesheetViewRange",
|
|
5
|
+
TIMESHEET_VIEW_THRESHOLD = "timesheetViewThreshold",
|
|
6
|
+
TIMESHEET_THRESHOLD = "timesheetThreshold",
|
|
7
|
+
TIMESHEET_ENTER_THRESHOLD = "timesheetEnterThreshold",
|
|
8
|
+
ORGANIZATION_BILLING_OVERDUE_THRESHOLD = "organization_billing_overdue_threshold",
|
|
9
|
+
PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET = "projectEntityUsageNotificationSentPercentageReset"
|
|
4
10
|
}
|
|
5
11
|
export declare namespace ConfigurationKeyEnum {
|
|
12
|
+
function getNames(): string[];
|
|
13
|
+
function parse(value: string): ConfigurationKeyEnum;
|
|
6
14
|
function IsCronJobConfigurationKey(key: ConfigurationKeyEnum): boolean;
|
|
7
|
-
function getCronJobName(configurationKey: ConfigurationKeyEnum): CronJobNames;
|
|
15
|
+
function getCronJobName(configurationKey: ConfigurationKeyEnum): CronJobNames | undefined;
|
|
8
16
|
}
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConfigurationKeyEnum = void 0;
|
|
4
|
+
const enums_1 = require("../../enums");
|
|
5
|
+
const exceptions_1 = require("../../exceptions");
|
|
4
6
|
const cron_jobs_name_enum_1 = require("./cron-jobs-name.enum");
|
|
5
7
|
var ConfigurationKeyEnum;
|
|
6
8
|
(function (ConfigurationKeyEnum) {
|
|
7
9
|
ConfigurationKeyEnum["PENDING_APPROVAL_TIMESHEET_REMINDER"] = "pendingApprovalTimesheetReminder";
|
|
10
|
+
ConfigurationKeyEnum["TIMESHEET_VIEW_RANGE"] = "timesheetViewRange";
|
|
11
|
+
ConfigurationKeyEnum["TIMESHEET_VIEW_THRESHOLD"] = "timesheetViewThreshold";
|
|
12
|
+
ConfigurationKeyEnum["TIMESHEET_THRESHOLD"] = "timesheetThreshold";
|
|
13
|
+
ConfigurationKeyEnum["TIMESHEET_ENTER_THRESHOLD"] = "timesheetEnterThreshold";
|
|
14
|
+
ConfigurationKeyEnum["ORGANIZATION_BILLING_OVERDUE_THRESHOLD"] = "organization_billing_overdue_threshold";
|
|
15
|
+
ConfigurationKeyEnum["PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET"] = "projectEntityUsageNotificationSentPercentageReset";
|
|
8
16
|
})(ConfigurationKeyEnum || (exports.ConfigurationKeyEnum = ConfigurationKeyEnum = {}));
|
|
9
17
|
(function (ConfigurationKeyEnum) {
|
|
18
|
+
function getNames() {
|
|
19
|
+
return Object.values(ConfigurationKeyEnum).filter((value) => typeof value === "string");
|
|
20
|
+
}
|
|
21
|
+
ConfigurationKeyEnum.getNames = getNames;
|
|
22
|
+
function parse(value) {
|
|
23
|
+
if (Object.values(ConfigurationKeyEnum).includes(value)) {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
throw new exceptions_1.AppBadRequestException({
|
|
27
|
+
key: enums_1.ErrorKeyEnum.CONFIGURATION_KEY,
|
|
28
|
+
message: ["Invalid configuration key"],
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
ConfigurationKeyEnum.parse = parse;
|
|
10
32
|
function IsCronJobConfigurationKey(key) {
|
|
11
33
|
if (getCronJobName(key))
|
|
12
34
|
return true;
|
|
@@ -16,8 +38,23 @@ var ConfigurationKeyEnum;
|
|
|
16
38
|
function getCronJobName(configurationKey) {
|
|
17
39
|
const cronJobConfigurationKeyMapping = {
|
|
18
40
|
[ConfigurationKeyEnum.PENDING_APPROVAL_TIMESHEET_REMINDER]: cron_jobs_name_enum_1.CronJobNames.PENDING_APPROVAL_TIMESHEET_REMINDER,
|
|
41
|
+
[ConfigurationKeyEnum.PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET]: cron_jobs_name_enum_1.CronJobNames.PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET,
|
|
19
42
|
};
|
|
20
43
|
return cronJobConfigurationKeyMapping[configurationKey];
|
|
21
44
|
}
|
|
22
45
|
ConfigurationKeyEnum.getCronJobName = getCronJobName;
|
|
23
46
|
})(ConfigurationKeyEnum || (exports.ConfigurationKeyEnum = ConfigurationKeyEnum = {}));
|
|
47
|
+
// export namespace ConfigurationKeyEnum {
|
|
48
|
+
// export function IsCronJobConfigurationKey(key: ConfigurationKeyEnum): boolean {
|
|
49
|
+
// if (getCronJobName(key)) return true;
|
|
50
|
+
// return false;
|
|
51
|
+
// }
|
|
52
|
+
// export function getCronJobName(configurationKey: ConfigurationKeyEnum): CronJobNames {
|
|
53
|
+
// const cronJobConfigurationKeyMapping: {
|
|
54
|
+
// [key in ConfigurationKeyEnum]: CronJobNames;
|
|
55
|
+
// } = {
|
|
56
|
+
// [ConfigurationKeyEnum.PENDING_APPROVAL_TIMESHEET_REMINDER]: CronJobNames.PENDING_APPROVAL_TIMESHEET_REMINDER,
|
|
57
|
+
// };
|
|
58
|
+
// return cronJobConfigurationKeyMapping[configurationKey];
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare enum CronJobNames {
|
|
2
|
-
PENDING_APPROVAL_TIMESHEET_REMINDER = "pending_approval_timesheet_reminder"
|
|
2
|
+
PENDING_APPROVAL_TIMESHEET_REMINDER = "pending_approval_timesheet_reminder",
|
|
3
|
+
PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET = "project_entity_usage_notification_sent_percentage_reset"
|
|
3
4
|
}
|
|
@@ -4,4 +4,5 @@ exports.CronJobNames = void 0;
|
|
|
4
4
|
var CronJobNames;
|
|
5
5
|
(function (CronJobNames) {
|
|
6
6
|
CronJobNames["PENDING_APPROVAL_TIMESHEET_REMINDER"] = "pending_approval_timesheet_reminder";
|
|
7
|
+
CronJobNames["PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET"] = "project_entity_usage_notification_sent_percentage_reset";
|
|
7
8
|
})(CronJobNames || (exports.CronJobNames = CronJobNames = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MovingTimesheetActionEnum = void 0;
|
|
4
|
+
var MovingTimesheetActionEnum;
|
|
5
|
+
(function (MovingTimesheetActionEnum) {
|
|
6
|
+
MovingTimesheetActionEnum["APPROVE"] = "approve";
|
|
7
|
+
MovingTimesheetActionEnum["REJECT"] = "reject";
|
|
8
|
+
})(MovingTimesheetActionEnum || (exports.MovingTimesheetActionEnum = MovingTimesheetActionEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MovingTimesheetStatusEnum = void 0;
|
|
4
|
+
var MovingTimesheetStatusEnum;
|
|
5
|
+
(function (MovingTimesheetStatusEnum) {
|
|
6
|
+
MovingTimesheetStatusEnum["PENDING_APPROVAL"] = "pending_approval";
|
|
7
|
+
MovingTimesheetStatusEnum["APPROVED"] = "approved";
|
|
8
|
+
MovingTimesheetStatusEnum["REJECTED"] = "rejected";
|
|
9
|
+
})(MovingTimesheetStatusEnum || (exports.MovingTimesheetStatusEnum = MovingTimesheetStatusEnum = {}));
|
|
@@ -6,7 +6,8 @@ export declare enum TimesheetActionEnum {
|
|
|
6
6
|
APPROVE = "approve",
|
|
7
7
|
REJECT = "reject",
|
|
8
8
|
RECALL = "recall",
|
|
9
|
-
BILLING_UPDATE = "billing_update"
|
|
9
|
+
BILLING_UPDATE = "billing_update",
|
|
10
|
+
MOVE_TIMESHEET = "move_timesheet"
|
|
10
11
|
}
|
|
11
12
|
export declare namespace TimesheetActionEnum {
|
|
12
13
|
function getLabel(action: TimesheetActionEnum): string;
|
|
@@ -13,6 +13,7 @@ var TimesheetActionEnum;
|
|
|
13
13
|
TimesheetActionEnum["REJECT"] = "reject";
|
|
14
14
|
TimesheetActionEnum["RECALL"] = "recall";
|
|
15
15
|
TimesheetActionEnum["BILLING_UPDATE"] = "billing_update";
|
|
16
|
+
TimesheetActionEnum["MOVE_TIMESHEET"] = "move_timesheet";
|
|
16
17
|
})(TimesheetActionEnum || (exports.TimesheetActionEnum = TimesheetActionEnum = {}));
|
|
17
18
|
(function (TimesheetActionEnum) {
|
|
18
19
|
const actionLabelMap = {
|
|
@@ -24,6 +25,7 @@ var TimesheetActionEnum;
|
|
|
24
25
|
[TimesheetActionEnum.REJECT]: "Reject",
|
|
25
26
|
[TimesheetActionEnum.RECALL]: "Recall",
|
|
26
27
|
[TimesheetActionEnum.BILLING_UPDATE]: "Billing Update",
|
|
28
|
+
[TimesheetActionEnum.MOVE_TIMESHEET]: "Move Timesheet",
|
|
27
29
|
};
|
|
28
30
|
function getLabel(action) {
|
|
29
31
|
if (!Object.values(TimesheetActionEnum).includes(action)) {
|
|
@@ -6,7 +6,8 @@ export declare enum TimesheetStatusEnum {
|
|
|
6
6
|
RESOLVED_REJECTED = "resolved_rejected",
|
|
7
7
|
REJECTED = "rejected",
|
|
8
8
|
APPROVED = "approved",
|
|
9
|
-
DELETED = "deleted"
|
|
9
|
+
DELETED = "deleted",
|
|
10
|
+
MOVING_TIMESHEET_PENDING_APPROVAL = "moving_timesheet_pending_approval"
|
|
10
11
|
}
|
|
11
12
|
export declare namespace TimesheetStatusEnum {
|
|
12
13
|
function getNames(): string[];
|
|
@@ -13,6 +13,7 @@ var TimesheetStatusEnum;
|
|
|
13
13
|
TimesheetStatusEnum["REJECTED"] = "rejected";
|
|
14
14
|
TimesheetStatusEnum["APPROVED"] = "approved";
|
|
15
15
|
TimesheetStatusEnum["DELETED"] = "deleted";
|
|
16
|
+
TimesheetStatusEnum["MOVING_TIMESHEET_PENDING_APPROVAL"] = "moving_timesheet_pending_approval";
|
|
16
17
|
})(TimesheetStatusEnum || (exports.TimesheetStatusEnum = TimesheetStatusEnum = {}));
|
|
17
18
|
(function (TimesheetStatusEnum) {
|
|
18
19
|
function getNames() {
|
|
@@ -10,7 +10,10 @@ export * from "./interface/industry.entity.interface";
|
|
|
10
10
|
export * from "./interface/configuration.entity.interface";
|
|
11
11
|
export * from "./interface/rate.entity.interface";
|
|
12
12
|
export * from "./interface/client.entity.interface";
|
|
13
|
+
export * from "./interface/moving_timesheet.entity.interface";
|
|
13
14
|
export * from "./interface/project.entity.interface";
|
|
15
|
+
export * from "./enums/moving_timesheet_action_enum";
|
|
16
|
+
export * from "./enums/moving_timesheet_status_enum";
|
|
14
17
|
export * from "./interface/timesheet.entity.interface";
|
|
15
18
|
export * from "./enums/reimbursement.entity.enum";
|
|
16
19
|
export * from "./interface/reimbursement.entity.interface";
|
|
@@ -88,6 +91,7 @@ export * from "./model/configuration.model";
|
|
|
88
91
|
export * from "./model/country.entity.model";
|
|
89
92
|
export * from "./model/designation.entity.model";
|
|
90
93
|
export * from "./model/entity.model.interface";
|
|
94
|
+
export * from "./model/moving-timesheet.entity.model";
|
|
91
95
|
export * from "./model/project-user-mapping.entity.model";
|
|
92
96
|
export * from "./model/project.entity.model";
|
|
93
97
|
export * from "./model/reimbursement-expense.entity.model";
|
|
@@ -103,9 +107,9 @@ export * from "./model/billing-transaction.model";
|
|
|
103
107
|
export * from "./enums/address_book_status_enum";
|
|
104
108
|
export * from "./interface/address-book.entity.interface";
|
|
105
109
|
export * from "./enums/state_status_enum";
|
|
110
|
+
export * from "./flow-configs/state_flow.config";
|
|
106
111
|
export * from "./interface/state.entity.interface";
|
|
107
112
|
export * from "./model/state.entity.model";
|
|
108
|
-
export * from "./flow-configs/state_flow.config";
|
|
109
113
|
export * from "./enums/gst_rate_status_enum";
|
|
110
114
|
export * from "./interface/gst_rate.entity.interface";
|
|
111
115
|
export * from "./model/gst_rate.entity.model";
|
|
@@ -214,6 +218,6 @@ export * from "./flow-configs/billing-transaction.flow.config";
|
|
|
214
218
|
export * from "./enums/entity_history_action.enum";
|
|
215
219
|
export * from "./enums/entity_history_operation_enum";
|
|
216
220
|
export * from "./enums/entity_history_status_enum";
|
|
217
|
-
export * from "./interface/entity_history.entity.interface";
|
|
218
221
|
export * from "./flow-configs/entity_history_flow.config";
|
|
222
|
+
export * from "./interface/entity_history.entity.interface";
|
|
219
223
|
export * from "./model/entity_history.entity.model";
|
|
@@ -26,7 +26,10 @@ __exportStar(require("./interface/industry.entity.interface"), exports);
|
|
|
26
26
|
__exportStar(require("./interface/configuration.entity.interface"), exports);
|
|
27
27
|
__exportStar(require("./interface/rate.entity.interface"), exports);
|
|
28
28
|
__exportStar(require("./interface/client.entity.interface"), exports);
|
|
29
|
+
__exportStar(require("./interface/moving_timesheet.entity.interface"), exports);
|
|
29
30
|
__exportStar(require("./interface/project.entity.interface"), exports);
|
|
31
|
+
__exportStar(require("./enums/moving_timesheet_action_enum"), exports);
|
|
32
|
+
__exportStar(require("./enums/moving_timesheet_status_enum"), exports);
|
|
30
33
|
__exportStar(require("./interface/timesheet.entity.interface"), exports);
|
|
31
34
|
__exportStar(require("./enums/reimbursement.entity.enum"), exports);
|
|
32
35
|
__exportStar(require("./interface/reimbursement.entity.interface"), exports);
|
|
@@ -104,6 +107,7 @@ __exportStar(require("./model/configuration.model"), exports);
|
|
|
104
107
|
__exportStar(require("./model/country.entity.model"), exports);
|
|
105
108
|
__exportStar(require("./model/designation.entity.model"), exports);
|
|
106
109
|
__exportStar(require("./model/entity.model.interface"), exports);
|
|
110
|
+
__exportStar(require("./model/moving-timesheet.entity.model"), exports);
|
|
107
111
|
__exportStar(require("./model/project-user-mapping.entity.model"), exports);
|
|
108
112
|
__exportStar(require("./model/project.entity.model"), exports);
|
|
109
113
|
__exportStar(require("./model/reimbursement-expense.entity.model"), exports);
|
|
@@ -119,9 +123,9 @@ __exportStar(require("./model/billing-transaction.model"), exports);
|
|
|
119
123
|
__exportStar(require("./enums/address_book_status_enum"), exports);
|
|
120
124
|
__exportStar(require("./interface/address-book.entity.interface"), exports);
|
|
121
125
|
__exportStar(require("./enums/state_status_enum"), exports);
|
|
126
|
+
__exportStar(require("./flow-configs/state_flow.config"), exports);
|
|
122
127
|
__exportStar(require("./interface/state.entity.interface"), exports);
|
|
123
128
|
__exportStar(require("./model/state.entity.model"), exports);
|
|
124
|
-
__exportStar(require("./flow-configs/state_flow.config"), exports);
|
|
125
129
|
__exportStar(require("./enums/gst_rate_status_enum"), exports);
|
|
126
130
|
__exportStar(require("./interface/gst_rate.entity.interface"), exports);
|
|
127
131
|
__exportStar(require("./model/gst_rate.entity.model"), exports);
|
|
@@ -230,6 +234,6 @@ __exportStar(require("./flow-configs/billing-transaction.flow.config"), exports)
|
|
|
230
234
|
__exportStar(require("./enums/entity_history_action.enum"), exports);
|
|
231
235
|
__exportStar(require("./enums/entity_history_operation_enum"), exports);
|
|
232
236
|
__exportStar(require("./enums/entity_history_status_enum"), exports);
|
|
233
|
-
__exportStar(require("./interface/entity_history.entity.interface"), exports);
|
|
234
237
|
__exportStar(require("./flow-configs/entity_history_flow.config"), exports);
|
|
238
|
+
__exportStar(require("./interface/entity_history.entity.interface"), exports);
|
|
235
239
|
__exportStar(require("./model/entity_history.entity.model"), exports);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ConfigurationKeyEnum } from "../enums/configuration-key.enum";
|
|
1
2
|
import { ConfigurationTypeEnum } from "../enums/configuration.type.enum";
|
|
2
3
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
4
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
4
5
|
export interface IConfigurationEntity extends IEntityAuditColumn {
|
|
5
6
|
id: number;
|
|
6
|
-
key:
|
|
7
|
+
key: ConfigurationKeyEnum;
|
|
7
8
|
value: string;
|
|
8
9
|
organizationId: number;
|
|
9
10
|
label: string;
|
|
@@ -38,6 +38,7 @@ import { IntermediaryBankEntityModel } from "../model/intermediary-bank.entity.m
|
|
|
38
38
|
import { LeaveEntityModel } from "../model/leave.entity.model";
|
|
39
39
|
import { LeaveCountVirtualEntityModel } from "../model/leave_count.entity.model";
|
|
40
40
|
import { LeaveHistoryEntityModel } from "../model/leave_history.entity.model";
|
|
41
|
+
import { MovingTimesheetEntityModel } from "../model/moving-timesheet.entity.model";
|
|
41
42
|
import { OfficeLocationEntityModel } from "../model/office_location.entity.model";
|
|
42
43
|
import { OrganizationEntityModel } from "../model/organization.entity.model";
|
|
43
44
|
import { OrganizationTypeEntityModel } from "../model/organization_type.entity.model";
|
|
@@ -104,6 +105,7 @@ import { IIndustryEntity } from "./industry.entity.interface";
|
|
|
104
105
|
import { IIntermediaryBankEntity } from "./intermediary_bank.entity.interface";
|
|
105
106
|
import { ILeaveCountVirtualEntity, ILeaveEntity } from "./leave.entity.interface";
|
|
106
107
|
import { ILeaveHistoryEntity } from "./leave_history.entity.interface";
|
|
108
|
+
import { IMovingTimesheetEntity } from "./moving_timesheet.entity.interface";
|
|
107
109
|
import { IOfficeLocationEntity } from "./office.location.entity";
|
|
108
110
|
import { IOrganizationEntity } from "./organization.entity.interface";
|
|
109
111
|
import { IOrganizationTypeEntity } from "./organization_type.entity.interface";
|
|
@@ -183,6 +185,7 @@ export declare enum EntityEnum {
|
|
|
183
185
|
BILLING_REIMBURESMENT_EXPENSE_HISTORY = "billing_reimbursement_expense_history",
|
|
184
186
|
TIMESHEET = "timesheet",
|
|
185
187
|
TIMESHEET_HISTORY = "timesheet_history",
|
|
188
|
+
MOVING_TIMESHEET = "moving_timesheet",
|
|
186
189
|
USER = "user",
|
|
187
190
|
PROJECT = "project",
|
|
188
191
|
CLIENT = "client",
|
|
@@ -265,7 +268,7 @@ export type IBaseEntityApiResponse<T> = {
|
|
|
265
268
|
[key in EntityEnum | VirtualEntityEnum]?: AggregationFields<EnumToModel<key>>[];
|
|
266
269
|
};
|
|
267
270
|
};
|
|
268
|
-
export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_HISTORY ? IBillingHistoryEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? IBillingTimesheetHistoryEntity : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? IBillingReimbursementExpenseHistoryEntity : 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_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.REIMBURSEMENT_HISTORY ? IReimbursementHistoryEntity : 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.CLIENT_INTRODUCING_MAPPING ? IClientIntroducingMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : T extends EntityEnum.GST_RATE ? IGstRateEntity : T extends EntityEnum.ORGANIZATION_TYPE ? IOrganizationTypeEntity : T extends EntityEnum.TDS_RATE ? ITdsRateEntity : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? IOrganizationTypeTdsRateMappingEntity : T extends EntityEnum.VOUCHER_TYPE ? IVoucherTypeEntity : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? ITdsRateVoucherTypeMappingEntity : T extends EntityEnum.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityEnum.DOCUMENT_UPLOAD ? IDocumentUploadEntity : T extends EntityEnum.VENDOR ? IVendorEntity : T extends EntityEnum.VENDOR_INVOICE ? IVendorInvoiceEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM ? IVendorInvoiceItemEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.BILLING_PROFILE ? IBillingProfileEntity : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? IProjectRevenueSplitMappingEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.ENTITY_HISTORY ? IEntityHistoryEntity : never) & {
|
|
271
|
+
export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_HISTORY ? IBillingHistoryEntity : T extends EntityEnum.MOVING_TIMESHEET ? IMovingTimesheetEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? IBillingTimesheetHistoryEntity : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? IBillingReimbursementExpenseHistoryEntity : 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_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.REIMBURSEMENT_HISTORY ? IReimbursementHistoryEntity : 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.CLIENT_INTRODUCING_MAPPING ? IClientIntroducingMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : T extends EntityEnum.GST_RATE ? IGstRateEntity : T extends EntityEnum.ORGANIZATION_TYPE ? IOrganizationTypeEntity : T extends EntityEnum.TDS_RATE ? ITdsRateEntity : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? IOrganizationTypeTdsRateMappingEntity : T extends EntityEnum.VOUCHER_TYPE ? IVoucherTypeEntity : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? ITdsRateVoucherTypeMappingEntity : T extends EntityEnum.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityEnum.DOCUMENT_UPLOAD ? IDocumentUploadEntity : T extends EntityEnum.VENDOR ? IVendorEntity : T extends EntityEnum.VENDOR_INVOICE ? IVendorInvoiceEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM ? IVendorInvoiceItemEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.BILLING_PROFILE ? IBillingProfileEntity : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? IProjectRevenueSplitMappingEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.ENTITY_HISTORY ? IEntityHistoryEntity : never) & {
|
|
269
272
|
id: number;
|
|
270
273
|
};
|
|
271
274
|
export type EntityRelationConfig<T extends EntityEnum | VirtualEntityEnum> = {
|
|
@@ -391,7 +394,7 @@ export declare enum VirtualEntityEnum {
|
|
|
391
394
|
}
|
|
392
395
|
export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
|
|
393
396
|
export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
|
|
394
|
-
export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.BILLING_HISTORY ? BillingHistoryEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.INTERMEDIARY_BANK ? IntermediaryBankEntityModel : 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.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? BillingReimbursementExpenseHistoryEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.WORK_FROM_HOME ? WorkFromHomeEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : 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.BILLING_TIMESHEET_HISTORY ? BillingTimesheetHistoryEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.TIMESHEET_HISTORY ? TimesheetHistoryEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? BillingTransactionHistoryEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : T extends EntityEnum.GST_RATE ? GstRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE ? OrganizationTypeEntityModel : T extends EntityEnum.TDS_RATE ? TdsRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? OrganizationTypeTdsRateMappingEntityModel : T extends EntityEnum.VOUCHER_TYPE ? VoucherTypeEntityModel : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? TdsRateVoucherTypeMappingEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.INDUSTRY ? IndustryEntityModel : T extends EntityEnum.EXPENSE_TYPE ? ExpenseTypeEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ROLE ? RoleEntityModel : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? RolePermissionMappingEntityModel : T extends EntityEnum.PERMISSION ? PermissionEntityModel : T extends EntityEnum.EXPENSE_HEAD ? ExpenseHeadEntityModel : T extends EntityEnum.DOCUMENT_UPLOAD ? DocumentUploadEntityModel : T extends EntityEnum.VENDOR ? VendorEntityModel : T extends EntityEnum.VENDOR_INVOICE ? VendorInvoiceEntityModel : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? VendorInvoiceHistoryEntityModel : T extends EntityEnum.OFFICE_LOCATION ? OfficeLocationEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM ? VendorInvoiceItemEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? VendorInvoiceItemHistoryEntityModel : T extends EntityEnum.VENDOR_HISTORY ? VendorHistoryEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? WorkFromHomeHistoryEntityModel : T extends EntityEnum.LEAVE_HISTORY ? LeaveHistoryEntityModel : T extends EntityEnum.BANK_HISTORY ? BankHistoryEntityModel : T extends EntityEnum.REIMBURSEMENT_HISTORY ? ReimbursementHistoryEntityModel : T extends EntityEnum.CLIENT_USER_MAPPING ? ClientUserMappingEntityModel : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? ClientIntroducingMappingEntityModel : T extends EntityEnum.HOLIDAY_LIST ? HolidayListEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : T extends EntityEnum.TO_DO_LIST ? ToDoListEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.BILLING_PROFILE ? BillingProfileEntityModel : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? ProjectRevenueSplitMappingEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ENTITY_HISTORY ? EntityHistoryEntityModel : UserEntityModel;
|
|
397
|
+
export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.BILLING_HISTORY ? BillingHistoryEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.INTERMEDIARY_BANK ? IntermediaryBankEntityModel : 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.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? BillingReimbursementExpenseHistoryEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.WORK_FROM_HOME ? WorkFromHomeEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : 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.BILLING_TIMESHEET_HISTORY ? BillingTimesheetHistoryEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.MOVING_TIMESHEET ? MovingTimesheetEntityModel : T extends EntityEnum.TIMESHEET_HISTORY ? TimesheetHistoryEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? BillingTransactionHistoryEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : T extends EntityEnum.GST_RATE ? GstRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE ? OrganizationTypeEntityModel : T extends EntityEnum.TDS_RATE ? TdsRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? OrganizationTypeTdsRateMappingEntityModel : T extends EntityEnum.VOUCHER_TYPE ? VoucherTypeEntityModel : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? TdsRateVoucherTypeMappingEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.INDUSTRY ? IndustryEntityModel : T extends EntityEnum.EXPENSE_TYPE ? ExpenseTypeEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ROLE ? RoleEntityModel : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? RolePermissionMappingEntityModel : T extends EntityEnum.PERMISSION ? PermissionEntityModel : T extends EntityEnum.EXPENSE_HEAD ? ExpenseHeadEntityModel : T extends EntityEnum.DOCUMENT_UPLOAD ? DocumentUploadEntityModel : T extends EntityEnum.VENDOR ? VendorEntityModel : T extends EntityEnum.VENDOR_INVOICE ? VendorInvoiceEntityModel : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? VendorInvoiceHistoryEntityModel : T extends EntityEnum.OFFICE_LOCATION ? OfficeLocationEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM ? VendorInvoiceItemEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? VendorInvoiceItemHistoryEntityModel : T extends EntityEnum.VENDOR_HISTORY ? VendorHistoryEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? WorkFromHomeHistoryEntityModel : T extends EntityEnum.LEAVE_HISTORY ? LeaveHistoryEntityModel : T extends EntityEnum.BANK_HISTORY ? BankHistoryEntityModel : T extends EntityEnum.REIMBURSEMENT_HISTORY ? ReimbursementHistoryEntityModel : T extends EntityEnum.CLIENT_USER_MAPPING ? ClientUserMappingEntityModel : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? ClientIntroducingMappingEntityModel : T extends EntityEnum.HOLIDAY_LIST ? HolidayListEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : T extends EntityEnum.TO_DO_LIST ? ToDoListEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.BILLING_PROFILE ? BillingProfileEntityModel : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? ProjectRevenueSplitMappingEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ENTITY_HISTORY ? EntityHistoryEntityModel : UserEntityModel;
|
|
395
398
|
export type EntityMap = {
|
|
396
399
|
[key in EntityEnum | VirtualEntityEnum]: EnumToModel<key>[];
|
|
397
400
|
} & {
|
|
@@ -41,6 +41,7 @@ var EntityEnum;
|
|
|
41
41
|
EntityEnum["BILLING_REIMBURESMENT_EXPENSE_HISTORY"] = "billing_reimbursement_expense_history";
|
|
42
42
|
EntityEnum["TIMESHEET"] = "timesheet";
|
|
43
43
|
EntityEnum["TIMESHEET_HISTORY"] = "timesheet_history";
|
|
44
|
+
EntityEnum["MOVING_TIMESHEET"] = "moving_timesheet";
|
|
44
45
|
EntityEnum["USER"] = "user";
|
|
45
46
|
EntityEnum["PROJECT"] = "project";
|
|
46
47
|
EntityEnum["CLIENT"] = "client";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MovingTimesheetActionEnum } from "../enums/moving_timesheet_action_enum";
|
|
2
|
+
import { MovingTimesheetStatusEnum } from "../enums/moving_timesheet_status_enum";
|
|
3
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
|
+
export interface IMovingTimesheetEntity extends IEntityAuditColumn {
|
|
5
|
+
id: number;
|
|
6
|
+
timesheetId: number;
|
|
7
|
+
targetProjectId: number;
|
|
8
|
+
status: MovingTimesheetStatusEnum;
|
|
9
|
+
remark?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IMovingTimesheetActionDataDto {
|
|
12
|
+
action: MovingTimesheetActionEnum;
|
|
13
|
+
remark?: string;
|
|
14
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TimesheetActionEnum } from "../enums/timesheet.action.enum";
|
|
2
2
|
import { TimesheetStatusEnum } from "../enums/timesheet.status.enum";
|
|
3
|
+
import { ProjectUserMappingEntityModel } from "../model/project-user-mapping.entity.model";
|
|
3
4
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
5
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
5
|
-
import { IProjectUserMappingEntity } from "./project.entity.interface";
|
|
6
6
|
import { IUserEntity } from "./user.entity.interface";
|
|
7
7
|
export interface ITimesheetEntity extends IEntityAuditColumn {
|
|
8
8
|
id: number;
|
|
@@ -21,8 +21,9 @@ export interface ITimesheetEntityCreateDto extends Omit<IEntityCreateDto<ITimesh
|
|
|
21
21
|
status?: TimesheetStatusEnum;
|
|
22
22
|
}
|
|
23
23
|
export interface ITimesheetEntityCreateDtoValidationData {
|
|
24
|
-
projectUserMappingEntities:
|
|
24
|
+
projectUserMappingEntities: ProjectUserMappingEntityModel[];
|
|
25
25
|
userEntity: IUserEntity;
|
|
26
|
+
existingTimesheet: ITimesheetEntity;
|
|
26
27
|
}
|
|
27
28
|
export interface ITimesheetEntityUpdateDtoValidationData extends ITimesheetEntityCreateDtoValidationData {
|
|
28
29
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IDesignationEntity } from "../interface/designation.entity.interface";
|
|
2
2
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
3
|
+
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
3
4
|
import { BaseEntityModel } from "./base.entity.model";
|
|
5
|
+
import { RateEntityModel } from "./rate.model";
|
|
4
6
|
export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.DESIGNATION> implements IDesignationEntity {
|
|
5
7
|
id: number;
|
|
6
8
|
name: string;
|
|
@@ -10,6 +12,8 @@ export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.D
|
|
|
10
12
|
createdOn: number;
|
|
11
13
|
updatedBy: number;
|
|
12
14
|
updatedOn: number;
|
|
15
|
+
rate?: RateEntityModel[];
|
|
13
16
|
static fromEntity(entity: IDesignationEntity): DesignationEntityModel;
|
|
14
17
|
getRelationConfigs(): any[];
|
|
18
|
+
static relationConfigs: RelationConfigs<[EntityEnum.RATE], EntityEnum.DESIGNATION>;
|
|
15
19
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DesignationEntityModel = void 0;
|
|
4
|
+
const relation_type_enum_1 = require("../enums/relation-type.enum");
|
|
4
5
|
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
5
6
|
const base_entity_model_1 = require("./base.entity.model");
|
|
6
7
|
class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
@@ -12,6 +13,7 @@ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
12
13
|
this.createdOn = 0;
|
|
13
14
|
this.updatedBy = 0;
|
|
14
15
|
this.updatedOn = 0;
|
|
16
|
+
this.rate = [];
|
|
15
17
|
}
|
|
16
18
|
// constructor(data: IDesignationApiEntity) {
|
|
17
19
|
// this.id = data.id;
|
|
@@ -32,3 +34,14 @@ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
exports.DesignationEntityModel = DesignationEntityModel;
|
|
37
|
+
DesignationEntityModel.relationConfigs = [
|
|
38
|
+
{
|
|
39
|
+
name: entity_utils_interface_1.EntityEnum.RATE,
|
|
40
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
41
|
+
key: "rate",
|
|
42
|
+
mapKeyConfig: {
|
|
43
|
+
relationKey: "designation",
|
|
44
|
+
key: "name",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
];
|
|
@@ -45,6 +45,7 @@ const intermediary_bank_entity_model_1 = require("./intermediary-bank.entity.mod
|
|
|
45
45
|
const leave_entity_model_1 = require("./leave.entity.model");
|
|
46
46
|
const leave_count_entity_model_1 = require("./leave_count.entity.model");
|
|
47
47
|
const leave_history_entity_model_1 = require("./leave_history.entity.model");
|
|
48
|
+
const moving_timesheet_entity_model_1 = require("./moving-timesheet.entity.model");
|
|
48
49
|
const office_location_entity_model_1 = require("./office_location.entity.model");
|
|
49
50
|
const organization_entity_model_1 = require("./organization.entity.model");
|
|
50
51
|
const organization_type_entity_model_1 = require("./organization_type.entity.model");
|
|
@@ -112,6 +113,7 @@ exports.entityEnumToEntityModel = {
|
|
|
112
113
|
[entity_utils_interface_1.EntityEnum.BILLING_HISTORY]: billing_history_entity_model_1.BillingHistoryEntityModel.fromEntity,
|
|
113
114
|
[entity_utils_interface_1.EntityEnum.USER]: user_entity_model_1.UserEntityModel.fromEntity,
|
|
114
115
|
[entity_utils_interface_1.EntityEnum.PROJECT_USER_MAPPING]: project_user_mapping_entity_model_1.ProjectUserMappingEntityModel.fromEntity,
|
|
116
|
+
[entity_utils_interface_1.EntityEnum.MOVING_TIMESHEET]: moving_timesheet_entity_model_1.MovingTimesheetEntityModel.fromEntity,
|
|
115
117
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT]: reimbursement_entity_model_1.ReimbursementEntityModel.fromEntity,
|
|
116
118
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT_EXPENSE]: reimbursement_expense_entity_model_1.ReimbursementExpenseEntityModel.fromEntity,
|
|
117
119
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT_HISTORY]: reimbursement_history_entity_model_1.ReimbursementHistoryEntityModel.fromEntity,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MovingTimesheetStatusEnum } from "../enums/moving_timesheet_status_enum";
|
|
2
|
+
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
3
|
+
import { IMovingTimesheetEntity } from "../interface/moving_timesheet.entity.interface";
|
|
4
|
+
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
5
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
6
|
+
import { ProjectEntityModel } from "./project.entity.model";
|
|
7
|
+
import { TimesheetEntityModel } from "./timesheet.entity.model";
|
|
8
|
+
export declare class MovingTimesheetEntityModel extends BaseEntityModel<EntityEnum.MOVING_TIMESHEET> implements IMovingTimesheetEntity {
|
|
9
|
+
id: number;
|
|
10
|
+
timesheetId: number;
|
|
11
|
+
targetProjectId: number;
|
|
12
|
+
status: MovingTimesheetStatusEnum;
|
|
13
|
+
createdOn: number;
|
|
14
|
+
updatedOn: number;
|
|
15
|
+
createdBy: number;
|
|
16
|
+
updatedBy: number;
|
|
17
|
+
timesheet?: TimesheetEntityModel;
|
|
18
|
+
targetProject?: ProjectEntityModel;
|
|
19
|
+
remark?: string;
|
|
20
|
+
static fromEntity(entity: IMovingTimesheetEntity): MovingTimesheetEntityModel;
|
|
21
|
+
static relationConfigs: RelationConfigs<[EntityEnum.TIMESHEET, EntityEnum.PROJECT], EntityEnum.MOVING_TIMESHEET>;
|
|
22
|
+
getRelationConfigs(): [import("../interface/relation-config.interface").IRelationConfig<EntityEnum.TIMESHEET, EntityEnum.MOVING_TIMESHEET>, import("../interface/relation-config.interface").IRelationConfig<EntityEnum.PROJECT, EntityEnum.MOVING_TIMESHEET>];
|
|
23
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MovingTimesheetEntityModel = void 0;
|
|
4
|
+
const moving_timesheet_status_enum_1 = require("../enums/moving_timesheet_status_enum");
|
|
5
|
+
const relation_type_enum_1 = require("../enums/relation-type.enum");
|
|
6
|
+
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
7
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
8
|
+
class MovingTimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.id = 0;
|
|
12
|
+
this.timesheetId = 0;
|
|
13
|
+
this.targetProjectId = 0;
|
|
14
|
+
this.status = moving_timesheet_status_enum_1.MovingTimesheetStatusEnum.PENDING_APPROVAL;
|
|
15
|
+
this.createdOn = 0;
|
|
16
|
+
this.updatedOn = 0;
|
|
17
|
+
this.createdBy = 0;
|
|
18
|
+
this.updatedBy = 0;
|
|
19
|
+
}
|
|
20
|
+
static fromEntity(entity) {
|
|
21
|
+
const result = new MovingTimesheetEntityModel(entity_utils_interface_1.EntityEnum.MOVING_TIMESHEET);
|
|
22
|
+
Object.assign(result, entity);
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
getRelationConfigs() {
|
|
26
|
+
return MovingTimesheetEntityModel.relationConfigs;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.MovingTimesheetEntityModel = MovingTimesheetEntityModel;
|
|
30
|
+
MovingTimesheetEntityModel.relationConfigs = [
|
|
31
|
+
{
|
|
32
|
+
name: entity_utils_interface_1.EntityEnum.TIMESHEET,
|
|
33
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
34
|
+
key: "timesheet",
|
|
35
|
+
mapKeyConfig: {
|
|
36
|
+
relationKey: "id",
|
|
37
|
+
key: "timesheetId",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: entity_utils_interface_1.EntityEnum.PROJECT,
|
|
42
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
43
|
+
key: "targetProject",
|
|
44
|
+
mapKeyConfig: {
|
|
45
|
+
relationKey: "id",
|
|
46
|
+
key: "targetProjectId",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
];
|
|
@@ -99,6 +99,12 @@ class ProjectEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
99
99
|
isHourlyProject() {
|
|
100
100
|
return this.billingType === project_entity_enum_1.ProjectBillingTypeEnum.HOURLY;
|
|
101
101
|
}
|
|
102
|
+
isFixedProject() {
|
|
103
|
+
return this.billingType === project_entity_enum_1.ProjectBillingTypeEnum.FIXED;
|
|
104
|
+
}
|
|
105
|
+
isAdhocProject() {
|
|
106
|
+
return this.billingType === project_entity_enum_1.ProjectBillingTypeEnum.ADHOC;
|
|
107
|
+
}
|
|
102
108
|
}
|
|
103
109
|
exports.ProjectEntityModel = ProjectEntityModel;
|
|
104
110
|
ProjectEntityModel.relationConfigs = [
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { CurrencyEnum } from "../../enums";
|
|
1
2
|
import { TimesheetStatusEnum } from "../enums/timesheet.status.enum";
|
|
2
3
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
4
|
+
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
3
5
|
import { ITimesheetEntity } from "../interface/timesheet.entity.interface";
|
|
4
6
|
import { BaseEntityModel } from "./base.entity.model";
|
|
7
|
+
import { UserEntityModel } from "./user.entity.model";
|
|
5
8
|
export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIMESHEET> implements ITimesheetEntity {
|
|
6
9
|
id: number;
|
|
7
10
|
userId: number;
|
|
@@ -16,6 +19,9 @@ export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIM
|
|
|
16
19
|
updatedBy: number;
|
|
17
20
|
createdOn: number;
|
|
18
21
|
updatedOn: number;
|
|
22
|
+
user?: UserEntityModel;
|
|
19
23
|
static fromEntity(entity: ITimesheetEntity): TimesheetEntityModel;
|
|
20
24
|
getRelationConfigs(): any[];
|
|
25
|
+
static relationConfigs: RelationConfigs<[EntityEnum.USER], EntityEnum.TIMESHEET>;
|
|
26
|
+
getTimesheetAmount(projectCurrency: CurrencyEnum): number;
|
|
21
27
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimesheetEntityModel = void 0;
|
|
4
|
+
const relation_type_enum_1 = require("../enums/relation-type.enum");
|
|
4
5
|
const timesheet_status_enum_1 = require("../enums/timesheet.status.enum");
|
|
5
6
|
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
6
7
|
const base_entity_model_1 = require("./base.entity.model");
|
|
@@ -27,5 +28,21 @@ class TimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
27
28
|
getRelationConfigs() {
|
|
28
29
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
29
30
|
}
|
|
31
|
+
getTimesheetAmount(projectCurrency) {
|
|
32
|
+
var _a, _b, _c, _d, _e;
|
|
33
|
+
const rate = (_e = (_d = (_c = (_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.designationModel) === null || _b === void 0 ? void 0 : _b.rate) === null || _c === void 0 ? void 0 : _c.find((rate) => rate.currency === projectCurrency)) === null || _d === void 0 ? void 0 : _d.rate) !== null && _e !== void 0 ? _e : 0;
|
|
34
|
+
return rate * this.totalDuration;
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
37
|
exports.TimesheetEntityModel = TimesheetEntityModel;
|
|
38
|
+
TimesheetEntityModel.relationConfigs = [
|
|
39
|
+
{
|
|
40
|
+
name: entity_utils_interface_1.EntityEnum.USER,
|
|
41
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
42
|
+
key: "user",
|
|
43
|
+
mapKeyConfig: {
|
|
44
|
+
relationKey: "id",
|
|
45
|
+
key: "userId",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
];
|
|
@@ -3,6 +3,7 @@ import { EntityEnum, Nullable } from "../interface/entity.utils.interface";
|
|
|
3
3
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
4
4
|
import { IUserEntity } from "../interface/user.entity.interface";
|
|
5
5
|
import { BaseEntityModel } from "./base.entity.model";
|
|
6
|
+
import { DesignationEntityModel } from "./designation.entity.model";
|
|
6
7
|
import { RoleEntityModel } from "./role.entity.model";
|
|
7
8
|
export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> implements IUserEntity {
|
|
8
9
|
id: number;
|
|
@@ -45,7 +46,8 @@ export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> im
|
|
|
45
46
|
createdOn: number;
|
|
46
47
|
updatedOn: number;
|
|
47
48
|
roleModel: RoleEntityModel;
|
|
48
|
-
|
|
49
|
+
designationModel?: DesignationEntityModel;
|
|
50
|
+
static relationConfigs: RelationConfigs<[EntityEnum.ROLE, EntityEnum.DESIGNATION], EntityEnum.USER>;
|
|
49
51
|
getRelationConfigs(): any[];
|
|
50
52
|
static fromEntity(entity: IUserEntity): UserEntityModel;
|
|
51
53
|
get roleEntityModel(): RoleEntityModel;
|
|
@@ -55,4 +55,13 @@ UserEntityModel.relationConfigs = [
|
|
|
55
55
|
key: "role",
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
name: entity_utils_interface_1.EntityEnum.DESIGNATION,
|
|
60
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
61
|
+
key: "designationModel",
|
|
62
|
+
mapKeyConfig: {
|
|
63
|
+
relationKey: "name",
|
|
64
|
+
key: "designation",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
58
67
|
];
|
|
@@ -32,5 +32,7 @@ export declare enum ErrorKeyEnum {
|
|
|
32
32
|
BILLING = "BILLING",
|
|
33
33
|
DEFAULT_SIZE = "DEFAULT_SIZE",
|
|
34
34
|
BILLING_EXPORT_TYPE = "BILLING_EXPORT_TYPE",
|
|
35
|
-
VENDOR_INVOICE_ITEMS = "VENDOR_INVOICE_ITEMS"
|
|
35
|
+
VENDOR_INVOICE_ITEMS = "VENDOR_INVOICE_ITEMS",
|
|
36
|
+
PROJECT_USER_MAPPING = "PROJECT_USER_MAPPING",
|
|
37
|
+
CONFIGURATION_KEY = "CONFIGURATION_KEY"
|
|
36
38
|
}
|
|
@@ -37,4 +37,6 @@ var ErrorKeyEnum;
|
|
|
37
37
|
ErrorKeyEnum["DEFAULT_SIZE"] = "DEFAULT_SIZE";
|
|
38
38
|
ErrorKeyEnum["BILLING_EXPORT_TYPE"] = "BILLING_EXPORT_TYPE";
|
|
39
39
|
ErrorKeyEnum["VENDOR_INVOICE_ITEMS"] = "VENDOR_INVOICE_ITEMS";
|
|
40
|
+
ErrorKeyEnum["PROJECT_USER_MAPPING"] = "PROJECT_USER_MAPPING";
|
|
41
|
+
ErrorKeyEnum["CONFIGURATION_KEY"] = "CONFIGURATION_KEY";
|
|
40
42
|
})(ErrorKeyEnum || (exports.ErrorKeyEnum = ErrorKeyEnum = {}));
|
|
@@ -25,6 +25,10 @@ export declare class DateCodeModel {
|
|
|
25
25
|
};
|
|
26
26
|
getRange(dateCodeModel: DateCodeModel): DateCodeModel[];
|
|
27
27
|
static diffInDays(startModel: DateCodeModel, endModel: DateCodeModel, excludeDays?: Weekday[], excludeDateCodes?: DateCodeModel[]): number;
|
|
28
|
+
getMonthStartDateCodeEndDateCodeIST(): {
|
|
29
|
+
startDate: DateCodeModel;
|
|
30
|
+
endDate: DateCodeModel;
|
|
31
|
+
};
|
|
28
32
|
static getByPredicates(models: DateCodeModel[], includePredicates: ((dateModel: DateCodeModel) => boolean)[], excludePredicates: ((dateModel: DateCodeModel) => boolean)[]): DateCodeModel[];
|
|
29
33
|
static getWeekdaysPredicate(weekdays: Weekday[]): (dateModel: DateCodeModel) => boolean;
|
|
30
34
|
static getDateCodesPredicate(dateCodes: DateCodeModel[]): (dateModel: DateCodeModel) => boolean;
|
|
@@ -103,6 +103,19 @@ class DateCodeModel {
|
|
|
103
103
|
const excludeDatePredicates = (dateModel) => !excludeDateCodes.some((d) => d.isSame(dateModel));
|
|
104
104
|
return dateRange.filter((dateModel) => excludeDayPredicates(dateModel) && excludeDatePredicates(dateModel)).length;
|
|
105
105
|
}
|
|
106
|
+
getMonthStartDateCodeEndDateCodeIST() {
|
|
107
|
+
const date = this.getDate();
|
|
108
|
+
// Convert to IST
|
|
109
|
+
const istDate = new Date(date.toLocaleString("en-US", { timeZone: "Asia/Kolkata" }));
|
|
110
|
+
const year = istDate.getFullYear();
|
|
111
|
+
const month = istDate.getMonth();
|
|
112
|
+
const startDate = new Date(year, month, 1);
|
|
113
|
+
const endDate = new Date(year, month + 1, 0);
|
|
114
|
+
return {
|
|
115
|
+
startDate: new DateCodeModel(DateCodeModel.fromDate(startDate)),
|
|
116
|
+
endDate: new DateCodeModel(DateCodeModel.fromDate(endDate)),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
106
119
|
static getByPredicates(models, includePredicates, excludePredicates) {
|
|
107
120
|
return models.filter((model) => includePredicates.every((predicate) => predicate(model)) && excludePredicates.every((predicate) => !predicate(model)));
|
|
108
121
|
}
|