law-common 11.2.1 → 11.3.0
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/index.d.ts +0 -2
- package/dist/src/api/index.js +0 -2
- package/dist/src/api/interface/state.update.dto.interface.d.ts +3 -6
- package/dist/src/api/interface/state.update.dto.interface.js +2 -6
- package/dist/src/api/interface/vendor-invoice.entity.response.d.ts +3 -3
- package/dist/src/api/interface/vendor-invoice.entity.response.js +2 -2
- package/dist/src/api/interface/vendor_invoice.create.dto.interface.d.ts +1 -1
- package/dist/src/api/interface/vendor_invoice.update.dto.interface.d.ts +2 -3
- package/dist/src/entities/enums/state_status_enum.d.ts +3 -10
- package/dist/src/entities/enums/state_status_enum.js +3 -13
- package/dist/src/entities/enums/vendor_invoice_action.enum.d.ts +1 -3
- package/dist/src/entities/enums/vendor_invoice_action.enum.js +0 -2
- package/dist/src/entities/enums/vendor_invoice_action_status_enum.autocode.js +1 -1
- package/dist/src/entities/enums/vendor_invoice_action_status_enum.d.ts +1 -1
- package/dist/src/entities/enums/vendor_invoice_action_status_enum.js +13 -13
- package/dist/src/entities/enums/vendor_invoice_status_enum.autocode.js +1 -1
- package/dist/src/entities/enums/vendor_invoice_status_enum.d.ts +1 -1
- package/dist/src/entities/enums/vendor_invoice_status_enum.js +6 -6
- package/dist/src/entities/flow-configs/state_flow.config.js +58 -263
- package/dist/src/entities/flow-configs/vendor-invoice-flow.config.d.ts +2 -11
- package/dist/src/entities/flow-configs/vendor-invoice-flow.config.js +197 -138
- package/dist/src/entities/index.d.ts +0 -5
- package/dist/src/entities/index.js +0 -5
- package/dist/src/entities/interface/entity.utils.interface.d.ts +2 -5
- package/dist/src/entities/interface/entity.utils.interface.js +0 -1
- package/dist/src/entities/interface/vendor_invoice.entity.interface.autocode.js +4 -4
- package/dist/src/entities/interface/vendor_invoice.entity.interface.d.ts +3 -5
- package/dist/src/entities/model/bank.entity.model.d.ts +1 -0
- package/dist/src/entities/model/bank.entity.model.js +7 -0
- package/dist/src/entities/model/billing.entity.model.js +7 -7
- package/dist/src/entities/model/entity.model.interface.js +1 -3
- package/dist/src/entities/model/project.entity.model.d.ts +1 -1
- package/dist/src/entities/model/project.entity.model.js +1 -1
- package/dist/src/entities/model/state.entity.model.js +1 -1
- package/dist/src/entities/model/vendor_invoice.entity.model.autocode.js +4 -4
- package/dist/src/entities/model/vendor_invoice.entity.model.d.ts +5 -8
- package/dist/src/entities/model/vendor_invoice.entity.model.js +51 -99
- package/dist/src/entities/model/vendor_invoice_item.entity.model.js +1 -1
- package/dist/src/enums/error.key.enum.d.ts +1 -2
- package/dist/src/enums/error.key.enum.js +0 -1
- package/package.json +42 -47
- package/dist/src/api/interface/vendor_invoice_payment.create.dto.interface.d.ts +0 -5
- package/dist/src/api/interface/vendor_invoice_payment.create.dto.interface.js +0 -2
- package/dist/src/api/interface/vendor_invoice_payment.update.dto.interface.d.ts +0 -18
- package/dist/src/api/interface/vendor_invoice_payment.update.dto.interface.js +0 -13
- package/dist/src/entities/enums/vendor_invoice_payment_mode_enum.d.ts +0 -7
- package/dist/src/entities/enums/vendor_invoice_payment_mode_enum.js +0 -11
- package/dist/src/entities/enums/vendor_invoice_payment_status_enum.d.ts +0 -10
- package/dist/src/entities/enums/vendor_invoice_payment_status_enum.js +0 -14
- package/dist/src/entities/flow-configs/vendor_invoice_payment_flow.config.d.ts +0 -6
- package/dist/src/entities/flow-configs/vendor_invoice_payment_flow.config.js +0 -205
- package/dist/src/entities/interface/vendor_invoice_payment.entity.interface.d.ts +0 -14
- package/dist/src/entities/interface/vendor_invoice_payment.entity.interface.js +0 -2
- package/dist/src/entities/model/vendor_invoice_payment.entity.model.d.ts +0 -62
- package/dist/src/entities/model/vendor_invoice_payment.entity.model.js +0 -209
|
@@ -90,7 +90,7 @@ class ProjectEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
90
90
|
getRelationConfigs() {
|
|
91
91
|
return ProjectEntityModel.relationConfigs;
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
isForeignCurrencyProject() {
|
|
94
94
|
return this.currency !== enums_1.CurrencyEnum.INR;
|
|
95
95
|
}
|
|
96
96
|
get parsedBillingRate() {
|
|
@@ -15,7 +15,7 @@ class StateEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
15
15
|
this.id = 0;
|
|
16
16
|
this.name = "";
|
|
17
17
|
this.code = "";
|
|
18
|
-
this.status = state_status_enum_1.StateStatusEnum.
|
|
18
|
+
this.status = state_status_enum_1.StateStatusEnum.ACTIVE;
|
|
19
19
|
this.createdOn = 0;
|
|
20
20
|
this.updatedOn = 0;
|
|
21
21
|
this.createdBy = 0;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// import { RelationConfigs } from "../interface/relation-config.interface";
|
|
5
5
|
// import { RelationType } from "../enums/relation-type.enum";
|
|
6
6
|
// import { IVendorInvoiceEntity } from "../interface/vendor_invoice.entity.interface";
|
|
7
|
-
// import {
|
|
8
|
-
// import {
|
|
7
|
+
// import { VendorInvoiceStatusEnum } from "../enums/vendor_invoice_status_enum";
|
|
8
|
+
// import { VendorInvoiceActionStatusEnum } from "../enums/vendor_invoice_action_status_enum";
|
|
9
9
|
// import { VendorEntityModel } from "./vendor.entity.model";
|
|
10
10
|
// import { OfficeLocationEntityModel } from "./office_location.entity.model";
|
|
11
11
|
// export class VendorInvoiceEntityModel extends BaseEntityModel<EntityEnum.VENDOR_INVOICE> implements IVendorInvoiceEntity {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
// voucherNo?: string;
|
|
19
19
|
// voucherDate?: number;
|
|
20
20
|
// invoiceDocuments: string = "";
|
|
21
|
-
// status:
|
|
22
|
-
// actionStatus:
|
|
21
|
+
// status: VendorInvoiceStatusEnum = VendorInvoiceStatusEnum.PENDING;
|
|
22
|
+
// actionStatus: VendorInvoiceActionStatusEnum = VendorInvoiceActionStatusEnum.PENDING_APPROVAL;
|
|
23
23
|
// createdOn: number = 0;
|
|
24
24
|
// updatedOn: number = 0;
|
|
25
25
|
// createdBy: number = 0;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EntityEnum, Nullable } from "../interface/entity.utils.interface";
|
|
2
2
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
3
3
|
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
+
import { IVendorInvoiceUpdateDto } from "../../api";
|
|
4
5
|
import { VendorInvoiceActionEnum } from "../enums/vendor_invoice_action.enum";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { IVendorInvoiceFlowConfigContextData } from "../flow-configs/vendor-invoice-flow.config";
|
|
6
|
+
import { VendorInvoiceActionStatusEnum } from "../enums/vendor_invoice_action_status_enum";
|
|
7
|
+
import { VendorInvoiceStatusEnum } from "../enums/vendor_invoice_status_enum";
|
|
8
8
|
import { IUserEntity } from "../interface/user.entity.interface";
|
|
9
9
|
import { IVendorInvoiceEntity } from "../interface/vendor_invoice.entity.interface";
|
|
10
10
|
import { IRowActions } from "./interface/row-actions.interface";
|
|
@@ -22,8 +22,8 @@ export declare class VendorInvoiceEntityModel extends BaseEntityModel<EntityEnum
|
|
|
22
22
|
voucherNo?: string;
|
|
23
23
|
voucherDate?: number;
|
|
24
24
|
invoiceDocuments: string;
|
|
25
|
-
paidStatus: VendorInvoicePaidStatusEnum;
|
|
26
25
|
status: VendorInvoiceStatusEnum;
|
|
26
|
+
actionStatus: VendorInvoiceActionStatusEnum;
|
|
27
27
|
remark: Nullable<string>;
|
|
28
28
|
createdOn: number;
|
|
29
29
|
updatedOn: number;
|
|
@@ -34,14 +34,13 @@ export declare class VendorInvoiceEntityModel extends BaseEntityModel<EntityEnum
|
|
|
34
34
|
totalGstAmount: number;
|
|
35
35
|
totalTdsAmount: number;
|
|
36
36
|
totalNetAmount: number;
|
|
37
|
-
paidAmount: number;
|
|
38
|
-
adjustedAmount: number;
|
|
39
37
|
vendor?: VendorEntityModel;
|
|
40
38
|
officeLocation?: OfficeLocationEntityModel;
|
|
41
39
|
vendorInvoiceItems?: VendorInvoiceItemEntityModel[];
|
|
42
40
|
static relationConfigs: RelationConfigs<[EntityEnum.VENDOR, EntityEnum.OFFICE_LOCATION, EntityEnum.VENDOR_INVOICE_ITEM], EntityEnum.VENDOR_INVOICE>;
|
|
43
41
|
static fromEntity(entity: IVendorInvoiceEntity): VendorInvoiceEntityModel;
|
|
44
42
|
getRelationConfigs(): any[];
|
|
43
|
+
getNextStatusForParent(currentUser: IUserEntity, dto: IVendorInvoiceUpdateDto): VendorInvoiceActionStatusEnum;
|
|
45
44
|
getAvailableActions(currentUser: UserEntityModel, config?: {
|
|
46
45
|
combinedActions?: Record<string, {
|
|
47
46
|
combineActions: VendorInvoiceActionEnum[];
|
|
@@ -111,6 +110,4 @@ export declare class VendorInvoiceEntityModel extends BaseEntityModel<EntityEnum
|
|
|
111
110
|
* @returns The next voucher number string in format `<FY-1><FY><MM><DD><###>`
|
|
112
111
|
*/
|
|
113
112
|
static getNextVoucherNumber(existingVendorInvoices: VendorInvoiceEntityModel[]): string;
|
|
114
|
-
getNextStatus(currentUser: IUserEntity, action: VendorInvoiceActionEnum, vendorInvoiceFlowConfigContextData: IVendorInvoiceFlowConfigContextData): VendorInvoiceStatusEnum;
|
|
115
|
-
getBalanceAmount(): number;
|
|
116
113
|
}
|
|
@@ -7,6 +7,7 @@ const error_key_enum_1 = require("../../enums/error.key.enum");
|
|
|
7
7
|
const exceptions_1 = require("../../exceptions");
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
const relation_type_enum_1 = require("../enums/relation-type.enum");
|
|
10
|
+
const vendor_invoice_action_enum_1 = require("../enums/vendor_invoice_action.enum");
|
|
10
11
|
const vendor_invoice_action_status_enum_1 = require("../enums/vendor_invoice_action_status_enum");
|
|
11
12
|
const vendor_invoice_status_enum_1 = require("../enums/vendor_invoice_status_enum");
|
|
12
13
|
const vendor_invoice_flow_config_1 = require("../flow-configs/vendor-invoice-flow.config");
|
|
@@ -19,8 +20,8 @@ class VendorInvoiceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
19
20
|
this.invoiceNo = "";
|
|
20
21
|
this.invoiceDate = 0;
|
|
21
22
|
this.invoiceDocuments = "";
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
23
|
+
this.status = vendor_invoice_status_enum_1.VendorInvoiceStatusEnum.PENDING;
|
|
24
|
+
this.actionStatus = vendor_invoice_action_status_enum_1.VendorInvoiceActionStatusEnum.CREATE_APPROVAL;
|
|
24
25
|
this.remark = null;
|
|
25
26
|
this.createdOn = 0;
|
|
26
27
|
this.updatedOn = 0;
|
|
@@ -31,8 +32,6 @@ class VendorInvoiceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
31
32
|
this.totalGstAmount = 0;
|
|
32
33
|
this.totalTdsAmount = 0;
|
|
33
34
|
this.totalNetAmount = 0;
|
|
34
|
-
this.paidAmount = 0;
|
|
35
|
-
this.adjustedAmount = 0;
|
|
36
35
|
}
|
|
37
36
|
static fromEntity(entity) {
|
|
38
37
|
const result = new VendorInvoiceEntityModel(entity_utils_interface_1.EntityEnum.VENDOR_INVOICE);
|
|
@@ -42,58 +41,58 @@ class VendorInvoiceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
42
41
|
getRelationConfigs() {
|
|
43
42
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
44
|
+
getNextStatusForParent(currentUser, dto) {
|
|
45
|
+
const flowForStatus = vendor_invoice_flow_config_1.vendorInvoiceFlowConfig[this.actionStatus];
|
|
46
|
+
if (!flowForStatus) {
|
|
47
|
+
throw new exceptions_1.AppBadRequestException({
|
|
48
|
+
key: error_key_enum_1.ErrorKeyEnum.STATUS,
|
|
49
|
+
message: [`Status not found: ${this.status}`],
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (!dto.actionData) {
|
|
53
|
+
dto.actionData = { action: vendor_invoice_action_enum_1.VendorInvoiceActionEnum.EDIT };
|
|
54
|
+
}
|
|
55
|
+
const matchingPermissionConfig = flowForStatus.actions[dto.actionData.action];
|
|
56
|
+
if (!matchingPermissionConfig) {
|
|
57
|
+
throw new exceptions_1.AppBadRequestException({
|
|
58
|
+
key: error_key_enum_1.ErrorKeyEnum.ACTION,
|
|
59
|
+
message: [`Action '${dto.actionData.action}' is not valid for the current status '${this.status}'.`],
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (!currentUser.permissions || currentUser.permissions.length === 0) {
|
|
63
|
+
throw new exceptions_1.AppBadRequestException({
|
|
64
|
+
key: error_key_enum_1.ErrorKeyEnum.PERMISSIONS,
|
|
65
|
+
message: ["Permission not available for currentUser"],
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const hasPermission = matchingPermissionConfig.permissions.some((permission) => { var _a; return (_a = currentUser.permissions) === null || _a === void 0 ? void 0 : _a.includes(permission); });
|
|
69
|
+
if (!hasPermission) {
|
|
70
|
+
throw new exceptions_1.AppBadRequestException({
|
|
71
|
+
key: error_key_enum_1.ErrorKeyEnum.PERMISSION,
|
|
72
|
+
message: [`Current user does not have permission to ${dto.actionData.action} vendor`],
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
if (!this.vendorInvoiceItems) {
|
|
76
|
+
throw new exceptions_1.AppBadRequestException({
|
|
77
|
+
key: error_key_enum_1.ErrorKeyEnum.VENDOR_INVOICE_ITEMS,
|
|
78
|
+
message: [`Vendor invoice items are required for getting next status of Vendor Invoice.`],
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// const contextFlowData: IVendorInvoiceFlowContextData = {
|
|
82
|
+
// invoice: this,
|
|
83
|
+
// items: this.vendorInvoiceItems,
|
|
84
|
+
// };
|
|
85
|
+
let nextStatus = vendor_invoice_action_status_enum_1.VendorInvoiceActionStatusEnum.CREATE_APPROVAL;
|
|
86
|
+
if (matchingPermissionConfig.next) {
|
|
87
|
+
nextStatus = matchingPermissionConfig.next();
|
|
88
|
+
}
|
|
89
|
+
return nextStatus;
|
|
90
|
+
}
|
|
92
91
|
getAvailableActions(currentUser, config) {
|
|
93
92
|
var _a;
|
|
94
93
|
const params = {
|
|
95
94
|
flowConfig: vendor_invoice_flow_config_1.vendorInvoiceFlowConfig,
|
|
96
|
-
currentStatus: this.
|
|
95
|
+
currentStatus: this.actionStatus,
|
|
97
96
|
userPermissions: (_a = currentUser.permissions) !== null && _a !== void 0 ? _a : [],
|
|
98
97
|
visibilityData: this.getUpdateActionVisibility.bind(this, currentUser),
|
|
99
98
|
combinedActions: config === null || config === void 0 ? void 0 : config.combinedActions,
|
|
@@ -195,53 +194,6 @@ class VendorInvoiceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
195
194
|
}
|
|
196
195
|
return `${basePrefix}${String(maxSequence + 1).padStart(3, "0")}`;
|
|
197
196
|
}
|
|
198
|
-
getNextStatus(currentUser, action, vendorInvoiceFlowConfigContextData) {
|
|
199
|
-
const actionStatus = this.status;
|
|
200
|
-
if (!actionStatus) {
|
|
201
|
-
throw new exceptions_1.AppBadRequestException({
|
|
202
|
-
key: error_key_enum_1.ErrorKeyEnum.STATUS,
|
|
203
|
-
message: [`Status not found: ${actionStatus}`],
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
const flowForStatus = vendor_invoice_flow_config_1.vendorInvoiceFlowConfig[actionStatus];
|
|
207
|
-
if (!flowForStatus) {
|
|
208
|
-
throw new exceptions_1.AppBadRequestException({
|
|
209
|
-
key: error_key_enum_1.ErrorKeyEnum.STATUS,
|
|
210
|
-
message: [`No flow configuration found for status: ${actionStatus}`],
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
if (!action) {
|
|
214
|
-
throw new exceptions_1.AppBadRequestException({
|
|
215
|
-
key: error_key_enum_1.ErrorKeyEnum.ACTION_DATA,
|
|
216
|
-
message: ["actionData is required"],
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
const matchingPermissionConfig = flowForStatus.actions[action];
|
|
220
|
-
if (!matchingPermissionConfig) {
|
|
221
|
-
throw new exceptions_1.AppBadRequestException({
|
|
222
|
-
key: error_key_enum_1.ErrorKeyEnum.ACTION,
|
|
223
|
-
message: [`Action '${action}' is not valid for the current status '${actionStatus}'.`],
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
if (!currentUser.permissions || currentUser.permissions.length === 0) {
|
|
227
|
-
throw new exceptions_1.AppBadRequestException({
|
|
228
|
-
key: error_key_enum_1.ErrorKeyEnum.PERMISSIONS,
|
|
229
|
-
message: ["Permission not available for currentUser"],
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
const hasPermission = matchingPermissionConfig.permissions.some((permission) => currentUser.permissions.includes(permission));
|
|
233
|
-
if (!hasPermission) {
|
|
234
|
-
throw new exceptions_1.AppBadRequestException({
|
|
235
|
-
key: error_key_enum_1.ErrorKeyEnum.PERMISSION,
|
|
236
|
-
message: [`Current user does not have permission to ${action} leaveApproval. Required permissions: ${matchingPermissionConfig.permissions.join(", ")}`],
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
const nextStatus = matchingPermissionConfig.next(vendorInvoiceFlowConfigContextData);
|
|
240
|
-
return nextStatus;
|
|
241
|
-
}
|
|
242
|
-
getBalanceAmount() {
|
|
243
|
-
return this.totalInvoiceAmount - this.paidAmount - this.adjustedAmount;
|
|
244
|
-
}
|
|
245
197
|
}
|
|
246
198
|
exports.VendorInvoiceEntityModel = VendorInvoiceEntityModel;
|
|
247
199
|
VendorInvoiceEntityModel.relationConfigs = [
|
|
@@ -106,7 +106,7 @@ class VendorInvoiceItemEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
106
106
|
}
|
|
107
107
|
// getNextStatus(dto: IVendorInvoiceItemUpdateDto, currentUser: IUserEntity): VendorInvoiceItemStatus {
|
|
108
108
|
// // const flow = vendorInvoiceConfigFlow as FlowConfig<
|
|
109
|
-
// //
|
|
109
|
+
// // VendorInvoiceActionStatusEnum,
|
|
110
110
|
// // VendorInvoiceActionEnum,
|
|
111
111
|
// // VendorInvoiceItemStatus,
|
|
112
112
|
// // VendorInvoiceItemActionEnum
|
|
@@ -34,6 +34,5 @@ export declare enum ErrorKeyEnum {
|
|
|
34
34
|
BILLING_EXPORT_TYPE = "BILLING_EXPORT_TYPE",
|
|
35
35
|
VENDOR_INVOICE_ITEMS = "VENDOR_INVOICE_ITEMS",
|
|
36
36
|
PROJECT_USER_MAPPING = "PROJECT_USER_MAPPING",
|
|
37
|
-
CONFIGURATION_KEY = "CONFIGURATION_KEY"
|
|
38
|
-
VENDOR_INVOICE_FLOW_CONTEXT_DATA = "VENDOR_INVOICE_FLOW_CONTEXT_DATA"
|
|
37
|
+
CONFIGURATION_KEY = "CONFIGURATION_KEY"
|
|
39
38
|
}
|
|
@@ -39,5 +39,4 @@ var ErrorKeyEnum;
|
|
|
39
39
|
ErrorKeyEnum["VENDOR_INVOICE_ITEMS"] = "VENDOR_INVOICE_ITEMS";
|
|
40
40
|
ErrorKeyEnum["PROJECT_USER_MAPPING"] = "PROJECT_USER_MAPPING";
|
|
41
41
|
ErrorKeyEnum["CONFIGURATION_KEY"] = "CONFIGURATION_KEY";
|
|
42
|
-
ErrorKeyEnum["VENDOR_INVOICE_FLOW_CONTEXT_DATA"] = "VENDOR_INVOICE_FLOW_CONTEXT_DATA";
|
|
43
42
|
})(ErrorKeyEnum || (exports.ErrorKeyEnum = ErrorKeyEnum = {}));
|
package/package.json
CHANGED
|
@@ -1,47 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "law-common",
|
|
3
|
-
"version": "11.
|
|
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
|
|
13
|
-
"publish:
|
|
14
|
-
"publish:
|
|
15
|
-
"publish:
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"format": "prettier --
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"@types/multer": "^1.4.12",
|
|
44
|
-
"date-fns": "^4.1.0",
|
|
45
|
-
"lodash": "4.17.21"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "law-common",
|
|
3
|
+
"version": "11.3.0",
|
|
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",
|
|
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
|
+
"check-version": "npm view law-common versions --json | jq -r '.[-1]'"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [],
|
|
24
|
+
"author": "",
|
|
25
|
+
"license": "ISC",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/jest": "^29.5.13",
|
|
28
|
+
"@types/lodash": "^4.17.21",
|
|
29
|
+
"@types/node": "^22.6.1",
|
|
30
|
+
"jest": "^29.7.0",
|
|
31
|
+
"prettier": "3.8.1",
|
|
32
|
+
"ts-jest": "^29.2.5",
|
|
33
|
+
"ts-node": "^10.9.2",
|
|
34
|
+
"typescript": "^5.6.2"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@types/express": "^5.0.0",
|
|
38
|
+
"@types/multer": "^1.4.12",
|
|
39
|
+
"date-fns": "^4.1.0",
|
|
40
|
+
"lodash": "4.17.21"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IEntityCreateDto } from "../../entities";
|
|
2
|
-
import { IVendorInvoicePaymentEntity } from "../../entities/interface/vendor_invoice_payment.entity.interface";
|
|
3
|
-
export type IVendorInvoicePaymentCreateExclude = "status";
|
|
4
|
-
export interface IVendorInvoicePaymentCreateDto extends Omit<IEntityCreateDto<IVendorInvoicePaymentEntity>, IVendorInvoicePaymentCreateExclude> {
|
|
5
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DeepPartialButRequired } from "./api.utils.interface";
|
|
2
|
-
import { IVendorInvoicePaymentCreateDto } from "./vendor_invoice_payment.create.dto.interface";
|
|
3
|
-
export type IVendorInvoicePaymentUpdateDto = DeepPartialButRequired<IVendorInvoicePaymentCreateDto, never> & {
|
|
4
|
-
actionData: IVendorInvoicePaymentActionDataDto;
|
|
5
|
-
};
|
|
6
|
-
export interface IVendorInvoicePaymentActionDataDto {
|
|
7
|
-
action: VendorInvoicePaymentActionEnum;
|
|
8
|
-
remark?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare enum VendorInvoicePaymentActionEnum {
|
|
11
|
-
UPDATE = "update",
|
|
12
|
-
DELETE = "delete",
|
|
13
|
-
CREATE = "create",
|
|
14
|
-
APPROVE = "approve",
|
|
15
|
-
REJECT = "reject",
|
|
16
|
-
RECALL = "recall",
|
|
17
|
-
DEACTIVATE = "deactivate"
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VendorInvoicePaymentActionEnum = void 0;
|
|
4
|
-
var VendorInvoicePaymentActionEnum;
|
|
5
|
-
(function (VendorInvoicePaymentActionEnum) {
|
|
6
|
-
VendorInvoicePaymentActionEnum["UPDATE"] = "update";
|
|
7
|
-
VendorInvoicePaymentActionEnum["DELETE"] = "delete";
|
|
8
|
-
VendorInvoicePaymentActionEnum["CREATE"] = "create";
|
|
9
|
-
VendorInvoicePaymentActionEnum["APPROVE"] = "approve";
|
|
10
|
-
VendorInvoicePaymentActionEnum["REJECT"] = "reject";
|
|
11
|
-
VendorInvoicePaymentActionEnum["RECALL"] = "recall";
|
|
12
|
-
VendorInvoicePaymentActionEnum["DEACTIVATE"] = "deactivate";
|
|
13
|
-
})(VendorInvoicePaymentActionEnum || (exports.VendorInvoicePaymentActionEnum = VendorInvoicePaymentActionEnum = {}));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VendorInvoicePaymentModeEnum = void 0;
|
|
4
|
-
var VendorInvoicePaymentModeEnum;
|
|
5
|
-
(function (VendorInvoicePaymentModeEnum) {
|
|
6
|
-
VendorInvoicePaymentModeEnum["CASH"] = "CASH";
|
|
7
|
-
VendorInvoicePaymentModeEnum["NEFT"] = "NEFT";
|
|
8
|
-
VendorInvoicePaymentModeEnum["RTGS"] = "RTGS";
|
|
9
|
-
VendorInvoicePaymentModeEnum["UPI"] = "UPI";
|
|
10
|
-
VendorInvoicePaymentModeEnum["CHEQUE"] = "CHEQUE";
|
|
11
|
-
})(VendorInvoicePaymentModeEnum || (exports.VendorInvoicePaymentModeEnum = VendorInvoicePaymentModeEnum = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum VendorInvoicePaymentStatusEnum {
|
|
2
|
-
DEACTIVATED = "DEACTIVATED",
|
|
3
|
-
DELETED = "DELETED",
|
|
4
|
-
APPROVED = "APPROVED",
|
|
5
|
-
REJECTED = "REJECTED",
|
|
6
|
-
CREATE_APPROVAL_PENDING = "CREATE_APPROVAL_PENDING",
|
|
7
|
-
UPDATE_APPROVAL_PENDING = "UPDATE_APPROVAL_PENDING",
|
|
8
|
-
DELETE_APPROVAL_PENDING = "DELETE_APPROVAL_PENDING",
|
|
9
|
-
RESOLVED_REJECTED = "RESOLVED_REJECTED"
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VendorInvoicePaymentStatusEnum = void 0;
|
|
4
|
-
var VendorInvoicePaymentStatusEnum;
|
|
5
|
-
(function (VendorInvoicePaymentStatusEnum) {
|
|
6
|
-
VendorInvoicePaymentStatusEnum["DEACTIVATED"] = "DEACTIVATED";
|
|
7
|
-
VendorInvoicePaymentStatusEnum["DELETED"] = "DELETED";
|
|
8
|
-
VendorInvoicePaymentStatusEnum["APPROVED"] = "APPROVED";
|
|
9
|
-
VendorInvoicePaymentStatusEnum["REJECTED"] = "REJECTED";
|
|
10
|
-
VendorInvoicePaymentStatusEnum["CREATE_APPROVAL_PENDING"] = "CREATE_APPROVAL_PENDING";
|
|
11
|
-
VendorInvoicePaymentStatusEnum["UPDATE_APPROVAL_PENDING"] = "UPDATE_APPROVAL_PENDING";
|
|
12
|
-
VendorInvoicePaymentStatusEnum["DELETE_APPROVAL_PENDING"] = "DELETE_APPROVAL_PENDING";
|
|
13
|
-
VendorInvoicePaymentStatusEnum["RESOLVED_REJECTED"] = "RESOLVED_REJECTED";
|
|
14
|
-
})(VendorInvoicePaymentStatusEnum || (exports.VendorInvoicePaymentStatusEnum = VendorInvoicePaymentStatusEnum = {}));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FlowConfig } from "./flow-config.type";
|
|
2
|
-
import { VendorInvoicePaymentActionEnum } from "../../api";
|
|
3
|
-
import { VendorInvoicePaymentStatusEnum } from "../enums/vendor_invoice_payment_status_enum";
|
|
4
|
-
export interface IVendorInvoicePaymentFlowConfigContextData {
|
|
5
|
-
}
|
|
6
|
-
export declare const vendorInvoicePaymentFlowConfig: FlowConfig<VendorInvoicePaymentStatusEnum, VendorInvoicePaymentActionEnum, IVendorInvoicePaymentFlowConfigContextData>;
|