law-common 10.67.0 → 10.67.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/src/api/interface/vendor.create.dto.interface.d.ts +1 -1
- package/dist/src/entities/interface/vendor.entity.interface.d.ts +1 -0
- package/dist/src/entities/model/vendor.entity.model.d.ts +5 -2
- package/dist/src/entities/model/vendor.entity.model.js +21 -1
- package/package.json +41 -41
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# law-common
|
|
1
|
+
# law-common
|
|
@@ -24,7 +24,7 @@ export interface IVendorBankDetail {
|
|
|
24
24
|
export type IVendorBankDetailCreateExclude = never;
|
|
25
25
|
export interface IVendorBankDetailCreateDto extends Omit<IEntityCreateDto<IVendorBankDetail>, IVendorBankDetailCreateExclude> {
|
|
26
26
|
}
|
|
27
|
-
export type IVendorCreateExclude = "contactDetail" | "bankDetail" | "panDocument" | "gstDocument" | "contractDocument" | "attachmentDocuments" | "status" | "remark";
|
|
27
|
+
export type IVendorCreateExclude = "contactDetail" | "bankDetail" | "panDocument" | "gstDocument" | "contractDocument" | "attachmentDocuments" | "status" | "remark" | "organizationTypeId";
|
|
28
28
|
export interface IVendorCreateDto extends Omit<IEntityCreateDto<IVendorEntity>, IVendorCreateExclude> {
|
|
29
29
|
contactDetail?: IVendorContactDetailCreateDto[];
|
|
30
30
|
bankDetail?: IVendorBankDetailCreateDto[];
|
|
@@ -13,6 +13,7 @@ import { IVendorEntity } from "../interface/vendor.entity.interface";
|
|
|
13
13
|
import { IRowActions } from "./interface/row-actions.interface";
|
|
14
14
|
import { OrganizationTypeEntityModel } from "./organization_type.entity.model";
|
|
15
15
|
import { UserEntityModel } from "./user.entity.model";
|
|
16
|
+
import { StateEntityModel } from "./state.entity.model";
|
|
16
17
|
export declare class VendorEntityModel extends BaseEntityModel<EntityEnum.VENDOR> implements IVendorEntity {
|
|
17
18
|
id: number;
|
|
18
19
|
name: string;
|
|
@@ -39,9 +40,11 @@ export declare class VendorEntityModel extends BaseEntityModel<EntityEnum.VENDOR
|
|
|
39
40
|
updatedOn: number;
|
|
40
41
|
createdBy: number;
|
|
41
42
|
updatedBy: number;
|
|
42
|
-
organizationType?: OrganizationTypeEntityModel;
|
|
43
43
|
status: VendorStatusEnum;
|
|
44
44
|
remark: Nullable<string>;
|
|
45
|
+
organizationTypeId?: Nullable<number>;
|
|
46
|
+
organizationType?: OrganizationTypeEntityModel;
|
|
47
|
+
stateModel?: StateEntityModel;
|
|
45
48
|
static readonly VENDOR_ENTITY_DOCUMENT_TYPES: readonly ["pan", "gst"];
|
|
46
49
|
/**
|
|
47
50
|
* Default number of days added to the Invoice Date to calculate the Due Date,
|
|
@@ -59,7 +62,7 @@ export declare class VendorEntityModel extends BaseEntityModel<EntityEnum.VENDOR
|
|
|
59
62
|
static readonly DEFAULT_DUE_DAYS = 7;
|
|
60
63
|
populateOrganizationTypeModel(organizationTypeEntityModels: OrganizationTypeEntityModel[]): null;
|
|
61
64
|
getPanNoFourthCharacter(): string;
|
|
62
|
-
static relationConfigs: RelationConfigs<[], EntityEnum.VENDOR>;
|
|
65
|
+
static relationConfigs: RelationConfigs<[EntityEnum.STATE], EntityEnum.VENDOR>;
|
|
63
66
|
static fromEntity(entity: IVendorEntity): VendorEntityModel;
|
|
64
67
|
getRelationConfigs(): any[];
|
|
65
68
|
getNextStatus(currentUser: IUserEntity, dto: IEntityUpdateDto<IVendorEntity> & {
|
|
@@ -12,6 +12,7 @@ const vendor_gst_type_enum_1 = require("../enums/vendor_gst_type_enum");
|
|
|
12
12
|
const vendor_location_type_enum_1 = require("../enums/vendor_location_type_enum");
|
|
13
13
|
const vendor_pan_type_enum_1 = require("../enums/vendor_pan_type_enum");
|
|
14
14
|
const vendor_flow_config_1 = require("../flow-configs/vendor-flow.config");
|
|
15
|
+
const relation_type_enum_1 = require("../enums/relation-type.enum");
|
|
15
16
|
class VendorEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
@@ -131,4 +132,23 @@ VendorEntityModel.VENDOR_ENTITY_DOCUMENT_TYPES = ["pan", "gst"];
|
|
|
131
132
|
* @see VendorEntityModel.paymentDueDays
|
|
132
133
|
*/
|
|
133
134
|
VendorEntityModel.DEFAULT_DUE_DAYS = 7;
|
|
134
|
-
VendorEntityModel.relationConfigs = [
|
|
135
|
+
VendorEntityModel.relationConfigs = [
|
|
136
|
+
{
|
|
137
|
+
name: entity_utils_interface_1.EntityEnum.STATE,
|
|
138
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
139
|
+
key: "stateModel",
|
|
140
|
+
mapKeyConfig: {
|
|
141
|
+
relationKey: "name",
|
|
142
|
+
key: "state",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
// {
|
|
146
|
+
// name: EntityEnum.OFFICE_LOCATION,
|
|
147
|
+
// relation: RelationType.MANY,
|
|
148
|
+
// key: "officeLocations",
|
|
149
|
+
// mapKeyConfig: {
|
|
150
|
+
// relationKey: "id",
|
|
151
|
+
// key: "officeLocationId",
|
|
152
|
+
// },
|
|
153
|
+
// },
|
|
154
|
+
];
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "law-common",
|
|
3
|
-
"version": "10.67.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist/**/*"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"clean": "rm -rf dist",
|
|
11
|
-
"build": "npm run clean && tsc",
|
|
12
|
-
"publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta && npm run link",
|
|
13
|
-
"publish:patch": "npm version patch && git push && npm run build && npm publish",
|
|
14
|
-
"publish:minor": "npm version minor && git push && npm run build && npm publish",
|
|
15
|
-
"publish:major": "npm version major && git push && npm run build && npm publish",
|
|
16
|
-
"link": "npm run build && npm link",
|
|
17
|
-
"test": "jest",
|
|
18
|
-
"format": "prettier --write .",
|
|
19
|
-
"check-format": "prettier --check .",
|
|
20
|
-
"pull:link": "git pull && npm run link"
|
|
21
|
-
},
|
|
22
|
-
"keywords": [],
|
|
23
|
-
"author": "",
|
|
24
|
-
"license": "ISC",
|
|
25
|
-
"devDependencies": {
|
|
26
|
-
"@types/jest": "^29.5.13",
|
|
27
|
-
"@types/lodash": "^4.17.21",
|
|
28
|
-
"@types/node": "^22.6.1",
|
|
29
|
-
"jest": "^29.7.0",
|
|
30
|
-
"prettier": "3.8.1",
|
|
31
|
-
"ts-jest": "^29.2.5",
|
|
32
|
-
"ts-node": "^10.9.2",
|
|
33
|
-
"typescript": "^5.6.2"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@types/express": "^5.0.0",
|
|
37
|
-
"@types/multer": "^1.4.12",
|
|
38
|
-
"date-fns": "^4.1.0",
|
|
39
|
-
"lodash": "4.17.21"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "law-common",
|
|
3
|
+
"version": "10.67.1-beta.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/**/*"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"clean": "rm -rf dist",
|
|
11
|
+
"build": "npm run clean && tsc",
|
|
12
|
+
"publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta && npm run link",
|
|
13
|
+
"publish:patch": "npm version patch && git push && npm run build && npm publish",
|
|
14
|
+
"publish:minor": "npm version minor && git push && npm run build && npm publish",
|
|
15
|
+
"publish:major": "npm version major && git push && npm run build && npm publish",
|
|
16
|
+
"link": "npm run build && npm link",
|
|
17
|
+
"test": "jest",
|
|
18
|
+
"format": "prettier --write .",
|
|
19
|
+
"check-format": "prettier --check .",
|
|
20
|
+
"pull:link": "git pull && npm run link"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [],
|
|
23
|
+
"author": "",
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/jest": "^29.5.13",
|
|
27
|
+
"@types/lodash": "^4.17.21",
|
|
28
|
+
"@types/node": "^22.6.1",
|
|
29
|
+
"jest": "^29.7.0",
|
|
30
|
+
"prettier": "3.8.1",
|
|
31
|
+
"ts-jest": "^29.2.5",
|
|
32
|
+
"ts-node": "^10.9.2",
|
|
33
|
+
"typescript": "^5.6.2"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@types/express": "^5.0.0",
|
|
37
|
+
"@types/multer": "^1.4.12",
|
|
38
|
+
"date-fns": "^4.1.0",
|
|
39
|
+
"lodash": "4.17.21"
|
|
40
|
+
}
|
|
41
|
+
}
|