@managesome/eposmatic-toolkit 0.2.477 → 0.2.478
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/WAREHOUSE_ENUMS.d.ts +2 -0
- package/lib/constants/WAREHOUSE_ENUMS.js +2 -0
- package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +22 -1
- package/lib/schemas/models/warehouse_sale_order_rfqs.js +21 -1
- package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +9 -1
- package/package.json +1 -1
|
@@ -215,6 +215,8 @@ export declare enum WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM {
|
|
|
215
215
|
CANCELLED = "CANCELLED",
|
|
216
216
|
VENDOR_ACCEPTED = "VENDOR_ACCEPTED",
|
|
217
217
|
VENDOR_REJECTED = "VENDOR_REJECTED",
|
|
218
|
+
CLIENT_ACCEPTED = "CLIENT_ACCEPTED",
|
|
219
|
+
CLIENT_REJECTED = "CLIENT_REJECTED",
|
|
218
220
|
ITEM_ADDED = "ITEM_ADDED",
|
|
219
221
|
ITEM_UPDATED = "ITEM_UPDATED",
|
|
220
222
|
ITEM_REMOVED = "ITEM_REMOVED",
|
|
@@ -265,6 +265,8 @@ var WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM;
|
|
|
265
265
|
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["CANCELLED"] = "CANCELLED";
|
|
266
266
|
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["VENDOR_ACCEPTED"] = "VENDOR_ACCEPTED";
|
|
267
267
|
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["VENDOR_REJECTED"] = "VENDOR_REJECTED";
|
|
268
|
+
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["CLIENT_ACCEPTED"] = "CLIENT_ACCEPTED";
|
|
269
|
+
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["CLIENT_REJECTED"] = "CLIENT_REJECTED";
|
|
268
270
|
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["ITEM_ADDED"] = "ITEM_ADDED";
|
|
269
271
|
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["ITEM_UPDATED"] = "ITEM_UPDATED";
|
|
270
272
|
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["ITEM_REMOVED"] = "ITEM_REMOVED";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from 'mongoose';
|
|
2
|
-
import { WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { WAREHOUSE_PURCHASE_ORDER_RFQ_VENDOR_STATUS_ENUM, WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
|
|
3
3
|
export declare const SaleOrderRFQSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
4
|
timestamps: true;
|
|
5
5
|
versionKey: false;
|
|
@@ -646,6 +646,13 @@ export declare const SaleOrderRFQSchema: Schema<any, import("mongoose").Model<an
|
|
|
646
646
|
is_gst_inclusive?: boolean | null | undefined;
|
|
647
647
|
gst?: number | null | undefined;
|
|
648
648
|
gst_amount?: number | null | undefined;
|
|
649
|
+
requested_clients?: Map<string, {
|
|
650
|
+
status: WAREHOUSE_PURCHASE_ORDER_RFQ_VENDOR_STATUS_ENUM;
|
|
651
|
+
client_id: import("mongoose").Types.ObjectId;
|
|
652
|
+
client_name?: string | null | undefined;
|
|
653
|
+
client_email?: string | null | undefined;
|
|
654
|
+
client_price?: number | null | undefined;
|
|
655
|
+
}> | null | undefined;
|
|
649
656
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
650
657
|
createdAt: NativeDate;
|
|
651
658
|
updatedAt: NativeDate;
|
|
@@ -1288,6 +1295,13 @@ export declare const SaleOrderRFQSchema: Schema<any, import("mongoose").Model<an
|
|
|
1288
1295
|
is_gst_inclusive?: boolean | null | undefined;
|
|
1289
1296
|
gst?: number | null | undefined;
|
|
1290
1297
|
gst_amount?: number | null | undefined;
|
|
1298
|
+
requested_clients?: Map<string, {
|
|
1299
|
+
status: WAREHOUSE_PURCHASE_ORDER_RFQ_VENDOR_STATUS_ENUM;
|
|
1300
|
+
client_id: import("mongoose").Types.ObjectId;
|
|
1301
|
+
client_name?: string | null | undefined;
|
|
1302
|
+
client_email?: string | null | undefined;
|
|
1303
|
+
client_price?: number | null | undefined;
|
|
1304
|
+
}> | null | undefined;
|
|
1291
1305
|
}>> & import("mongoose").FlatRecord<{
|
|
1292
1306
|
createdAt: NativeDate;
|
|
1293
1307
|
updatedAt: NativeDate;
|
|
@@ -1930,6 +1944,13 @@ export declare const SaleOrderRFQSchema: Schema<any, import("mongoose").Model<an
|
|
|
1930
1944
|
is_gst_inclusive?: boolean | null | undefined;
|
|
1931
1945
|
gst?: number | null | undefined;
|
|
1932
1946
|
gst_amount?: number | null | undefined;
|
|
1947
|
+
requested_clients?: Map<string, {
|
|
1948
|
+
status: WAREHOUSE_PURCHASE_ORDER_RFQ_VENDOR_STATUS_ENUM;
|
|
1949
|
+
client_id: import("mongoose").Types.ObjectId;
|
|
1950
|
+
client_name?: string | null | undefined;
|
|
1951
|
+
client_email?: string | null | undefined;
|
|
1952
|
+
client_price?: number | null | undefined;
|
|
1953
|
+
}> | null | undefined;
|
|
1933
1954
|
}> & Required<{
|
|
1934
1955
|
_id: import("mongoose").Types.ObjectId;
|
|
1935
1956
|
}> & {
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WAREHOUSE_SALE_ORDER_RFQ_COLLECTION_NAME = exports.SaleOrderRFQSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
|
-
const warehouses_1 = require("./warehouses");
|
|
7
6
|
const warehouse_categories_1 = require("./warehouse_categories");
|
|
8
7
|
const warehouse_clients_1 = require("./warehouse_clients");
|
|
9
8
|
const warehouse_items_1 = require("./warehouse_items");
|
|
9
|
+
const warehouses_1 = require("./warehouses");
|
|
10
10
|
const StaffDetailsSchema = new mongoose_1.Schema({
|
|
11
11
|
staff_id: {
|
|
12
12
|
type: String,
|
|
@@ -111,6 +111,21 @@ const SaleOrderRFQCategoriesSchema = new mongoose_1.Schema({
|
|
|
111
111
|
_id: false,
|
|
112
112
|
minimize: false,
|
|
113
113
|
});
|
|
114
|
+
const RequestedClientEntrySchema = new mongoose_1.Schema({
|
|
115
|
+
client_id: {
|
|
116
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
117
|
+
required: true,
|
|
118
|
+
ref: warehouse_clients_1.WAREHOUSE_CLIENTS_COLLECTION_NAME,
|
|
119
|
+
},
|
|
120
|
+
client_name: { type: String, required: false },
|
|
121
|
+
client_email: { type: String, required: false },
|
|
122
|
+
client_price: { type: Number, min: 0, required: false },
|
|
123
|
+
status: {
|
|
124
|
+
type: String,
|
|
125
|
+
enum: constants_1.ALL_WAREHOUSE_RFQ_VENDOR_STATUS_NAMES,
|
|
126
|
+
default: constants_1.WAREHOUSE_PURCHASE_ORDER_RFQ_VENDOR_STATUS_ENUM.PENDING,
|
|
127
|
+
},
|
|
128
|
+
}, { _id: false, minimize: false });
|
|
114
129
|
const SaleOrderRFQIterationSchema = new mongoose_1.Schema({
|
|
115
130
|
categories: {
|
|
116
131
|
type: [SaleOrderRFQCategoriesSchema],
|
|
@@ -191,6 +206,11 @@ exports.SaleOrderRFQSchema = new mongoose_1.Schema({
|
|
|
191
206
|
type: String,
|
|
192
207
|
default: '',
|
|
193
208
|
},
|
|
209
|
+
requested_clients: {
|
|
210
|
+
type: Map,
|
|
211
|
+
of: RequestedClientEntrySchema,
|
|
212
|
+
required: false,
|
|
213
|
+
},
|
|
194
214
|
order_number: {
|
|
195
215
|
type: Number,
|
|
196
216
|
min: 0,
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
|
|
1
|
+
import { WAREHOUSE_PURCHASE_ORDER_RFQ_VENDOR_STATUS_ENUM, WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
|
|
2
2
|
import { IStaffDetails } from './orders';
|
|
3
|
+
export interface IWarehouseRFQClientEntry {
|
|
4
|
+
client_id: string;
|
|
5
|
+
client_name: string;
|
|
6
|
+
client_email?: string | null;
|
|
7
|
+
client_price?: number | null;
|
|
8
|
+
status: WAREHOUSE_PURCHASE_ORDER_RFQ_VENDOR_STATUS_ENUM;
|
|
9
|
+
}
|
|
3
10
|
export type IWarehouseSaleOrderRFQItem = {
|
|
4
11
|
_id: string;
|
|
5
12
|
item_id: string;
|
|
@@ -39,6 +46,7 @@ export interface IWarehouseSaleOrderRFQ extends IWarehouseSaleOrderRFQIteration
|
|
|
39
46
|
warehouse_id: string;
|
|
40
47
|
client_id: string;
|
|
41
48
|
client_name: string;
|
|
49
|
+
requested_clients?: Record<string, IWarehouseRFQClientEntry> | null;
|
|
42
50
|
iterations: IWarehouseSaleOrderRFQIteration[];
|
|
43
51
|
order_number: number | null;
|
|
44
52
|
expected_deadline: string;
|