law-common 10.63.2-beta.10 → 10.63.2-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/entities/interface/user.entity.interface.d.ts +2 -1
- package/dist/src/entities/model/user.entity.model.d.ts +2 -1
- package/dist/src/entities/model/user.entity.model.js +1 -0
- package/dist/src/entities/model/vendor.entity.model.d.ts +14 -0
- package/dist/src/entities/model/vendor.entity.model.js +14 -0
- package/dist/src/misc/interface/optional.interface.js +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserRoleEnum, UserStatusEnum } from "../enums/user.entity.enum";
|
|
2
2
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
|
-
import { IEntityFilterData } from "./entity.utils.interface";
|
|
3
|
+
import { IEntityFilterData, Nullable } from "./entity.utils.interface";
|
|
4
4
|
export interface IUserEntity extends IEntityAuditColumn {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
@@ -23,6 +23,7 @@ export interface IUserEntity extends IEntityAuditColumn {
|
|
|
23
23
|
dateOfBirth?: string;
|
|
24
24
|
status?: UserStatusEnum;
|
|
25
25
|
organizationId: number;
|
|
26
|
+
reportingManagerId?: Nullable<number>;
|
|
26
27
|
passportDocumentUrl?: string | null;
|
|
27
28
|
academicQualificationDocumentUrl?: string | null;
|
|
28
29
|
officeAllocation: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserRoleEnum, UserStatusEnum } from "../enums/user.entity.enum";
|
|
2
|
-
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
2
|
+
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";
|
|
@@ -25,6 +25,7 @@ export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> im
|
|
|
25
25
|
role: UserRoleEnum;
|
|
26
26
|
status?: UserStatusEnum;
|
|
27
27
|
organizationId: number;
|
|
28
|
+
reportingManagerId?: Nullable<number>;
|
|
28
29
|
passportDocumentUrl?: string;
|
|
29
30
|
academicQualificationDocumentUrl?: string;
|
|
30
31
|
officeAllocation: number;
|
|
@@ -15,6 +15,7 @@ class UserEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
15
15
|
this.designation = "";
|
|
16
16
|
this.role = user_entity_enum_1.UserRoleEnum.employee;
|
|
17
17
|
this.organizationId = 0;
|
|
18
|
+
this.reportingManagerId = 0;
|
|
18
19
|
this.officeAllocation = 0;
|
|
19
20
|
this.tempAddressSameAsPrimary = true;
|
|
20
21
|
this.emergencyContactName = "";
|
|
@@ -43,6 +43,20 @@ export declare class VendorEntityModel extends BaseEntityModel<EntityEnum.VENDOR
|
|
|
43
43
|
status: VendorStatusEnum;
|
|
44
44
|
remark: Nullable<string>;
|
|
45
45
|
static readonly VENDOR_ENTITY_DOCUMENT_TYPES: readonly ["pan", "gst"];
|
|
46
|
+
/**
|
|
47
|
+
* Default number of days added to the Invoice Date to calculate the Due Date,
|
|
48
|
+
* used as a fallback when the Vendor does not have a `dueDays` value configured.
|
|
49
|
+
*
|
|
50
|
+
* @formula
|
|
51
|
+
* DueDate = InvoiceDate + (vendor.dueDays ?? VendorEntityModel.DEFAULT_DUE_DAYS)
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* vendor.dueDays = 30 → DueDate = InvoiceDate + 30
|
|
55
|
+
* vendor.dueDays = null → DueDate = InvoiceDate + 7 (this constant)
|
|
56
|
+
*
|
|
57
|
+
* @see VendorEntityModel.dueDays
|
|
58
|
+
*/
|
|
59
|
+
static readonly DEFAULT_DUE_DAYS = 7;
|
|
46
60
|
populateOrganizationTypeModel(organizationTypeEntityModels: OrganizationTypeEntityModel[]): null;
|
|
47
61
|
getPanNoFourthCharacter(): string;
|
|
48
62
|
static relationConfigs: RelationConfigs<[], EntityEnum.VENDOR>;
|
|
@@ -117,4 +117,18 @@ class VendorEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
117
117
|
}
|
|
118
118
|
exports.VendorEntityModel = VendorEntityModel;
|
|
119
119
|
VendorEntityModel.VENDOR_ENTITY_DOCUMENT_TYPES = ["pan", "gst"];
|
|
120
|
+
/**
|
|
121
|
+
* Default number of days added to the Invoice Date to calculate the Due Date,
|
|
122
|
+
* used as a fallback when the Vendor does not have a `dueDays` value configured.
|
|
123
|
+
*
|
|
124
|
+
* @formula
|
|
125
|
+
* DueDate = InvoiceDate + (vendor.dueDays ?? VendorEntityModel.DEFAULT_DUE_DAYS)
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* vendor.dueDays = 30 → DueDate = InvoiceDate + 30
|
|
129
|
+
* vendor.dueDays = null → DueDate = InvoiceDate + 7 (this constant)
|
|
130
|
+
*
|
|
131
|
+
* @see VendorEntityModel.dueDays
|
|
132
|
+
*/
|
|
133
|
+
VendorEntityModel.DEFAULT_DUE_DAYS = 7;
|
|
120
134
|
VendorEntityModel.relationConfigs = [];
|