law-common 10.73.1 → 10.74.1-beta.3
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/project.entity.interface.d.ts +10 -2
- package/dist/src/entities/interface/project.entity.interface.js +8 -0
- package/dist/src/entities/interface/timesheet.entity.interface.d.ts +3 -2
- package/dist/src/entities/model/client_quote.entity.model.d.ts +3 -2
- package/dist/src/entities/model/client_quote.entity.model.js +7 -1
- package/dist/src/entities/model/client_quote_rate.entity.model.d.ts +4 -2
- package/dist/src/entities/model/client_quote_rate.entity.model.js +12 -1
- 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 +8 -2
- package/dist/src/entities/model/project.entity.model.js +16 -0
- package/dist/src/entities/model/timesheet.entity.model.d.ts +6 -0
- package/dist/src/entities/model/timesheet.entity.model.js +16 -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/index.js +7 -17
- package/dist/src/utils/helper.fn.util.d.ts +2 -2
- 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
|
+
}
|
|
@@ -6,7 +6,7 @@ import { ProjectUserStatusEnum } from "../enums/project_user_status.enum";
|
|
|
6
6
|
import { UserRoleEnum } from "../enums/user.entity.enum";
|
|
7
7
|
import { IClientEntity } from "./client.entity.interface";
|
|
8
8
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
9
|
-
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
9
|
+
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto, Nullable } from "./entity.utils.interface";
|
|
10
10
|
import { IProjectRevenueSplitMappingEntity } from "./project-revenue-split-mapping.entity";
|
|
11
11
|
import { IUserEntity } from "./user.entity.interface";
|
|
12
12
|
export interface IProjectEntity extends IEntityAuditColumn {
|
|
@@ -25,6 +25,14 @@ export interface IProjectEntity extends IEntityAuditColumn {
|
|
|
25
25
|
billingOverdueDays?: number;
|
|
26
26
|
billToClientAffiliateId?: number | null;
|
|
27
27
|
revenueSplit: ProjectRevenueSplit;
|
|
28
|
+
usageNotificationSentPercentage?: Nullable<UsageNotificationThresholdEnum>;
|
|
29
|
+
clientQuoteId?: Nullable<number>;
|
|
30
|
+
}
|
|
31
|
+
export declare enum UsageNotificationThresholdEnum {
|
|
32
|
+
SEVENTY_FIVE = "75",
|
|
33
|
+
NINETY = "90",
|
|
34
|
+
NINETY_FIVE = "95",
|
|
35
|
+
ONE_HUNDRED = "100"
|
|
28
36
|
}
|
|
29
37
|
export interface IProjectUserDto {
|
|
30
38
|
id: number;
|
|
@@ -35,7 +43,7 @@ export interface IProjectEntityDependent {
|
|
|
35
43
|
users: IProjectUserDto[];
|
|
36
44
|
revenueSplitData: IProjectRevenueSplitData[];
|
|
37
45
|
}
|
|
38
|
-
export type IProjectExclude = "organizationId" | "billingRate";
|
|
46
|
+
export type IProjectExclude = "organizationId" | "billingRate" | "usageNotificationSentPercentage";
|
|
39
47
|
export interface IProjectExcludeT extends Pick<IProjectEntity, IProjectExclude> {
|
|
40
48
|
}
|
|
41
49
|
export interface IProjectHourlyRate {
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UsageNotificationThresholdEnum = void 0;
|
|
4
|
+
var UsageNotificationThresholdEnum;
|
|
5
|
+
(function (UsageNotificationThresholdEnum) {
|
|
6
|
+
UsageNotificationThresholdEnum["SEVENTY_FIVE"] = "75";
|
|
7
|
+
UsageNotificationThresholdEnum["NINETY"] = "90";
|
|
8
|
+
UsageNotificationThresholdEnum["NINETY_FIVE"] = "95";
|
|
9
|
+
UsageNotificationThresholdEnum["ONE_HUNDRED"] = "100";
|
|
10
|
+
})(UsageNotificationThresholdEnum || (exports.UsageNotificationThresholdEnum = UsageNotificationThresholdEnum = {}));
|
|
@@ -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,9 +1,9 @@
|
|
|
1
1
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
2
|
-
import { BaseEntityModel } from "./base.entity.model";
|
|
3
2
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
4
|
-
import {
|
|
3
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
5
4
|
import { ClientQuoteCurrencyEnum } from "../enums/client_quote_currency_enum";
|
|
6
5
|
import { ClientQuoteStatusEnum } from "../enums/client_quote_status_enum";
|
|
6
|
+
import { IClientQuoteEntity } from "../interface/client_quote.entity.interface";
|
|
7
7
|
import { ClientQuoteRateEntityModel } from "./client_quote_rate.entity.model";
|
|
8
8
|
export declare class ClientQuoteEntityModel extends BaseEntityModel<EntityEnum.CLIENT_QUOTE> implements IClientQuoteEntity {
|
|
9
9
|
id: number;
|
|
@@ -26,4 +26,5 @@ export declare class ClientQuoteEntityModel extends BaseEntityModel<EntityEnum.C
|
|
|
26
26
|
static relationConfigs: RelationConfigs<[EntityEnum.CLIENT_QUOTE_RATE], EntityEnum.CLIENT_QUOTE>;
|
|
27
27
|
static fromEntity(entity: IClientQuoteEntity): ClientQuoteEntityModel;
|
|
28
28
|
getRelationConfigs(): any[];
|
|
29
|
+
get maxEstimatedHours(): number;
|
|
29
30
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ClientQuoteEntityModel = 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
|
-
const
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
7
8
|
const client_quote_currency_enum_1 = require("../enums/client_quote_currency_enum");
|
|
8
9
|
const client_quote_status_enum_1 = require("../enums/client_quote_status_enum");
|
|
9
10
|
class ClientQuoteEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
@@ -33,6 +34,11 @@ class ClientQuoteEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
33
34
|
getRelationConfigs() {
|
|
34
35
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
35
36
|
}
|
|
37
|
+
get maxEstimatedHours() {
|
|
38
|
+
if (!this.clientQuoteRates)
|
|
39
|
+
return 0;
|
|
40
|
+
return (0, utils_1.sumNormalised)(this.clientQuoteRates, "maxHour");
|
|
41
|
+
}
|
|
36
42
|
}
|
|
37
43
|
exports.ClientQuoteEntityModel = ClientQuoteEntityModel;
|
|
38
44
|
ClientQuoteEntityModel.relationConfigs = [
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
2
|
-
import { BaseEntityModel } from "./base.entity.model";
|
|
3
2
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
3
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
4
4
|
import { IClientQuoteRateEntity } from "../interface/client_quote_rate.entity.interface";
|
|
5
|
+
import { ClientAffiliateEntityModel } from "./client-affiliate.entity.model";
|
|
5
6
|
export declare class ClientQuoteRateEntityModel extends BaseEntityModel<EntityEnum.CLIENT_QUOTE_RATE> implements IClientQuoteRateEntity {
|
|
6
7
|
id: number;
|
|
7
8
|
clientQuoteId: number;
|
|
@@ -19,7 +20,8 @@ export declare class ClientQuoteRateEntityModel extends BaseEntityModel<EntityEn
|
|
|
19
20
|
updatedOn: number;
|
|
20
21
|
createdBy: number;
|
|
21
22
|
updatedBy: number;
|
|
22
|
-
|
|
23
|
+
clientQuote?: ClientAffiliateEntityModel;
|
|
24
|
+
static relationConfigs: RelationConfigs<[EntityEnum.CLIENT_QUOTE], EntityEnum.CLIENT_QUOTE_RATE>;
|
|
23
25
|
static fromEntity(entity: IClientQuoteRateEntity): ClientQuoteRateEntityModel;
|
|
24
26
|
getRelationConfigs(): any[];
|
|
25
27
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ClientQuoteRateEntityModel = void 0;
|
|
4
4
|
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
5
5
|
const base_entity_model_1 = require("./base.entity.model");
|
|
6
|
+
const relation_type_enum_1 = require("../enums/relation-type.enum");
|
|
6
7
|
class ClientQuoteRateEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
7
8
|
constructor() {
|
|
8
9
|
super(...arguments);
|
|
@@ -33,4 +34,14 @@ class ClientQuoteRateEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
exports.ClientQuoteRateEntityModel = ClientQuoteRateEntityModel;
|
|
36
|
-
ClientQuoteRateEntityModel.relationConfigs = [
|
|
37
|
+
ClientQuoteRateEntityModel.relationConfigs = [
|
|
38
|
+
{
|
|
39
|
+
name: entity_utils_interface_1.EntityEnum.CLIENT_QUOTE,
|
|
40
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
41
|
+
key: "clientQuote",
|
|
42
|
+
mapKeyConfig: {
|
|
43
|
+
relationKey: "id",
|
|
44
|
+
key: "clientQuoteId",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
];
|
|
@@ -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
|
+
];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CurrencyEnum } from "../../enums";
|
|
2
2
|
import { ProjectRevenueSplit } from "../enums/project-revenue-split.enum";
|
|
3
3
|
import { ProjectBillingTypeEnum, ProjectStatusEnum } from "../enums/project.entity.enum";
|
|
4
|
-
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
5
|
-
import { IProjectEntity, IProjectUserDto } from "../interface/project.entity.interface";
|
|
4
|
+
import { EntityEnum, Nullable } from "../interface/entity.utils.interface";
|
|
5
|
+
import { IProjectEntity, IProjectUserDto, UsageNotificationThresholdEnum } from "../interface/project.entity.interface";
|
|
6
6
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
7
7
|
import { BaseEntityModel } from "./base.entity.model";
|
|
8
8
|
import { ClientEntityModel } from "./client.entity.model";
|
|
@@ -27,6 +27,8 @@ export declare class ProjectEntityModel extends BaseEntityModel<EntityEnum.PROJE
|
|
|
27
27
|
updatedOn: number;
|
|
28
28
|
billToClientAffiliateId?: number | null;
|
|
29
29
|
revenueSplit: ProjectRevenueSplit;
|
|
30
|
+
usageNotificationSentPercentage?: Nullable<UsageNotificationThresholdEnum>;
|
|
31
|
+
clientQuoteId?: Nullable<number>;
|
|
30
32
|
users?: IProjectUserDto[];
|
|
31
33
|
billingOverdueDays?: number;
|
|
32
34
|
userMappings?: (UserEntityModel & ProjectUserMappingEntityModel)[];
|
|
@@ -37,4 +39,8 @@ export declare class ProjectEntityModel extends BaseEntityModel<EntityEnum.PROJE
|
|
|
37
39
|
populateUsers(users: UserEntityModel[], projectUserMapping: ProjectUserMappingEntityModel[]): void;
|
|
38
40
|
getRelationConfigs(): [import("../interface/relation-config.interface").IRelationConfig<EntityEnum.PROJECT_USER_MAPPING, EntityEnum.PROJECT>, import("../interface/relation-config.interface").IRelationConfig<EntityEnum.CLIENT, EntityEnum.PROJECT>];
|
|
39
41
|
isForeignCurrencyProjoect(): boolean;
|
|
42
|
+
get parsedBillingRate(): any;
|
|
43
|
+
isHourlyProject(): boolean;
|
|
44
|
+
isFixedProject(): boolean;
|
|
45
|
+
isAdhocProject(): boolean;
|
|
40
46
|
}
|
|
@@ -25,6 +25,8 @@ class ProjectEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
25
25
|
this.updatedOn = 0;
|
|
26
26
|
this.billToClientAffiliateId = null;
|
|
27
27
|
this.revenueSplit = project_revenue_split_enum_1.ProjectRevenueSplit.NO;
|
|
28
|
+
this.usageNotificationSentPercentage = null;
|
|
29
|
+
this.clientQuoteId = null;
|
|
28
30
|
this.users = [];
|
|
29
31
|
this.client = {};
|
|
30
32
|
}
|
|
@@ -49,6 +51,8 @@ class ProjectEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
49
51
|
result.billingOverdueDays = entity.billingOverdueDays;
|
|
50
52
|
result.billToClientAffiliateId = entity.billingOverdueDays;
|
|
51
53
|
result.revenueSplit = entity.revenueSplit;
|
|
54
|
+
result.usageNotificationSentPercentage = entity.usageNotificationSentPercentage;
|
|
55
|
+
result.clientQuoteId = result.clientQuoteId;
|
|
52
56
|
return result;
|
|
53
57
|
}
|
|
54
58
|
populateUsers(users, projectUserMapping) {
|
|
@@ -89,6 +93,18 @@ class ProjectEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
89
93
|
isForeignCurrencyProjoect() {
|
|
90
94
|
return this.currency !== enums_1.CurrencyEnum.INR;
|
|
91
95
|
}
|
|
96
|
+
get parsedBillingRate() {
|
|
97
|
+
return this.billingRate ? JSON.parse(this.billingRate) : null;
|
|
98
|
+
}
|
|
99
|
+
isHourlyProject() {
|
|
100
|
+
return this.billingType === project_entity_enum_1.ProjectBillingTypeEnum.HOURLY;
|
|
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
|
+
}
|
|
92
108
|
}
|
|
93
109
|
exports.ProjectEntityModel = ProjectEntityModel;
|
|
94
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): import("./rate.model").RateEntityModel[] | 0;
|
|
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,20 @@ 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;
|
|
33
|
+
return (_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.filter((rate) => rate.currency === projectCurrency)) !== null && _d !== void 0 ? _d : 0;
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
exports.TimesheetEntityModel = TimesheetEntityModel;
|
|
37
|
+
TimesheetEntityModel.relationConfigs = [
|
|
38
|
+
{
|
|
39
|
+
name: entity_utils_interface_1.EntityEnum.USER,
|
|
40
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
41
|
+
key: "user",
|
|
42
|
+
mapKeyConfig: {
|
|
43
|
+
relationKey: "id",
|
|
44
|
+
key: "userId",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
];
|
|
@@ -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 = {}));
|
package/dist/src/index.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
27
|
};
|
|
@@ -149,12 +149,12 @@ export declare function getEnumNames(enumType: object): string[];
|
|
|
149
149
|
export declare function getFilterByPermission<T extends EnumEntityType<EntityEnum>>(permissionFilterConfig: {
|
|
150
150
|
[key: string]: IEntityFilterData<T>;
|
|
151
151
|
}, propertyName: keyof T, userPermission: string, filterDto: IEntityFilterData<T>, emptyValue?: any): {
|
|
152
|
-
[
|
|
152
|
+
[x: string]: any;
|
|
153
153
|
};
|
|
154
154
|
export declare function getFilterByPermissionFn<T extends EnumEntityType<EntityEnum>>(permissionFilterConfig: {
|
|
155
155
|
[key: string]: () => Promise<IEntityFilterData<T>>;
|
|
156
156
|
}, propertyName: keyof T, userPermission: string, filterDto: IEntityFilterData<T>, emptyValue?: any): Promise<{
|
|
157
|
-
[
|
|
157
|
+
[x: string]: any;
|
|
158
158
|
}>;
|
|
159
159
|
export declare function getPropertyFilterByPermissionFn<T extends EnumEntityType<EntityEnum>>(permissionFilterConfig: {
|
|
160
160
|
[key: string]: () => Promise<IEntityFilterData<T>>;
|
|
@@ -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
|
}
|