@react-pakistan/util-functions 1.22.75 → 1.22.77
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.
|
@@ -38,6 +38,9 @@ const postPayments = (_c) => __awaiter(void 0, [_c], void 0, function* ({ curren
|
|
|
38
38
|
orderBy: {
|
|
39
39
|
createdAt: 'desc',
|
|
40
40
|
},
|
|
41
|
+
include: {
|
|
42
|
+
quoteInvoice: true,
|
|
43
|
+
},
|
|
41
44
|
where: queryWhere,
|
|
42
45
|
take: pageLimit,
|
|
43
46
|
skip: currentPage === 1 ? 0 : currentPage - 1 * pageLimit,
|
|
@@ -108,6 +108,19 @@ products, createdAt, phone, lastName, firstName, email, country, city, address,
|
|
|
108
108
|
products: true,
|
|
109
109
|
},
|
|
110
110
|
});
|
|
111
|
+
products.forEach((_e) => __awaiter(void 0, [_e], void 0, function* ({ id: _id, productQuantity }) {
|
|
112
|
+
yield prisma.quotesInvoicesOnStellarProducts.create({
|
|
113
|
+
data: {
|
|
114
|
+
quoteInvoiceId: quoteInvoice === null || quoteInvoice === void 0 ? void 0 : quoteInvoice.id,
|
|
115
|
+
productId: _id,
|
|
116
|
+
productQuantity,
|
|
117
|
+
},
|
|
118
|
+
include: {
|
|
119
|
+
product: true,
|
|
120
|
+
quoteInvoice: true,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
}));
|
|
111
124
|
// await prisma.quotesInvoicesOnStellarProducts.create({
|
|
112
125
|
// data: {
|
|
113
126
|
// quoteInvoiceId: quoteInvoice.id,
|
|
@@ -236,7 +249,7 @@ products, createdAt, phone, lastName, firstName, email, country, city, address,
|
|
|
236
249
|
return quoteInvoice;
|
|
237
250
|
});
|
|
238
251
|
exports.postQuoteInvoice = postQuoteInvoice;
|
|
239
|
-
const deleteQuoteInvoice = (
|
|
252
|
+
const deleteQuoteInvoice = (_f) => __awaiter(void 0, [_f], void 0, function* ({ prisma, id, }) {
|
|
240
253
|
const quoteInvoice = yield prisma.quoteInvoice.delete({
|
|
241
254
|
where: {
|
|
242
255
|
id,
|