@managesome/eposmatic-toolkit 0.2.439 → 0.2.441
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/lib/constants/RFQ.d.ts +0 -37
- package/lib/constants/RFQ.js +0 -85
- package/lib/constants/TENANT_ENUMS.d.ts +17 -0
- package/lib/constants/TENANT_ENUMS.js +24 -0
- package/lib/constants/TENANT_PURCHASE_ORDER.d.ts +16 -0
- package/lib/constants/TENANT_PURCHASE_ORDER.js +94 -0
- package/lib/constants/index.d.ts +3 -2
- package/lib/constants/index.js +3 -2
- package/lib/helpers/store/all-warehouse-purchase-order-rfqs-actions.d.ts +17 -0
- package/lib/helpers/store/all-warehouse-purchase-order-rfqs-actions.js +73 -0
- package/lib/helpers/store/all-warehouse-sale-order-rfqs-actions.d.ts +17 -0
- package/lib/helpers/store/all-warehouse-sale-order-rfqs-actions.js +73 -0
- package/lib/helpers/store/common-warehouse-purchase-order-rfq-actions.d.ts +30 -0
- package/lib/helpers/store/common-warehouse-purchase-order-rfq-actions.js +537 -0
- package/lib/helpers/store/common-warehouse-sale-order-rfq-actions.d.ts +5 -0
- package/lib/helpers/store/common-warehouse-sale-order-rfq-actions.js +60 -0
- package/lib/helpers/store/index.d.ts +7 -3
- package/lib/helpers/store/index.js +7 -3
- package/lib/helpers/types/index.d.ts +1 -0
- package/lib/helpers/types/index.js +1 -0
- package/lib/helpers/types/warehouse-purchase-order-rfq-cart-actions.d.ts +26 -0
- package/lib/helpers/types/warehouse-purchase-order-rfq-cart-actions.js +2 -0
- package/lib/schemas/models/index.d.ts +2 -0
- package/lib/schemas/models/index.js +2 -0
- package/lib/schemas/models/tenant_purchase_order_vendor_returns.d.ts +219 -0
- package/lib/schemas/models/tenant_purchase_order_vendor_returns.js +83 -0
- package/lib/schemas/models/tenant_purchase_orders.d.ts +2783 -0
- package/lib/schemas/models/tenant_purchase_orders.js +138 -0
- package/lib/schemas/models/warehouse_purchase_order_receipts.d.ts +9 -9
- package/lib/schemas/models/warehouse_purchase_order_vendor_returns.d.ts +12 -12
- package/lib/schemas/types/index.d.ts +2 -0
- package/lib/schemas/types/index.js +2 -0
- package/lib/schemas/types/tenant_purchase_order_vendor_returns.d.ts +46 -0
- package/lib/schemas/types/tenant_purchase_order_vendor_returns.js +2 -0
- package/lib/schemas/types/tenant_purchase_orders.d.ts +61 -0
- package/lib/schemas/types/tenant_purchase_orders.js +2 -0
- package/package.json +1 -1
package/lib/constants/RFQ.d.ts
CHANGED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare enum RFQ_PUBLIC_RESPOND_ACTION_ENUM {
|
|
2
|
-
CONFIRM = "confirm",
|
|
3
|
-
CANCEL = "cancel"
|
|
4
|
-
}
|
|
5
|
-
export declare const ALL_RFQ_PUBLIC_RESPOND_ACTIONS: RFQ_PUBLIC_RESPOND_ACTION_ENUM[];
|
|
6
|
-
export declare enum RFQ_PUBLIC_RESPOND_CODE_ENUM {
|
|
7
|
-
PROCESSED = "PROCESSED",
|
|
8
|
-
ALREADY_PROCESSED = "ALREADY_PROCESSED",
|
|
9
|
-
EXPIRED = "EXPIRED",
|
|
10
|
-
NOT_FOUND = "NOT_FOUND",
|
|
11
|
-
INVALID_TRANSITION = "INVALID_TRANSITION",
|
|
12
|
-
/** Used by routes when the request body is missing required fields. */
|
|
13
|
-
INVALID_REQUEST = "INVALID_REQUEST"
|
|
14
|
-
}
|
|
15
|
-
export declare const ALL_RFQ_PUBLIC_RESPOND_CODES: RFQ_PUBLIC_RESPOND_CODE_ENUM[];
|
|
16
|
-
export type RfqType = 'purchase' | 'sale';
|
|
17
|
-
export type ActionStatus = 'PENDING' | 'COMPLETED' | 'EXPIRED' | 'INVALID';
|
|
18
|
-
export interface IRfqRespondPageResult {
|
|
19
|
-
status: ActionStatus;
|
|
20
|
-
title: string;
|
|
21
|
-
message: string;
|
|
22
|
-
completedAt?: string;
|
|
23
|
-
}
|
|
24
|
-
export declare function getRfqRespondPageResult(code: RFQ_PUBLIC_RESPOND_CODE_ENUM, action: RFQ_PUBLIC_RESPOND_ACTION_ENUM, rfqType: RfqType): IRfqRespondPageResult;
|
|
25
|
-
export interface IPublicRfqRespondRequest {
|
|
26
|
-
rfq_id: string;
|
|
27
|
-
vendor_id: string;
|
|
28
|
-
action: RFQ_PUBLIC_RESPOND_ACTION_ENUM;
|
|
29
|
-
}
|
|
30
|
-
export interface IPublicRfqRespondResponse {
|
|
31
|
-
success: boolean;
|
|
32
|
-
code: RFQ_PUBLIC_RESPOND_CODE_ENUM;
|
|
33
|
-
message: string;
|
|
34
|
-
order_status?: string;
|
|
35
|
-
rfq_id?: string;
|
|
36
|
-
}
|
|
37
|
-
export declare function getRfqPublicRespondMessage(code: RFQ_PUBLIC_RESPOND_CODE_ENUM, action: RFQ_PUBLIC_RESPOND_ACTION_ENUM): string;
|
package/lib/constants/RFQ.js
CHANGED
|
@@ -1,86 +1 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALL_RFQ_PUBLIC_RESPOND_CODES = exports.RFQ_PUBLIC_RESPOND_CODE_ENUM = exports.ALL_RFQ_PUBLIC_RESPOND_ACTIONS = exports.RFQ_PUBLIC_RESPOND_ACTION_ENUM = void 0;
|
|
4
|
-
exports.getRfqRespondPageResult = getRfqRespondPageResult;
|
|
5
|
-
exports.getRfqPublicRespondMessage = getRfqPublicRespondMessage;
|
|
6
|
-
var RFQ_PUBLIC_RESPOND_ACTION_ENUM;
|
|
7
|
-
(function (RFQ_PUBLIC_RESPOND_ACTION_ENUM) {
|
|
8
|
-
RFQ_PUBLIC_RESPOND_ACTION_ENUM["CONFIRM"] = "confirm";
|
|
9
|
-
RFQ_PUBLIC_RESPOND_ACTION_ENUM["CANCEL"] = "cancel";
|
|
10
|
-
})(RFQ_PUBLIC_RESPOND_ACTION_ENUM || (exports.RFQ_PUBLIC_RESPOND_ACTION_ENUM = RFQ_PUBLIC_RESPOND_ACTION_ENUM = {}));
|
|
11
|
-
exports.ALL_RFQ_PUBLIC_RESPOND_ACTIONS = Object.values(RFQ_PUBLIC_RESPOND_ACTION_ENUM);
|
|
12
|
-
var RFQ_PUBLIC_RESPOND_CODE_ENUM;
|
|
13
|
-
(function (RFQ_PUBLIC_RESPOND_CODE_ENUM) {
|
|
14
|
-
RFQ_PUBLIC_RESPOND_CODE_ENUM["PROCESSED"] = "PROCESSED";
|
|
15
|
-
RFQ_PUBLIC_RESPOND_CODE_ENUM["ALREADY_PROCESSED"] = "ALREADY_PROCESSED";
|
|
16
|
-
RFQ_PUBLIC_RESPOND_CODE_ENUM["EXPIRED"] = "EXPIRED";
|
|
17
|
-
RFQ_PUBLIC_RESPOND_CODE_ENUM["NOT_FOUND"] = "NOT_FOUND";
|
|
18
|
-
RFQ_PUBLIC_RESPOND_CODE_ENUM["INVALID_TRANSITION"] = "INVALID_TRANSITION";
|
|
19
|
-
/** Used by routes when the request body is missing required fields. */
|
|
20
|
-
RFQ_PUBLIC_RESPOND_CODE_ENUM["INVALID_REQUEST"] = "INVALID_REQUEST";
|
|
21
|
-
})(RFQ_PUBLIC_RESPOND_CODE_ENUM || (exports.RFQ_PUBLIC_RESPOND_CODE_ENUM = RFQ_PUBLIC_RESPOND_CODE_ENUM = {}));
|
|
22
|
-
exports.ALL_RFQ_PUBLIC_RESPOND_CODES = Object.values(RFQ_PUBLIC_RESPOND_CODE_ENUM);
|
|
23
|
-
function getRfqRespondPageResult(code, action, rfqType) {
|
|
24
|
-
const label = rfqType === 'sale' ? 'Quotation' : 'RFQ';
|
|
25
|
-
switch (code) {
|
|
26
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.PROCESSED:
|
|
27
|
-
return {
|
|
28
|
-
status: 'PENDING',
|
|
29
|
-
title: action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM ? `${label} Accepted` : `${label} Declined`,
|
|
30
|
-
message: getRfqPublicRespondMessage(code, action),
|
|
31
|
-
};
|
|
32
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.ALREADY_PROCESSED:
|
|
33
|
-
return {
|
|
34
|
-
status: 'COMPLETED',
|
|
35
|
-
title: action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM ? 'Already Accepted' : 'Already Declined',
|
|
36
|
-
message: getRfqPublicRespondMessage(code, action),
|
|
37
|
-
};
|
|
38
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.EXPIRED:
|
|
39
|
-
return {
|
|
40
|
-
status: 'EXPIRED',
|
|
41
|
-
title: `${label} Expired`,
|
|
42
|
-
message: getRfqPublicRespondMessage(code, action),
|
|
43
|
-
};
|
|
44
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.NOT_FOUND:
|
|
45
|
-
return {
|
|
46
|
-
status: 'INVALID',
|
|
47
|
-
title: `${label} Not Found`,
|
|
48
|
-
message: getRfqPublicRespondMessage(code, action),
|
|
49
|
-
};
|
|
50
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.INVALID_TRANSITION:
|
|
51
|
-
return {
|
|
52
|
-
status: 'INVALID',
|
|
53
|
-
title: 'Action Not Allowed',
|
|
54
|
-
message: getRfqPublicRespondMessage(code, action),
|
|
55
|
-
};
|
|
56
|
-
default:
|
|
57
|
-
return {
|
|
58
|
-
status: 'INVALID',
|
|
59
|
-
title: 'Unexpected Error',
|
|
60
|
-
message: 'An unexpected response was received. Please try again or contact support.',
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
// ─── Message helpers ───────────────────────────────────────────────
|
|
65
|
-
function getRfqPublicRespondMessage(code, action) {
|
|
66
|
-
switch (code) {
|
|
67
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.PROCESSED:
|
|
68
|
-
return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
|
|
69
|
-
? 'You have accepted this RFQ. The buyer will review your response.'
|
|
70
|
-
: 'You have declined this RFQ.';
|
|
71
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.ALREADY_PROCESSED:
|
|
72
|
-
return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
|
|
73
|
-
? 'You have already accepted this RFQ.'
|
|
74
|
-
: 'You have already declined this RFQ.';
|
|
75
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.EXPIRED:
|
|
76
|
-
return 'This RFQ has expired and can no longer be responded to.';
|
|
77
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.NOT_FOUND:
|
|
78
|
-
return 'This RFQ could not be found. It may have been deleted or the link is invalid.';
|
|
79
|
-
case RFQ_PUBLIC_RESPOND_CODE_ENUM.INVALID_TRANSITION:
|
|
80
|
-
return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
|
|
81
|
-
? 'This RFQ has already been declined and cannot be accepted.'
|
|
82
|
-
: 'This RFQ has already been accepted and cannot be declined via this link.';
|
|
83
|
-
default:
|
|
84
|
-
return 'An unknown error occurred.';
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum TENANT_PURCHASE_ORDER_STATUS_ENUM {
|
|
2
|
+
DRAFT = "DRAFT",
|
|
3
|
+
SUBMITTED = "SUBMITTED",
|
|
4
|
+
PARTIALLY_RECEIVED = "PARTIALLY_RECEIVED",
|
|
5
|
+
RECEIVED = "RECEIVED",
|
|
6
|
+
COMPLETED = "COMPLETED",
|
|
7
|
+
CANCELLED = "CANCELLED"
|
|
8
|
+
}
|
|
9
|
+
export declare const ALL_TENANT_PURCHASE_ORDER_STATUS_NAMES: TENANT_PURCHASE_ORDER_STATUS_ENUM[];
|
|
10
|
+
export declare enum TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM {
|
|
11
|
+
CREATED = "CREATED",
|
|
12
|
+
APPROVED = "APPROVED",
|
|
13
|
+
DISPATCHED = "DISPATCHED",
|
|
14
|
+
COMPLETED = "COMPLETED",
|
|
15
|
+
CANCELLED = "CANCELLED"
|
|
16
|
+
}
|
|
17
|
+
export declare const ALL_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES: TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ALL_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES = exports.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM = exports.ALL_TENANT_PURCHASE_ORDER_STATUS_NAMES = exports.TENANT_PURCHASE_ORDER_STATUS_ENUM = void 0;
|
|
4
|
+
// ======================>> TENANT PURCHASE ORDER <<====================== //
|
|
5
|
+
var TENANT_PURCHASE_ORDER_STATUS_ENUM;
|
|
6
|
+
(function (TENANT_PURCHASE_ORDER_STATUS_ENUM) {
|
|
7
|
+
TENANT_PURCHASE_ORDER_STATUS_ENUM["DRAFT"] = "DRAFT";
|
|
8
|
+
TENANT_PURCHASE_ORDER_STATUS_ENUM["SUBMITTED"] = "SUBMITTED";
|
|
9
|
+
TENANT_PURCHASE_ORDER_STATUS_ENUM["PARTIALLY_RECEIVED"] = "PARTIALLY_RECEIVED";
|
|
10
|
+
TENANT_PURCHASE_ORDER_STATUS_ENUM["RECEIVED"] = "RECEIVED";
|
|
11
|
+
TENANT_PURCHASE_ORDER_STATUS_ENUM["COMPLETED"] = "COMPLETED";
|
|
12
|
+
TENANT_PURCHASE_ORDER_STATUS_ENUM["CANCELLED"] = "CANCELLED";
|
|
13
|
+
})(TENANT_PURCHASE_ORDER_STATUS_ENUM || (exports.TENANT_PURCHASE_ORDER_STATUS_ENUM = TENANT_PURCHASE_ORDER_STATUS_ENUM = {}));
|
|
14
|
+
exports.ALL_TENANT_PURCHASE_ORDER_STATUS_NAMES = Object.values(TENANT_PURCHASE_ORDER_STATUS_ENUM);
|
|
15
|
+
// ======================>> TENANT PURCHASE ORDER VENDOR RETURN <<====================== //
|
|
16
|
+
var TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
17
|
+
(function (TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM) {
|
|
18
|
+
TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM["CREATED"] = "CREATED";
|
|
19
|
+
TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM["APPROVED"] = "APPROVED";
|
|
20
|
+
TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM["DISPATCHED"] = "DISPATCHED";
|
|
21
|
+
TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM["COMPLETED"] = "COMPLETED";
|
|
22
|
+
TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM["CANCELLED"] = "CANCELLED";
|
|
23
|
+
})(TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM || (exports.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM = TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM = {}));
|
|
24
|
+
exports.ALL_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES = Object.values(TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ITenantPurchaseOrderVendorReturnStatus } from '../schemas';
|
|
2
|
+
import { TENANT_PURCHASE_ORDER_STATUS_ENUM } from './TENANT_ENUMS';
|
|
3
|
+
export interface ITenantPurchaseOrderStatus {
|
|
4
|
+
status: TENANT_PURCHASE_ORDER_STATUS_ENUM;
|
|
5
|
+
color: string;
|
|
6
|
+
contrast_color: string;
|
|
7
|
+
priority: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ITenantPurchaseOrderStatusColorCode {
|
|
10
|
+
color: string;
|
|
11
|
+
contrast_color: string;
|
|
12
|
+
}
|
|
13
|
+
export type ITenantPurchaseOrderStatusColorCodeMap = Record<TENANT_PURCHASE_ORDER_STATUS_ENUM, ITenantPurchaseOrderStatusColorCode>;
|
|
14
|
+
export declare const DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP: ITenantPurchaseOrderStatusColorCodeMap;
|
|
15
|
+
export declare const DEFAULT_TENANT_PURCHASE_ORDER_STATUS: ITenantPurchaseOrderStatus[];
|
|
16
|
+
export declare const DEFAULT_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUSES: ITenantPurchaseOrderVendorReturnStatus[];
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUSES = exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS = exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP = void 0;
|
|
4
|
+
const TENANT_ENUMS_1 = require("./TENANT_ENUMS");
|
|
5
|
+
exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP = {
|
|
6
|
+
[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.DRAFT]: {
|
|
7
|
+
color: '#727472',
|
|
8
|
+
contrast_color: '#FFFFFF',
|
|
9
|
+
},
|
|
10
|
+
[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.SUBMITTED]: {
|
|
11
|
+
color: '#0000FF',
|
|
12
|
+
contrast_color: '#FFFFFF',
|
|
13
|
+
},
|
|
14
|
+
[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.PARTIALLY_RECEIVED]: {
|
|
15
|
+
color: '#E67E22',
|
|
16
|
+
contrast_color: '#FFFFFF',
|
|
17
|
+
},
|
|
18
|
+
[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.RECEIVED]: {
|
|
19
|
+
color: '#FBB117',
|
|
20
|
+
contrast_color: '#FFFFFF',
|
|
21
|
+
},
|
|
22
|
+
[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.COMPLETED]: {
|
|
23
|
+
color: '#4CC417',
|
|
24
|
+
contrast_color: '#FFFFFF',
|
|
25
|
+
},
|
|
26
|
+
[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.CANCELLED]: {
|
|
27
|
+
color: '#FF0000',
|
|
28
|
+
contrast_color: '#FFFFFF',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS = [
|
|
32
|
+
{
|
|
33
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.DRAFT,
|
|
34
|
+
...exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.DRAFT],
|
|
35
|
+
priority: 0,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.SUBMITTED,
|
|
39
|
+
...exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.SUBMITTED],
|
|
40
|
+
priority: 1,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.PARTIALLY_RECEIVED,
|
|
44
|
+
...exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.PARTIALLY_RECEIVED],
|
|
45
|
+
priority: 2,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.RECEIVED,
|
|
49
|
+
...exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.RECEIVED],
|
|
50
|
+
priority: 3,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.COMPLETED,
|
|
54
|
+
...exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.COMPLETED],
|
|
55
|
+
priority: 4,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.CANCELLED,
|
|
59
|
+
...exports.DEFAULT_TENANT_PURCHASE_ORDER_STATUS_COLOR_CODE_MAP[TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_STATUS_ENUM.CANCELLED],
|
|
60
|
+
priority: 5,
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
exports.DEFAULT_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUSES = [
|
|
64
|
+
{
|
|
65
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.CREATED,
|
|
66
|
+
color: '#727472',
|
|
67
|
+
contrast_color: '#FFFFFF',
|
|
68
|
+
priority: 0,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.APPROVED,
|
|
72
|
+
color: '#0000FF',
|
|
73
|
+
contrast_color: '#FFFFFF',
|
|
74
|
+
priority: 1,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.DISPATCHED,
|
|
78
|
+
color: '#FBB117',
|
|
79
|
+
contrast_color: '#FFFFFF',
|
|
80
|
+
priority: 2,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.COMPLETED,
|
|
84
|
+
color: '#4CC417',
|
|
85
|
+
contrast_color: '#FFFFFF',
|
|
86
|
+
priority: 3,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
status: TENANT_ENUMS_1.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.CANCELLED,
|
|
90
|
+
color: '#FF0000',
|
|
91
|
+
contrast_color: '#FFFFFF',
|
|
92
|
+
priority: 4,
|
|
93
|
+
},
|
|
94
|
+
];
|
package/lib/constants/index.d.ts
CHANGED
|
@@ -7,17 +7,18 @@ export * from './HUBRISE_ENUMS';
|
|
|
7
7
|
export * from './NOTIFICATIONS';
|
|
8
8
|
export * from './ORDER';
|
|
9
9
|
export * from './PRA_ENUMS';
|
|
10
|
-
export * from './WAREHOUSE_PURCHASE_ORDER';
|
|
11
10
|
export * from './REPORT_WEBVIEW';
|
|
12
|
-
export * from './RFQ';
|
|
13
11
|
export * from './SMARTPAY_ENUMS';
|
|
14
12
|
export * from './SOCKET';
|
|
15
13
|
export * from './SRB_ENUMS';
|
|
16
14
|
export * from './SWITCHPAY';
|
|
15
|
+
export * from './TENANT_ENUMS';
|
|
16
|
+
export * from './TENANT_PURCHASE_ORDER';
|
|
17
17
|
export * from './types';
|
|
18
18
|
export * from './WALLET';
|
|
19
19
|
export * from './WAREHOUSE_ANALYTICS';
|
|
20
20
|
export * from './WAREHOUSE_ENUMS';
|
|
21
21
|
export * from './WAREHOUSE_INVOICE';
|
|
22
|
+
export * from './WAREHOUSE_PURCHASE_ORDER';
|
|
22
23
|
export * from './WEBVIEW';
|
|
23
24
|
export * from './WORKER_ENDPOINTS';
|
package/lib/constants/index.js
CHANGED
|
@@ -23,17 +23,18 @@ __exportStar(require("./HUBRISE_ENUMS"), exports);
|
|
|
23
23
|
__exportStar(require("./NOTIFICATIONS"), exports);
|
|
24
24
|
__exportStar(require("./ORDER"), exports);
|
|
25
25
|
__exportStar(require("./PRA_ENUMS"), exports);
|
|
26
|
-
__exportStar(require("./WAREHOUSE_PURCHASE_ORDER"), exports);
|
|
27
26
|
__exportStar(require("./REPORT_WEBVIEW"), exports);
|
|
28
|
-
__exportStar(require("./RFQ"), exports);
|
|
29
27
|
__exportStar(require("./SMARTPAY_ENUMS"), exports);
|
|
30
28
|
__exportStar(require("./SOCKET"), exports);
|
|
31
29
|
__exportStar(require("./SRB_ENUMS"), exports);
|
|
32
30
|
__exportStar(require("./SWITCHPAY"), exports);
|
|
31
|
+
__exportStar(require("./TENANT_ENUMS"), exports);
|
|
32
|
+
__exportStar(require("./TENANT_PURCHASE_ORDER"), exports);
|
|
33
33
|
__exportStar(require("./types"), exports);
|
|
34
34
|
__exportStar(require("./WALLET"), exports);
|
|
35
35
|
__exportStar(require("./WAREHOUSE_ANALYTICS"), exports);
|
|
36
36
|
__exportStar(require("./WAREHOUSE_ENUMS"), exports);
|
|
37
37
|
__exportStar(require("./WAREHOUSE_INVOICE"), exports);
|
|
38
|
+
__exportStar(require("./WAREHOUSE_PURCHASE_ORDER"), exports);
|
|
38
39
|
__exportStar(require("./WEBVIEW"), exports);
|
|
39
40
|
__exportStar(require("./WORKER_ENDPOINTS"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { IWarehousePurchaseOrderRFQ } from '../../schemas';
|
|
3
|
+
interface IWarehouseRfqStatusInfo {
|
|
4
|
+
currentStatus: WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM;
|
|
5
|
+
priority: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function getWarehousePurchaseOrderRfqsFetchedData(data: IWarehousePurchaseOrderRFQ[]): IWarehousePurchaseOrderRFQ[];
|
|
8
|
+
export declare function getWarehousePurchaseOrderRfqsPostedData(data: IWarehousePurchaseOrderRFQ[], order: IWarehousePurchaseOrderRFQ): IWarehousePurchaseOrderRFQ[];
|
|
9
|
+
export declare function getWarehousePurchaseOrderRfqsUpdatedData(data: IWarehousePurchaseOrderRFQ[], order: Partial<IWarehousePurchaseOrderRFQ>): IWarehousePurchaseOrderRFQ[];
|
|
10
|
+
export declare function getWarehousePurchaseOrderRfqsDeletedData(data: IWarehousePurchaseOrderRFQ[], orderId: string): IWarehousePurchaseOrderRFQ[];
|
|
11
|
+
interface IWarehouseGetPurchaseOrderRfqStatusInfoReturn {
|
|
12
|
+
currentOrderStatus: IWarehouseRfqStatusInfo | null;
|
|
13
|
+
nextOrderStatus: IWarehouseRfqStatusInfo | null;
|
|
14
|
+
orderProgress: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function getWarehousePurchaseOrderRfqStatusInfo(currentStatus: WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM): IWarehouseGetPurchaseOrderRfqStatusInfoReturn;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWarehousePurchaseOrderRfqsFetchedData = getWarehousePurchaseOrderRfqsFetchedData;
|
|
4
|
+
exports.getWarehousePurchaseOrderRfqsPostedData = getWarehousePurchaseOrderRfqsPostedData;
|
|
5
|
+
exports.getWarehousePurchaseOrderRfqsUpdatedData = getWarehousePurchaseOrderRfqsUpdatedData;
|
|
6
|
+
exports.getWarehousePurchaseOrderRfqsDeletedData = getWarehousePurchaseOrderRfqsDeletedData;
|
|
7
|
+
exports.getWarehousePurchaseOrderRfqStatusInfo = getWarehousePurchaseOrderRfqStatusInfo;
|
|
8
|
+
const constants_1 = require("../../constants");
|
|
9
|
+
const common_order_actions_1 = require("./common-order-actions");
|
|
10
|
+
const common_warehouse_purchase_order_rfq_actions_1 = require("./common-warehouse-purchase-order-rfq-actions");
|
|
11
|
+
const DEFAULT_WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS = [
|
|
12
|
+
{
|
|
13
|
+
currentStatus: constants_1.WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM.DRAFT,
|
|
14
|
+
priority: 0,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
currentStatus: constants_1.WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM.SENT,
|
|
18
|
+
priority: 1,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
currentStatus: constants_1.WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM.CONFIRMED,
|
|
22
|
+
priority: 2,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
currentStatus: constants_1.WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM.CANCELLED,
|
|
26
|
+
priority: 3,
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
function getWarehousePurchaseOrderRfqsFetchedData(data) {
|
|
30
|
+
return data.map((order) => (0, common_warehouse_purchase_order_rfq_actions_1.getWarehousePurchaseOrderRfqWithPrice)(order, false)).sort(common_order_actions_1.sortByCreatedAt);
|
|
31
|
+
}
|
|
32
|
+
function getWarehousePurchaseOrderRfqsPostedData(data, order) {
|
|
33
|
+
const newOrders = data.filter((item) => item._id !== order._id).concat((0, common_warehouse_purchase_order_rfq_actions_1.getWarehousePurchaseOrderRfqWithPrice)(order));
|
|
34
|
+
return newOrders.sort(common_order_actions_1.sortByCreatedAt);
|
|
35
|
+
}
|
|
36
|
+
function getWarehousePurchaseOrderRfqsUpdatedData(data, order) {
|
|
37
|
+
const updatedOrder = (0, common_warehouse_purchase_order_rfq_actions_1.getWarehousePurchaseOrderRfqWithPrice)(order);
|
|
38
|
+
const newOrders = data.map((item) => item._id === updatedOrder._id ? { ...item, ...updatedOrder } : item);
|
|
39
|
+
return newOrders;
|
|
40
|
+
}
|
|
41
|
+
function getWarehousePurchaseOrderRfqsDeletedData(data, orderId) {
|
|
42
|
+
return data.filter((item) => item._id !== orderId);
|
|
43
|
+
}
|
|
44
|
+
function getWarehousePurchaseOrderRfqStatusInfo(currentStatus) {
|
|
45
|
+
const info = {
|
|
46
|
+
orderProgress: 0,
|
|
47
|
+
nextOrderStatus: null,
|
|
48
|
+
currentOrderStatus: null,
|
|
49
|
+
};
|
|
50
|
+
let currentStatusIndex;
|
|
51
|
+
for (let i = 0; i < DEFAULT_WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS.length; i++) {
|
|
52
|
+
const obj = DEFAULT_WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS[i];
|
|
53
|
+
if (obj.currentStatus === currentStatus) {
|
|
54
|
+
info.currentOrderStatus = obj;
|
|
55
|
+
currentStatusIndex = i;
|
|
56
|
+
if (info.currentOrderStatus.currentStatus !== constants_1.WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM.CANCELLED) {
|
|
57
|
+
// Total is -2 because we don't want to count unconfirmed and cancelled
|
|
58
|
+
const total = DEFAULT_WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS.length - 2;
|
|
59
|
+
info.orderProgress = Math.round((obj.priority / total) * 100);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (currentStatusIndex == null) {
|
|
65
|
+
return info;
|
|
66
|
+
}
|
|
67
|
+
const nextObj = DEFAULT_WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS[currentStatusIndex + 1];
|
|
68
|
+
if (!nextObj || nextObj.currentStatus === constants_1.WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM.CANCELLED) {
|
|
69
|
+
return info;
|
|
70
|
+
}
|
|
71
|
+
info.nextOrderStatus = nextObj;
|
|
72
|
+
return info;
|
|
73
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { IWarehouseSaleOrderRFQ } from '../../schemas';
|
|
3
|
+
interface IWarehouseSaleRfqStatusInfo {
|
|
4
|
+
currentStatus: WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM;
|
|
5
|
+
priority: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function getWarehouseSaleOrderRfqsFetchedData(data: IWarehouseSaleOrderRFQ[]): IWarehouseSaleOrderRFQ[];
|
|
8
|
+
export declare function getWarehouseSaleOrderRfqsPostedData(data: IWarehouseSaleOrderRFQ[], order: IWarehouseSaleOrderRFQ): IWarehouseSaleOrderRFQ[];
|
|
9
|
+
export declare function getWarehouseSaleOrderRfqsUpdatedData(data: IWarehouseSaleOrderRFQ[], order: Partial<IWarehouseSaleOrderRFQ>): IWarehouseSaleOrderRFQ[];
|
|
10
|
+
export declare function getWarehouseSaleOrderRfqsDeletedData(data: IWarehouseSaleOrderRFQ[], orderId: string): IWarehouseSaleOrderRFQ[];
|
|
11
|
+
interface IWarehouseGetSaleOrderRfqStatusInfoReturn {
|
|
12
|
+
currentOrderStatus: IWarehouseSaleRfqStatusInfo | null;
|
|
13
|
+
nextOrderStatus: IWarehouseSaleRfqStatusInfo | null;
|
|
14
|
+
orderProgress: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function getWarehouseSaleOrderRfqStatusInfo(currentStatus: WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM): IWarehouseGetSaleOrderRfqStatusInfoReturn;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWarehouseSaleOrderRfqsFetchedData = getWarehouseSaleOrderRfqsFetchedData;
|
|
4
|
+
exports.getWarehouseSaleOrderRfqsPostedData = getWarehouseSaleOrderRfqsPostedData;
|
|
5
|
+
exports.getWarehouseSaleOrderRfqsUpdatedData = getWarehouseSaleOrderRfqsUpdatedData;
|
|
6
|
+
exports.getWarehouseSaleOrderRfqsDeletedData = getWarehouseSaleOrderRfqsDeletedData;
|
|
7
|
+
exports.getWarehouseSaleOrderRfqStatusInfo = getWarehouseSaleOrderRfqStatusInfo;
|
|
8
|
+
const constants_1 = require("../../constants");
|
|
9
|
+
const common_order_actions_1 = require("./common-order-actions");
|
|
10
|
+
const common_warehouse_sale_order_rfq_actions_1 = require("./common-warehouse-sale-order-rfq-actions");
|
|
11
|
+
const DEFAULT_WAREHOUSE_SALE_ORDER_RFQ_STATUS = [
|
|
12
|
+
{
|
|
13
|
+
currentStatus: constants_1.WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM.DRAFT,
|
|
14
|
+
priority: 0,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
currentStatus: constants_1.WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM.SENT,
|
|
18
|
+
priority: 1,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
currentStatus: constants_1.WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM.CONFIRMED,
|
|
22
|
+
priority: 2,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
currentStatus: constants_1.WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM.CANCELLED,
|
|
26
|
+
priority: 3,
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
function getWarehouseSaleOrderRfqsFetchedData(data) {
|
|
30
|
+
return data.map((order) => (0, common_warehouse_sale_order_rfq_actions_1.getWarehouseSaleOrderRfqWithPrice)(order, false)).sort(common_order_actions_1.sortByCreatedAt);
|
|
31
|
+
}
|
|
32
|
+
function getWarehouseSaleOrderRfqsPostedData(data, order) {
|
|
33
|
+
const newOrders = data.filter((item) => item._id !== order._id).concat((0, common_warehouse_sale_order_rfq_actions_1.getWarehouseSaleOrderRfqWithPrice)(order));
|
|
34
|
+
return newOrders.sort(common_order_actions_1.sortByCreatedAt);
|
|
35
|
+
}
|
|
36
|
+
function getWarehouseSaleOrderRfqsUpdatedData(data, order) {
|
|
37
|
+
const updatedOrder = (0, common_warehouse_sale_order_rfq_actions_1.getWarehouseSaleOrderRfqWithPrice)(order);
|
|
38
|
+
const newOrders = data.map((item) => item._id === updatedOrder._id ? { ...item, ...updatedOrder } : item);
|
|
39
|
+
return newOrders;
|
|
40
|
+
}
|
|
41
|
+
function getWarehouseSaleOrderRfqsDeletedData(data, orderId) {
|
|
42
|
+
return data.filter((item) => item._id !== orderId);
|
|
43
|
+
}
|
|
44
|
+
function getWarehouseSaleOrderRfqStatusInfo(currentStatus) {
|
|
45
|
+
const info = {
|
|
46
|
+
orderProgress: 0,
|
|
47
|
+
nextOrderStatus: null,
|
|
48
|
+
currentOrderStatus: null,
|
|
49
|
+
};
|
|
50
|
+
let currentStatusIndex;
|
|
51
|
+
for (let i = 0; i < DEFAULT_WAREHOUSE_SALE_ORDER_RFQ_STATUS.length; i++) {
|
|
52
|
+
const obj = DEFAULT_WAREHOUSE_SALE_ORDER_RFQ_STATUS[i];
|
|
53
|
+
if (obj.currentStatus === currentStatus) {
|
|
54
|
+
info.currentOrderStatus = obj;
|
|
55
|
+
currentStatusIndex = i;
|
|
56
|
+
if (info.currentOrderStatus.currentStatus !== constants_1.WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM.CANCELLED) {
|
|
57
|
+
// Total is -2 because we don't want to count unconfirmed and cancelled
|
|
58
|
+
const total = DEFAULT_WAREHOUSE_SALE_ORDER_RFQ_STATUS.length - 2;
|
|
59
|
+
info.orderProgress = Math.round((obj.priority / total) * 100);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (currentStatusIndex == null) {
|
|
65
|
+
return info;
|
|
66
|
+
}
|
|
67
|
+
const nextObj = DEFAULT_WAREHOUSE_SALE_ORDER_RFQ_STATUS[currentStatusIndex + 1];
|
|
68
|
+
if (!nextObj || nextObj.currentStatus === constants_1.WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM.CANCELLED) {
|
|
69
|
+
return info;
|
|
70
|
+
}
|
|
71
|
+
info.nextOrderStatus = nextObj;
|
|
72
|
+
return info;
|
|
73
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SORT_TYPE_ENUM } from '../../constants';
|
|
2
|
+
import { IWarehousePurchaseOrderRFQ, IWarehousePurchaseOrderRFQCategory, IWarehousePurchaseOrderRFQItem, IWarehousePurchaseOrderRFQIteration } from '../../schemas';
|
|
3
|
+
import { IWarehouseGeneralPurchaseOrderRfqItem, IWarehousePurchaseOrderRfqCartItemsObj } from '../types';
|
|
4
|
+
export declare function getWarehousePurchaseOrderRfqIterationsWithPrice(iterations?: IWarehousePurchaseOrderRFQIteration[] | undefined, writeable?: boolean): IWarehousePurchaseOrderRFQIteration[];
|
|
5
|
+
export declare function getWarehousePurchaseOrderRfqItemsWithPrice(items: IWarehousePurchaseOrderRFQItem[] | undefined, convertToPrice: (price: number) => number): IWarehousePurchaseOrderRFQItem[];
|
|
6
|
+
export declare function getWarehousePurchaseOrderRfqCategoriesWithPrice(categories: IWarehousePurchaseOrderRFQCategory[] | undefined, convertToPrice: (price: number) => number): IWarehousePurchaseOrderRFQCategory[];
|
|
7
|
+
export declare function getWarehousePurchaseOrderRfqWithPrice<T extends Partial<IWarehousePurchaseOrderRFQ> | IWarehousePurchaseOrderRFQ | IWarehousePurchaseOrderRFQIteration>(order: T, writeable?: boolean): T;
|
|
8
|
+
export declare function syncWarehousePurchaseOrderRfqData(order: IWarehousePurchaseOrderRFQ): IWarehousePurchaseOrderRFQ;
|
|
9
|
+
export declare function skipItemMetadataFromWarehousePurchaseOrderRfqCategories(categories: IWarehousePurchaseOrderRFQ['categories'], previousCategories?: IWarehousePurchaseOrderRFQ['categories']): IWarehousePurchaseOrderRFQ['categories'];
|
|
10
|
+
export declare function getWarehousePurchaseOrderRfqWithAllFields<T extends IWarehousePurchaseOrderRFQ | Partial<IWarehousePurchaseOrderRFQ>>(order: T, skipItemMetadata?: boolean): T;
|
|
11
|
+
export interface IGetPurchaseOrderRfqCartItemsObjPayload {
|
|
12
|
+
currentIterationCategories: IWarehousePurchaseOrderRFQCategory[] | undefined;
|
|
13
|
+
previousIterationCategories: IWarehousePurchaseOrderRFQCategory[] | undefined;
|
|
14
|
+
mappedItems: Record<string, IWarehouseGeneralPurchaseOrderRfqItem>;
|
|
15
|
+
shouldSortItemsViaId?: boolean;
|
|
16
|
+
isAnEdit?: boolean;
|
|
17
|
+
sortType?: SORT_TYPE_ENUM;
|
|
18
|
+
}
|
|
19
|
+
export declare function getWarehousePurchaseOrderRfqCartItemsObj({ currentIterationCategories, previousIterationCategories, mappedItems, shouldSortItemsViaId, isAnEdit, sortType, }: IGetPurchaseOrderRfqCartItemsObjPayload): IWarehousePurchaseOrderRfqCartItemsObj;
|
|
20
|
+
interface IGetVoidItemsWithReasonRfq {
|
|
21
|
+
currentCategories: IWarehousePurchaseOrderRFQCategory[];
|
|
22
|
+
iterationsFromFrontend: IWarehousePurchaseOrderRFQIteration[] | undefined;
|
|
23
|
+
previousCategories: IWarehousePurchaseOrderRFQCategory[];
|
|
24
|
+
}
|
|
25
|
+
export declare function getVoidItemsWithReasonWarehousePurchaseOrderRfq({ currentCategories, iterationsFromFrontend, previousCategories, }: IGetVoidItemsWithReasonRfq): {
|
|
26
|
+
newIterationCategories: IWarehousePurchaseOrderRFQCategory[];
|
|
27
|
+
voidOrderItems: IWarehousePurchaseOrderRFQItem[];
|
|
28
|
+
hasNewItems: boolean;
|
|
29
|
+
};
|
|
30
|
+
export {};
|